Supported Types
AnthropicFile
OpenAIFile
OpenRouterFile
Union Discrimination
Use theType field to determine which variant is active, then access the corresponding field:
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
fileResponse := components.CreateFileResponseAnthropic(components.AnthropicFile{/* values here */})
fileResponse := components.CreateFileResponseOpenai(components.OpenAIFile{/* values here */})
fileResponse := components.CreateFileResponseOpenrouter(components.OpenRouterFile{/* values here */})
Type field to determine which variant is active, then access the corresponding field:
switch fileResponse.Type {
case components.FileResponseTypeAnthropic:
// fileResponse.AnthropicFile is populated
case components.FileResponseTypeOpenai:
// fileResponse.OpenAIFile is populated
case components.FileResponseTypeOpenrouter:
// fileResponse.OpenRouterFile is populated
default:
// Unknown type - use fileResponse.GetUnknownRaw() for raw JSON
}