wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/tools/types.ts
@@ -1,5 +1,4 @@
import type { TypeWithI18N } from '../header/account-setting/model-provider-page/declarations'
export enum LOC {
  tools = 'tools',
  app = 'app',
@@ -17,10 +16,10 @@
}
export type Credential = {
  auth_type: AuthType
  api_key_header?: string
  api_key_value?: string
  api_key_header_prefix?: AuthHeaderPrefix
  'auth_type': AuthType
  'api_key_header'?: string
  'api_key_value'?: string
  'api_key_header_prefix'?: AuthHeaderPrefix
}
export enum CollectionType {
@@ -48,8 +47,6 @@
  is_team_authorization: boolean
  allow_delete: boolean
  labels: string[]
  plugin_id?: string
  letter?: string
}
export type ToolParameter = {
@@ -69,7 +66,6 @@
  max?: number
}
// Action
export type Tool = {
  name: string
  author: string
@@ -77,13 +73,12 @@
  description: any
  parameters: ToolParameter[]
  labels: string[]
  output_schema: Record<string, any>
}
export type ToolCredential = {
  name: string
  label: TypeWithI18N
  help: TypeWithI18N | null
  help: TypeWithI18N
  placeholder: TypeWithI18N
  type: string
  required: boolean