refactor: update installed app component to handle missing params and improve type safety (#27331)
This commit is contained in:
@@ -8,6 +8,7 @@ import type {
|
||||
} from '@/models/datasets'
|
||||
import type { UploadFileSetting } from '@/app/components/workflow/types'
|
||||
import type { AccessMode } from '@/models/access-control'
|
||||
import type { ExternalDataTool } from '@/models/common'
|
||||
|
||||
export enum Theme {
|
||||
light = 'light',
|
||||
@@ -206,12 +207,12 @@ export type ModelConfig = {
|
||||
suggested_questions?: string[]
|
||||
pre_prompt: string
|
||||
prompt_type: PromptMode
|
||||
chat_prompt_config: ChatPromptConfig | {}
|
||||
completion_prompt_config: CompletionPromptConfig | {}
|
||||
chat_prompt_config?: ChatPromptConfig | null
|
||||
completion_prompt_config?: CompletionPromptConfig | null
|
||||
user_input_form: UserInputFormItem[]
|
||||
dataset_query_variable?: string
|
||||
more_like_this: {
|
||||
enabled?: boolean
|
||||
enabled: boolean
|
||||
}
|
||||
suggested_questions_after_answer: {
|
||||
enabled: boolean
|
||||
@@ -237,12 +238,20 @@ export type ModelConfig = {
|
||||
strategy?: AgentStrategy
|
||||
tools: ToolItem[]
|
||||
}
|
||||
external_data_tools?: ExternalDataTool[]
|
||||
model: Model
|
||||
dataset_configs: DatasetConfigs
|
||||
file_upload?: {
|
||||
image: VisionSettings
|
||||
} & UploadFileSetting
|
||||
files?: VisionFile[]
|
||||
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
|
||||
}
|
||||
created_at?: number
|
||||
updated_at?: number
|
||||
}
|
||||
@@ -360,6 +369,7 @@ export type App = {
|
||||
updated_at: number
|
||||
updated_by?: string
|
||||
}
|
||||
deleted_tools?: Array<{ id: string; tool_name: string }>
|
||||
/** access control */
|
||||
access_mode: AccessMode
|
||||
max_active_requests?: number | null
|
||||
|
||||
Reference in New Issue
Block a user