feat: 支持智谱GLM-4V

This commit is contained in:
1808837298@qq.com
2024-02-29 18:31:03 +08:00
parent a3687b72f8
commit b4645d1019
16 changed files with 483 additions and 578 deletions

View File

@@ -14,6 +14,7 @@ type GeneralOpenAIRequest struct {
MaxTokens uint `json:"max_tokens,omitempty"`
Temperature float64 `json:"temperature,omitempty"`
TopP float64 `json:"top_p,omitempty"`
Stop any `json:"stop,omitempty"`
N int `json:"n,omitempty"`
Input any `json:"input,omitempty"`
Instruction string `json:"instruction,omitempty"`

View File

@@ -35,9 +35,12 @@ type OpenAIEmbeddingResponse struct {
type ChatCompletionsStreamResponseChoice struct {
Delta struct {
Content string `json:"content"`
Content string `json:"content"`
Role string `json:"role,omitempty"`
ToolCalls any `json:"tool_calls,omitempty"`
} `json:"delta"`
FinishReason *string `json:"finish_reason,omitempty"`
Index int `json:"index,omitempty"`
}
type ChatCompletionsStreamResponse struct {