mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-23 15:56:41 +08:00
feat: support upload image
This commit is contained in:
39
types/app.ts
39
types/app.ts
@ -77,6 +77,7 @@ export type IChatItem = {
|
||||
isIntroduction?: boolean
|
||||
useCurrentUserAvatar?: boolean
|
||||
isOpeningStatement?: boolean
|
||||
message_files?: VisionFile[]
|
||||
}
|
||||
|
||||
export type ResponseHolder = {}
|
||||
@ -95,3 +96,41 @@ export type AppInfo = {
|
||||
copyright?: string
|
||||
privacy_policy?: string
|
||||
}
|
||||
|
||||
export enum Resolution {
|
||||
low = 'low',
|
||||
high = 'high',
|
||||
}
|
||||
|
||||
export enum TransferMethod {
|
||||
all = 'all',
|
||||
local_file = 'local_file',
|
||||
remote_url = 'remote_url',
|
||||
}
|
||||
|
||||
export type VisionSettings = {
|
||||
enabled: boolean
|
||||
number_limits: number
|
||||
detail: Resolution
|
||||
transfer_methods: TransferMethod[]
|
||||
image_file_size_limit?: number | string
|
||||
}
|
||||
|
||||
export type ImageFile = {
|
||||
type: TransferMethod
|
||||
_id: string
|
||||
fileId: string
|
||||
file?: File
|
||||
progress: number
|
||||
url: string
|
||||
base64Url?: string
|
||||
deleted?: boolean
|
||||
}
|
||||
|
||||
export type VisionFile = {
|
||||
id?: string
|
||||
type: string
|
||||
transfer_method: TransferMethod
|
||||
url: string
|
||||
upload_file_id: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user