Skip to content

Commit

Permalink
修复传model值时未进行智能体ID识别处理
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Mar 27, 2024
1 parent e2cf522 commit fee72ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/routes/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export default {
const token = _.sample(tokens);
const prompt = request.body.prompt;
const responseFormat = _.defaultTo(request.body.response_format, "url");
const model = request.body.model;
const imageUrls = await chat.generateImages(model, prompt, token);
const assistantId = /^[a-z0-9]{24,}$/.test(request.body.model) ? request.body.model : undefined
const imageUrls = await chat.generateImages(assistantId, prompt, token);
let data = [];
if (responseFormat == "b64_json") {
data = (
Expand Down

0 comments on commit fee72ca

Please sign in to comment.