feat(dingtalk): enable secure multimodal image QA

This commit is contained in:
姚章浩
2026-07-16 00:17:16 +08:00
parent 4022040e98
commit c9c4f0aaa5
59 changed files with 3279 additions and 429 deletions
+10 -9
View File
@@ -221,15 +221,16 @@ func (c *ChatManage) Clone() *ChatManage {
Images: append([]string(nil), c.Images...),
VLMModelID: c.VLMModelID,
ChatModelSupportsVision: c.ChatModelSupportsVision,
Attachments: append(MessageAttachments(nil), c.Attachments...),
TenantID: c.TenantID,
WebSearchEnabled: c.WebSearchEnabled,
WebSearchProviderID: c.WebSearchProviderID,
WebSearchMaxResults: c.WebSearchMaxResults,
WebFetchEnabled: c.WebFetchEnabled,
WebFetchTopN: c.WebFetchTopN,
Language: c.Language,
IntentPromptOverrides: maps.Clone(c.IntentPromptOverrides),
Attachments: append(MessageAttachments(nil), c.Attachments...),
TenantID: c.TenantID,
WebSearchEnabled: c.WebSearchEnabled,
WebSearchProviderID: c.WebSearchProviderID,
WebSearchMaxResults: c.WebSearchMaxResults,
WebFetchEnabled: c.WebFetchEnabled,
WebFetchTopN: c.WebFetchTopN,
Language: c.Language,
IntentPromptOverrides: maps.Clone(c.IntentPromptOverrides),
},
PipelineState: PipelineState{
RewriteQuery: c.RewriteQuery,
+18 -17
View File
@@ -4,21 +4,22 @@ package types
// replacing the previous 14-parameter method signatures.
// EventBus is passed separately to avoid circular dependency with the event package.
type QARequest struct {
Session *Session // The conversation session
Query string // User query text
AssistantMessageID string // Pre-created assistant message ID
SummaryModelID string // Optional model override; empty = use agent/KB default
CustomAgent *CustomAgent // Optional custom agent for config override
KnowledgeBaseIDs []string // Knowledge base IDs to search (from request + @mentions)
KnowledgeIDs []string // Specific knowledge (file) IDs to search
TagScopes []TagScope // Tag-constrained KB scopes from @mentions
MCPServiceIDs []string // Per-request MCP service IDs from @mentions
SkillNames []string // Per-request preloaded skill names from @mentions
ImageURLs []string // Image URLs for multimodal input
ImageDescription string // VLM-generated image description (fallback for non-vision models)
UserMessageID string // Created user message ID
WebSearchEnabled bool // Whether web search is enabled for this request
EnableMemory bool // Whether memory feature is enabled
QuotedContext string // Quoted message content from IM quote-reply (appended at LLM prompt stage, not used for retrieval)
Attachments MessageAttachments // File attachments (processed and ready for prompt injection)
Session *Session // The conversation session
Query string // User query text
AssistantMessageID string // Pre-created assistant message ID
SummaryModelID string // Optional model override; empty = use agent/KB default
CustomAgent *CustomAgent // Optional custom agent for config override
KnowledgeBaseIDs []string // Knowledge base IDs to search (from request + @mentions)
KnowledgeIDs []string // Specific knowledge (file) IDs to search
TagScopes []TagScope // Tag-constrained KB scopes from @mentions
MCPServiceIDs []string // Per-request MCP service IDs from @mentions
SkillNames []string // Per-request preloaded skill names from @mentions
ImageURLs []string // Image URLs for multimodal input
ImageDescription string // VLM-generated image description (fallback for non-vision models)
UserMessageID string // Created user message ID
WebSearchEnabled bool // Whether web search is enabled for this request
EnableMemory bool // Whether memory feature is enabled
QuotedContext string // Quoted message content from IM quote-reply (appended at LLM prompt stage, not used for retrieval)
Attachments MessageAttachments // File attachments (processed and ready for prompt injection)
}