feat: expand multimodal and knowledge workflows

This commit is contained in:
lofyer
2026-08-10 21:25:47 +08:00
parent 0fab985f28
commit ad79659308
38 changed files with 3036 additions and 2416 deletions
+9 -1
View File
@@ -105,6 +105,7 @@ export type ModelRuntimeOptions = {
model: string
protocol: ModelProtocol
authentication: ModelAuthentication
supportsImageInput?: boolean
imageGenerationQuality?: ImageGenerationQuality
skillInstructions?: string
defaultWorkspace?: string
@@ -1587,7 +1588,8 @@ export class ModelAgentRuntime implements AgentRuntime {
let decision: ApprovalDecision
try {
if (
(tool.name === 'knowledge_search' ||
(tool.name === 'knowledge_list' ||
tool.name === 'knowledge_search' ||
tool.name === 'note_search') &&
Boolean(request.knowledgeCapabilityToken)
) {
@@ -1756,6 +1758,12 @@ export class ModelAgentRuntime implements AgentRuntime {
yield* this.runImageGeneration(request, signal)
return
}
if (
request.images?.length &&
this.options.supportsImageInput !== true
) {
throw new Error('当前模型连接未启用图像输入')
}
yield {
requestId: request.requestId,