123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- import type { TypeWithI18N } from '../header/account-setting/model-provider-page/declarations'
- export enum LOC {
- tools = 'tools',
- app = 'app',
- }
- export enum AuthType {
- none = 'none',
- apiKey = 'api_key',
- }
- export enum AuthHeaderPrefix {
- basic = 'basic',
- bearer = 'bearer',
- custom = 'custom',
- }
- export type Credential = {
- 'auth_type': AuthType
- 'api_key_header'?: string
- 'api_key_value'?: string
- 'api_key_header_prefix'?: AuthHeaderPrefix
- }
- export enum CollectionType {
- all = 'all',
- builtIn = 'builtin',
- custom = 'api',
- model = 'model',
- workflow = 'workflow',
- }
- export type Emoji = {
- background: string
- content: string
- }
- export type Collection = {
- id: string
- name: string
- author: string
- description: TypeWithI18N
- icon: string | Emoji
- label: TypeWithI18N
- type: CollectionType
- team_credentials: Record<string, any>
- is_team_authorization: boolean
- allow_delete: boolean
- labels: string[]
- }
- export type ToolParameter = {
- name: string
- label: TypeWithI18N
- human_description: TypeWithI18N
- type: string
- form: string
- llm_description: string
- required: boolean
- default: string
- options?: {
- label: TypeWithI18N
- value: string
- }[]
- min?: number
- max?: number
- }
- export type Tool = {
- name: string
- author: string
- label: TypeWithI18N
- description: any
- parameters: ToolParameter[]
- labels: string[]
- }
- export type ToolCredential = {
- name: string
- label: TypeWithI18N
- help: TypeWithI18N
- placeholder: TypeWithI18N
- type: string
- required: boolean
- default: string
- options?: {
- label: TypeWithI18N
- value: string
- }[]
- }
- export type CustomCollectionBackend = {
- provider: string
- original_provider?: string
- credentials: Credential
- icon: Emoji
- schema_type: string
- schema: string
- privacy_policy: string
- custom_disclaimer: string
- tools?: ParamItem[]
- id: string
- labels: string[]
- }
- export type ParamItem = {
- name: string
- label: TypeWithI18N
- human_description: TypeWithI18N
- llm_description: string
- type: string
- form: string
- required: boolean
- default: string
- min?: number
- max?: number
- options?: {
- label: TypeWithI18N
- value: string
- }[]
- }
- export type CustomParamSchema = {
- operation_id: string // name
- summary: string
- server_url: string
- method: string
- parameters: ParamItem[]
- }
- export type WorkflowToolProviderParameter = {
- name: string
- form: string
- description: string
- required?: boolean
- type?: string
- }
- export type WorkflowToolProviderRequest = {
- name: string
- icon: Emoji
- description: string
- parameters: WorkflowToolProviderParameter[]
- labels: string[]
- privacy_policy: string
- }
- export type WorkflowToolProviderResponse = {
- workflow_app_id: string
- workflow_tool_id: string
- label: string
- name: string
- icon: Emoji
- description: string
- synced: boolean
- tool: {
- author: string
- name: string
- label: TypeWithI18N
- description: TypeWithI18N
- labels: string[]
- parameters: ParamItem[]
- }
- privacy_policy: string
- }
|