mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 18:43:41 +08:00
Merge branch 'upstream/main'
This commit is contained in:
@@ -37,16 +37,16 @@ func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) {
|
||||
action := ""
|
||||
switch meta.Mode {
|
||||
case relaymode.Embeddings:
|
||||
action = "batchEmbedContents?"
|
||||
action = "batchEmbedContents"
|
||||
default:
|
||||
action = "generateContent?"
|
||||
action = "generateContent"
|
||||
}
|
||||
|
||||
if meta.IsStream {
|
||||
action = "streamGenerateContent?alt=sse&"
|
||||
action = "streamGenerateContent?alt=sse"
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s/%s/models/%s:%skey=%s", meta.BaseURL, version, meta.ActualModelName, action, meta.APIKey), nil
|
||||
return fmt.Sprintf("%s/%s/models/%s:%s", meta.BaseURL, version, meta.ActualModelName, action), nil
|
||||
}
|
||||
|
||||
func (a *Adaptor) SetupRequestHeader(c *gin.Context, req *http.Request, meta *meta.Meta) error {
|
||||
|
||||
Reference in New Issue
Block a user