Documentation
¶
Index ¶
Constants ¶
View Source
const Provider = "Anthropic"
View Source
const Version = "2023-06-01"
Variables ¶
View Source
var GenModel_3_5_haiku_20241022 = gen.Model{ Provider: Provider, Name: "claude-3-5-haiku-20241022", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_5_haiku_latest = gen.Model{ Provider: Provider, Name: "claude-3-5-haiku-latest", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_5_sonnet_20240620 = gen.Model{ Provider: Provider, Name: "claude-3-5-sonnet-20240620", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_5_sonnet_20241022 = gen.Model{ Provider: Provider, Name: "claude-3-5-sonnet-20241022", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_5_sonnet_latest = gen.Model{ Provider: Provider, Name: "claude-3-5-sonnet-latest", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_7_sonnet_20250219 = gen.Model{ Provider: Provider, Name: "claude-3-7-sonnet-20250219", InputMaxToken: 200_000, OutputMaxToken: 64_000, }
View Source
var GenModel_3_7_sonnet_latest = gen.Model{ Provider: Provider, Name: "claude-3-7-sonnet-latest", InputMaxToken: 200_000, OutputMaxToken: 64_000, }
https://docs.anthropic.com/en/docs/about-claude/models
View Source
var GenModel_3_haiku_20240307 = gen.Model{ Provider: Provider, Name: "claude-3-haiku-20240307", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_opus_20240229 = gen.Model{ Provider: Provider, Name: "claude-3-opus-20240229", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_3_opus_latest = gen.Model{ Provider: Provider, Name: "claude-3-opus-latest", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_4_0_opus_20250514 = gen.Model{ Provider: Provider, Name: "claude-opus-4-20250514", Description: "", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_4_0_sonnet_20250514 = gen.Model{ Provider: Provider, Name: "claude-sonnet-4-20250514", InputMaxToken: 200_000, OutputMaxToken: 64_000, }
View Source
var GenModels = map[string]gen.Model{ GenModel_3_5_sonnet_latest.Name: GenModel_3_5_sonnet_latest, GenModel_3_5_sonnet_20241022.Name: GenModel_3_5_sonnet_20241022, GenModel_3_5_haiku_latest.Name: GenModel_3_5_haiku_latest, GenModel_3_5_haiku_20241022.Name: GenModel_3_5_haiku_20241022, GenModel_3_opus_latest.Name: GenModel_3_opus_latest, GenModel_3_opus_20240229.Name: GenModel_3_opus_20240229, }
Functions ¶
This section is empty.
Types ¶
type ExtendedThinkingType ¶ added in v0.11.9
type ExtendedThinkingType string
const ( ExtendedThinkingTypeEnabled ExtendedThinkingType = "enabled" ExtendedThinkingTypeDisabled ExtendedThinkingType = "disabled" )
type JSONSchema ¶ added in v0.8.0
type JSONSchema struct {
Ref string `json:"$ref,omitempty"` // #/$defs/... etc, overrides everything else
Defs map[string]*JSONSchema `json:"$defs,omitempty"` // for $ref
// Type specifies the data type of the schema. OpenAI uses []string{Type, Null} to represent nullable types.
Type any `json:"type,omitempty"`
// Description is the description of the schema.
Description string `json:"description,omitempty"`
// Enum is used to restrict a value to a fixed set of values. It must be an array with at least
// one element, where each element is unique. You will probably only use this with strings.
Enum []any `json:"enum,omitempty"`
Pattern string `json:"pattern,omitempty"` // Regular expression that the string must match.
Format string `json:"format,omitempty"` // Format of the data, e.g. "email", "date-time", etc.
// Properties describes the properties of an object, if the schema type is Object.
Properties map[string]JSONSchema `json:"properties,omitempty"`
// Required specifies which properties are required, if the schema type is Object.
Required []string `json:"required,omitempty"`
// Items specifies which data type an array contains, if the schema type is Array.
Items *JSONSchema `json:"items,omitempty"`
// AdditionalProperties is used to control the handling of properties in an object
// that are not explicitly defined in the properties section of the schema. example:
// additionalProperties: true
// additionalProperties: false
// additionalProperties: jsonschema.JSONSchema{Type: jsonschema.String}
AdditionalProperties any `json:"additionalProperties,omitempty"`
Minimum float64 `json:"minimum,omitempty"` // Minimum value of the integer and number types.
Maximum float64 `json:"maximum,omitempty"` // Minimum value of the integer and number types.
MinItems int `json:"minItems,omitempty"` // Minimum number of items in an array.
MaxItems int `json:"maxItems,omitempty"` // Maximum number of items in an array.
}
Click to show internal directories.
Click to hide internal directories.