diff --git a/dto/text_request.go b/dto/text_request.go index 7efe5ba..132787c 100644 --- a/dto/text_request.go +++ b/dto/text_request.go @@ -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 { diff --git a/dto/text_response.go b/dto/text_response.go index 9b12683..ba8218a 100644 --- a/dto/text_response.go +++ b/dto/text_response.go @@ -41,9 +41,9 @@ type OpenAITextResponse struct { } type OpenAIEmbeddingResponseItem struct { - Object string `json:"object"` - Index int `json:"index"` - Embedding []float64 `json:"embedding"` + Object string `json:"object"` + Index int `json:"index"` + Embedding any `json:"embedding"` } type OpenAIEmbeddingResponse struct { diff --git a/relay/channel/ali/dto.go b/relay/channel/ali/dto.go index f51286a..0516501 100644 --- a/relay/channel/ali/dto.go +++ b/relay/channel/ali/dto.go @@ -36,8 +36,8 @@ type AliEmbeddingRequest struct { } type AliEmbedding struct { - Embedding []float64 `json:"embedding"` - TextIndex int `json:"text_index"` + Embedding any `json:"embedding"` + TextIndex int `json:"text_index"` } type AliEmbeddingResponse struct { diff --git a/relay/channel/baidu/dto.go b/relay/channel/baidu/dto.go index f0c6f04..2683a64 100644 --- a/relay/channel/baidu/dto.go +++ b/relay/channel/baidu/dto.go @@ -50,9 +50,9 @@ type BaiduEmbeddingRequest struct { } type BaiduEmbeddingData struct { - Object string `json:"object"` - Embedding []float64 `json:"embedding"` - Index int `json:"index"` + Object string `json:"object"` + Embedding any `json:"embedding"` + Index int `json:"index"` } type BaiduEmbeddingResponse struct { diff --git a/relay/channel/ollama/dto.go b/relay/channel/ollama/dto.go index fac6b7f..12d5bd3 100644 --- a/relay/channel/ollama/dto.go +++ b/relay/channel/ollama/dto.go @@ -23,5 +23,5 @@ type OllamaEmbeddingRequest struct { } type OllamaEmbeddingResponse struct { - Embedding []float64 `json:"embedding,omitempty"` + Embedding any `json:"embedding,omitempty"` }