fix assistant image follow-up routing
This commit is contained in:
parent
65661a54c7
commit
4e3e6031d4
1 changed files with 4 additions and 1 deletions
|
|
@ -915,7 +915,10 @@ import { escapeAttr, escapeHtml, renderAssistantMarkdown, stripSourcesSection }
|
|||
}
|
||||
|
||||
function isImageRequest(text) {
|
||||
return /\b(generate|create|draw|make|render)\b[\s\S]{0,80}\b(image|picture|illustration|visual|infographic|diagram|flowchart)\b/i.test(text) ||
|
||||
text = String(text || '').trim();
|
||||
return /^(image|photo|picture|visual|illustration|diagram|figure|flowchart|infographic)$/i.test(text) ||
|
||||
/\b(show|see|display|view|image|photo|picture|visual|illustration|diagram|figure)\b/i.test(text) && text.split(/\s+/).length <= 6 ||
|
||||
/\b(generate|create|draw|make|render)\b[\s\S]{0,80}\b(image|picture|illustration|visual|infographic|diagram|flowchart)\b/i.test(text) ||
|
||||
/\b(generate|create|draw|make|render)\b[\s\S]{0,80}\b(an?|the)?\s*(algorithm|pathway|poster|teaching visual)\b/i.test(text);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue