refactor: update installed app component to handle missing params and improve type safety (#27331)

This commit is contained in:
GuanMu
2025-10-27 14:38:58 +08:00
committed by GitHub
parent f06025a342
commit 43bcf40f80
49 changed files with 531 additions and 302 deletions

View File

@@ -9,6 +9,7 @@ import type {
MetadataFilteringModeEnum,
} from '@/app/components/workflow/nodes/knowledge-retrieval/types'
import type { ModelConfig as NodeModelConfig } from '@/app/components/workflow/types'
import type { ExternalDataTool } from '@/models/common'
export type Inputs = Record<string, string | number | object | boolean>
export enum PromptMode {
@@ -133,6 +134,8 @@ export type ModelConfig = {
model_id: string
mode: ModelModeType
configs: PromptConfig
chat_prompt_config?: ChatPromptConfig | null
completion_prompt_config?: CompletionPromptConfig | null
opening_statement: string | null
more_like_this: MoreLikeThisConfig | null
suggested_questions: string[] | null
@@ -143,6 +146,14 @@ export type ModelConfig = {
retriever_resource: RetrieverResourceConfig | null
sensitive_word_avoidance: ModerationConfig | null
annotation_reply: AnnotationReplyConfig | null
external_data_tools?: ExternalDataTool[] | null
system_parameters: {
audio_file_size_limit: number
file_size_limit: number
image_file_size_limit: number
video_file_size_limit: number
workflow_file_upload_limit: number
}
dataSets: any[]
agentConfig: AgentConfig
}