Commit 160cb285 by NyaMisty Committed by GitHub

fix(zhipu_4v): use correct endpoint for coding plan image generation (#4146)

parent 78e4cb3c
...@@ -64,6 +64,9 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) { ...@@ -64,6 +64,9 @@ func (a *Adaptor) GetRequestURL(info *relaycommon.RelayInfo) (string, error) {
} }
return fmt.Sprintf("%s/api/paas/v4/embeddings", baseURL), nil return fmt.Sprintf("%s/api/paas/v4/embeddings", baseURL), nil
case relayconstant.RelayModeImagesGenerations: case relayconstant.RelayModeImagesGenerations:
if hasSpecialPlan && specialPlan.OpenAIBaseURL != "" {
return fmt.Sprintf("%s/images/generations", specialPlan.OpenAIBaseURL), nil
}
return fmt.Sprintf("%s/api/paas/v4/images/generations", baseURL), nil return fmt.Sprintf("%s/api/paas/v4/images/generations", baseURL), nil
default: default:
if hasSpecialPlan && specialPlan.OpenAIBaseURL != "" { if hasSpecialPlan && specialPlan.OpenAIBaseURL != "" {
......
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