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 BaseResp
- type Chat
- type ClientRequest
- type CompletionTokensDetails
- type Config
- type Converter
- 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"`
}
* 返回示例
{ "id": "03c13c50d5d579fc940572bb6fdf6f0a", "choices": [ { "finish_reason": "stop", "index": 0, "message": { "content": "I’m a language model, so I can answer questions about language, or about the world.", "role": "assistant", "name": "MM智能助理", "audio_content": "" } } ], "created": 1735526736, "model": "abab6.5s-chat", "object": "chat.completion", "usage": { "total_tokens": 94, "total_characters": 0, "prompt_tokens": 75, "completion_tokens": 19 }, "input_sensitive": false, "output_sensitive": false, "input_sensitive_type": 0, "output_sensitive_type": 0, "output_sensitive_int": 0, "base_resp": { "status_code": 0, "status_msg": "" } }
type CompletionTokensDetails ¶
type CompletionTokensDetails struct {
ReasoningTokens int `json:"reasoning_tokens"`
}
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func (*Converter) RequestConvert ¶
type IModelMode ¶
type IModelMode interface { Endpoint() string convert.IConverter }
type ModelConfig ¶
type ResponseChoice ¶
Click to show internal directories.
Click to hide internal directories.