We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f5c3dab + cf2d305 commit 3b7d9e3Copy full SHA for 3b7d9e3
packages/plugin-node/src/services/image.ts
@@ -206,10 +206,11 @@ export class ImageDescriptionService
206
},
207
208
];
209
-
+ // If model provider is openai, use the endpoint, otherwise use the default openai endpoint.
210
const endpoint =
211
- models[this.runtime.imageModelProvider].endpoint ??
212
- "https://api.openai.com/v1";
+ this.runtime.imageModelProvider === ModelProviderName.OPENAI
+ ? models[this.runtime.imageModelProvider].endpoint
213
+ : "https://api.openai.com/v1";
214
215
const response = await fetch(endpoint + "/chat/completions", {
216
method: "POST",
0 commit comments