add encoding_format

Signed-off-by: wozulong <>
This commit is contained in:
wozulong 2024-08-26 18:39:13 +08:00
parent fefe5913e9
commit 27b034674d
5 changed files with 10 additions and 9 deletions

View File

@ -33,6 +33,7 @@ type GeneralOpenAIRequest struct {
TopLogProbs int `json:"top_logprobs,omitempty"`
Dimensions int `json:"dimensions,omitempty"`
ParallelToolCalls bool `json:"parallel_Tool_Calls,omitempty"`
EncodingFormat string `json:"encoding_format,omitempty"`
}
type OpenAITools struct {

View File

@ -43,7 +43,7 @@ type OpenAITextResponse struct {
type OpenAIEmbeddingResponseItem struct {
Object string `json:"object"`
Index int `json:"index"`
Embedding []float64 `json:"embedding"`
Embedding any `json:"embedding"`
}
type OpenAIEmbeddingResponse struct {

View File

@ -36,7 +36,7 @@ type AliEmbeddingRequest struct {
}
type AliEmbedding struct {
Embedding []float64 `json:"embedding"`
Embedding any `json:"embedding"`
TextIndex int `json:"text_index"`
}

View File

@ -51,7 +51,7 @@ type BaiduEmbeddingRequest struct {
type BaiduEmbeddingData struct {
Object string `json:"object"`
Embedding []float64 `json:"embedding"`
Embedding any `json:"embedding"`
Index int `json:"index"`
}

View File

@ -23,5 +23,5 @@ type OllamaEmbeddingRequest struct {
}
type OllamaEmbeddingResponse struct {
Embedding []float64 `json:"embedding,omitempty"`
Embedding any `json:"embedding,omitempty"`
}