feat send base64 or url

This commit is contained in:
Yanyutin753
2024-03-07 23:33:32 +08:00
parent 79a863c636
commit 7fd9653e7c
6 changed files with 21 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ export class ChatGPTApi implements LLMApi {
});
if (v.image_url) {
let image_url_data = "";
if (process.env.NEXT_PUBLIC_ENABLE_BASE64) {
if (options.config.updateTypes) {
var base64Data = await getImageBase64Data(v.image_url);
let mimeType: string | null;
try {
@@ -347,6 +347,7 @@ export class ChatGPTApi implements LLMApi {
baseUrl: baseUrl,
maxIterations: options.agentConfig.maxIterations,
returnIntermediateSteps: options.agentConfig.returnIntermediateSteps,
updateTypes: modelConfig.updateTypes,
useTools: options.agentConfig.useTools,
};