Commit d19a0533 by Calcium-Ion Committed by GitHub

Merge pull request #548 from utopeadia/main

ollama /api/embeddings is deprecated, use /api/embed.
parents c5633221 70eb30e9
...@@ -31,7 +31,7 @@ func (a *Adaptor) Init(info *relaycommon.RelayInfo) { ...@@ -31,7 +31,7 @@ func (a *Adaptor) Init(info *relaycommon.RelayInfo) {
func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
switch info.RelayMode { switch info.RelayMode {
case relayconstant.RelayModeEmbeddings: case relayconstant.RelayModeEmbeddings:
return info.BaseUrl + "/api/embeddings", nil return info.BaseUrl + "/api/embed", nil
default: default:
return relaycommon.GetFullRequestURL(info.BaseUrl, info.RequestURLPath, info.ChannelType), nil return relaycommon.GetFullRequestURL(info.BaseUrl, info.RequestURLPath, info.ChannelType), nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment