Skip to content

Commit

Permalink
修复向量模型无法正常处理字符串的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
stakeswky authored Jan 5, 2024
1 parent a47b89d commit b49972e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/service/core/ai/embedding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export async function getVectorsByText({
}
}
}

if (typeof input === 'string') {
input = [input];
}
try {
// 获取 chatAPI
const ai = getAIApi();
Expand Down

0 comments on commit b49972e

Please sign in to comment.