mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-11 10:53:42 +08:00
feat: 支持 ollama 的 embedding 接口 (#1221)
* 增加ollama的embedding接口 * chore: fix function name --------- Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
@@ -35,3 +35,13 @@ type ChatResponse struct {
|
||||
EvalDuration int `json:"eval_duration,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type EmbeddingRequest struct {
|
||||
Model string `json:"model"`
|
||||
Prompt string `json:"prompt"`
|
||||
}
|
||||
|
||||
type EmbeddingResponse struct {
|
||||
Error string `json:"error,omitempty"`
|
||||
Embedding []float64 `json:"embedding,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user