Documentation
¶
Index ¶
- func GetSchemas(schema *OpenAPISchema) map[string]SchemaProperty
- type Config
- type ConfigSchema
- type EndpointSchema
- type ExtraHeader
- type ModelMap
- type OpenAPISchema
- type Property
- type Provider
- type ProviderConfig
- type SchemaField
- type SchemaProperty
- type Section
- type Setting
- type Transform
- type TransformMap
- type TransformRef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSchemas ¶
func GetSchemas(schema *OpenAPISchema) map[string]SchemaProperty
Types ¶
type Config ¶ added in v0.2.21
type Config struct {
XConfig ConfigSchema `yaml:"x-config"`
}
type ConfigSchema ¶
type EndpointSchema ¶
type ExtraHeader ¶
type ExtraHeader struct {
Values []string
}
ExtraHeader can be either string or []string
func (*ExtraHeader) UnmarshalYAML ¶
func (h *ExtraHeader) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML implements custom unmarshaling for ExtraHeader
type ModelMap ¶
type ModelMap struct { Source string `yaml:"source,omitempty"` Transform []TransformRef `yaml:"transform"` }
type OpenAPISchema ¶
type OpenAPISchema struct { Components struct { Schemas struct { Config Config `yaml:"Config"` Provider Provider `yaml:"Provider"` ProviderAuthType SchemaProperty `yaml:"ProviderAuthType"` MessageRole SchemaProperty `yaml:"MessageRole"` Message SchemaProperty `yaml:"Message"` Model SchemaProperty `yaml:"Model"` ListModelsResponse SchemaProperty `yaml:"ListModelsResponse"` Endpoints SchemaProperty `yaml:"Endpoints"` Error SchemaProperty `yaml:"Error"` FunctionObject SchemaProperty `yaml:"FunctionObject"` FunctionParameters SchemaProperty `yaml:"FunctionParameters"` FinishReason SchemaProperty `yaml:"FinishReason"` CompletionUsage SchemaProperty `yaml:"CompletionUsage"` ChatCompletionToolType SchemaProperty `yaml:"ChatCompletionToolType"` ChatCompletionTool SchemaProperty `yaml:"ChatCompletionTool"` ChatCompletionChoice SchemaProperty `yaml:"ChatCompletionChoice"` ChatCompletionStreamChoice SchemaProperty `yaml:"ChatCompletionStreamChoice"` CreateChatCompletionRequest SchemaProperty `yaml:"CreateChatCompletionRequest"` CreateCompletionRequest SchemaProperty `yaml:"CreateCompletionRequest"` CreateChatCompletionResponse SchemaProperty `yaml:"CreateChatCompletionResponse"` ChatCompletionStreamOptions SchemaProperty `yaml:"ChatCompletionStreamOptions"` CreateChatCompletionStreamResponse SchemaProperty `yaml:"CreateChatCompletionStreamResponse"` ChatCompletionStreamResponseDelta SchemaProperty `yaml:"ChatCompletionStreamResponseDelta"` ChatCompletionMessageToolCallChunk SchemaProperty `yaml:"ChatCompletionMessageToolCallChunk"` ChatCompletionMessageToolCall SchemaProperty `yaml:"ChatCompletionMessageToolCall"` ChatCompletionMessageToolCallFunction SchemaProperty `yaml:"ChatCompletionMessageToolCallFunction"` ListToolsResponse SchemaProperty `yaml:"ListToolsResponse"` MCPTool SchemaProperty `yaml:"MCPTool"` MCPNotExposed SchemaProperty `yaml:"MCPNotExposed"` ListAgentsResponse SchemaProperty `yaml:"ListAgentsResponse"` A2ANotExposed SchemaProperty `yaml:"A2ANotExposed"` A2AAgentCard SchemaProperty `yaml:"A2AAgentCard"` } } }
OpenAPI schema structures
func Read ¶
func Read(openapi string) (*OpenAPISchema, error)
type Property ¶
type Property struct { Name string `yaml:"name,omitempty"` Type string `yaml:"type"` Format string `yaml:"format,omitempty"` Description string `yaml:"description,omitempty"` Ref string `yaml:"$ref,omitempty"` Enum []string `yaml:"enum,omitempty"` Properties map[string]Property `yaml:"properties,omitempty"` Items *Property `yaml:"items,omitempty"` AdditionalProperties *bool `yaml:"additionalProperties,omitempty"` }
type Provider ¶ added in v0.2.22
type Provider struct {
XProviderConfigs map[string]ProviderConfig `yaml:"x-provider-configs"`
}
type ProviderConfig ¶
type ProviderConfig struct { ID string `yaml:"id"` URL string `yaml:"url"` AuthType string `yaml:"auth_type"` ExtraHeaders map[string]ExtraHeader `yaml:"extra_headers"` Endpoints map[string]EndpointSchema `yaml:"endpoints"` }
type SchemaField ¶
type SchemaField struct { Type string `yaml:"type"` Properties map[string]SchemaField `yaml:"properties"` Items *SchemaField `yaml:"items"` Ref string `yaml:"$ref"` }
type SchemaProperty ¶
type SchemaProperty struct { Type string `yaml:"type"` Description string `yaml:"description"` Properties map[string]Property `yaml:"properties"` Required []string `yaml:"required,omitempty"` Items *Property `yaml:"items,omitempty"` Enum []string `yaml:"enum,omitempty"` AdditionalProperties *bool `yaml:"additionalProperties,omitempty"` }
type Transform ¶
type Transform struct { Target string `yaml:"target"` Mapping TransformMap `yaml:"mapping"` }
type TransformMap ¶
type TransformRef ¶
Click to show internal directories.
Click to hide internal directories.