diff --git a/packages/service/core/ai/embedding/index.ts b/packages/service/core/ai/embedding/index.ts index 501130923..88edfa74b 100644 --- a/packages/service/core/ai/embedding/index.ts +++ b/packages/service/core/ai/embedding/index.ts @@ -25,7 +25,9 @@ export async function getVectorsByText({ } } } - + if (typeof input === 'string') { + input = [input]; + } try { // 获取 chatAPI const ai = getAIApi();