Documentation ¶
Index ¶
- func Create(id, name string, v *Config, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)
- func NewFactory() eosc.IExtenderDriverFactory
- func Register(register eosc.IExtenderDriverRegister)
- type Chat
- type ClientRequest
- type CompletionTokensDetails
- type Config
- type Converter
- type Error
- type IModelMode
- type Message
- type ModelConfig
- type Response
- type ResponseChoice
- type Usage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
func (*Chat) RequestConvert ¶
type ClientRequest ¶
type ClientRequest struct {
Messages []*Message `json:"messages"`
}
type CompletionTokensDetails ¶
type CompletionTokensDetails struct {
ReasoningTokens int `json:"reasoning_tokens"`
}
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func (*Converter) RequestConvert ¶
type Error ¶ added in v0.19.5
type Error struct { Message string `json:"message"` Code int `json:"code"` Metadata struct { Raw string `json:"raw"` ProviderName string `json:"provider_name"` } `json:"metadata"` }
Error represents the error response from the provider. {"error":{"message":"Provider returned error","code":400,"metadata":{"raw":"{\n \"error\": {\n \"message\": \"Invalid value: 'yyy'. Supported values are: 'system', 'assistant', 'user', 'function', 'tool', and 'developer'.\",\n \"type\": \"invalid_request_error\",\n \"param\": \"messages[0].role\",\n \"code\": \"invalid_value\"\n }\n}","provider_name":"OpenAI"}},"user_id":"user_2nQFDPHnNOxsrry6JpmcPXFzfnC"}
type IModelMode ¶
type IModelMode interface { Endpoint() string convert.IConverter }
type ModelConfig ¶
type ResponseChoice ¶
Click to show internal directories.
Click to hide internal directories.