From 3390e1214c79d8e4a7254292fc285da3fe1d35b6 Mon Sep 17 00:00:00 2001 From: Eric Zawadski Date: Mon, 13 Jan 2025 07:31:32 -0800 Subject: [PATCH] chore(assistants_web): re-generated client --- .../generated/CohereClientGenerated.ts | 36 + .../cohere-client/generated/schemas.gen.ts | 908 ++++++---- .../cohere-client/generated/services.gen.ts | 592 ++----- .../src/cohere-client/generated/types.gen.ts | 1465 ++++++++++++++++- 4 files changed, 2190 insertions(+), 811 deletions(-) diff --git a/src/interfaces/assistants_web/src/cohere-client/generated/CohereClientGenerated.ts b/src/interfaces/assistants_web/src/cohere-client/generated/CohereClientGenerated.ts index cfaddf29c2..c4a8407f0d 100644 --- a/src/interfaces/assistants_web/src/cohere-client/generated/CohereClientGenerated.ts +++ b/src/interfaces/assistants_web/src/cohere-client/generated/CohereClientGenerated.ts @@ -2,12 +2,36 @@ import type { BaseHttpRequest } from './core/BaseHttpRequest'; import { FetchHttpRequest } from './core/FetchHttpRequest'; import type { OpenAPIConfig } from './core/OpenAPI'; import { Interceptors } from './core/OpenAPI'; +import { AgentsService } from './services.gen'; +import { AuthService } from './services.gen'; +import { ChatService } from './services.gen'; +import { ConversationService } from './services.gen'; import { DefaultService } from './services.gen'; +import { DeploymentService } from './services.gen'; +import { ExperimentalFeaturesService } from './services.gen'; +import { ModelService } from './services.gen'; +import { OrganizationService } from './services.gen'; +import { ScimService } from './services.gen'; +import { SnapshotService } from './services.gen'; +import { ToolService } from './services.gen'; +import { UserService } from './services.gen'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class CohereClientGenerated { + public readonly agents: AgentsService; + public readonly auth: AuthService; + public readonly chat: ChatService; + public readonly conversation: ConversationService; public readonly default: DefaultService; + public readonly deployment: DeploymentService; + public readonly experimentalFeatures: ExperimentalFeaturesService; + public readonly model: ModelService; + public readonly organization: OrganizationService; + public readonly scim: ScimService; + public readonly snapshot: SnapshotService; + public readonly tool: ToolService; + public readonly user: UserService; public readonly request: BaseHttpRequest; @@ -31,6 +55,18 @@ export class CohereClientGenerated { }, }); + this.agents = new AgentsService(this.request); + this.auth = new AuthService(this.request); + this.chat = new ChatService(this.request); + this.conversation = new ConversationService(this.request); this.default = new DefaultService(this.request); + this.deployment = new DeploymentService(this.request); + this.experimentalFeatures = new ExperimentalFeaturesService(this.request); + this.model = new ModelService(this.request); + this.organization = new OrganizationService(this.request); + this.scim = new ScimService(this.request); + this.snapshot = new SnapshotService(this.request); + this.tool = new ToolService(this.request); + this.user = new UserService(this.request); } } diff --git a/src/interfaces/assistants_web/src/cohere-client/generated/schemas.gen.ts b/src/interfaces/assistants_web/src/cohere-client/generated/schemas.gen.ts index 940660f092..090f59709e 100644 --- a/src/interfaces/assistants_web/src/cohere-client/generated/schemas.gen.ts +++ b/src/interfaces/assistants_web/src/cohere-client/generated/schemas.gen.ts @@ -243,6 +243,49 @@ export const $AgentVisibility = { description: 'Supported values for Agent Visibility', } as const; +export const $AuthStrategy = { + properties: { + strategy: { + type: 'string', + title: 'Strategy', + description: 'Auth strategy name', + }, + client_id: { + anyOf: [ + { + type: 'string', + }, + { + type: 'null', + }, + ], + title: 'Client ID', + description: 'Client ID to be used', + }, + authorization_endpoint: { + anyOf: [ + { + type: 'string', + }, + { + type: 'null', + }, + ], + title: 'Authorization Endpoint', + description: 'The endpoint for authorization', + }, + pkce_enabled: { + type: 'boolean', + title: 'PKCE Enabled', + description: 'If PKCE is enabled', + }, + }, + type: 'object', + required: ['strategy', 'pkce_enabled'], + title: 'AuthStrategy', + description: 'Auth Strategy', +} as const; + export const $Body_batch_upload_file_v1_agents_batch_upload_file_post = { properties: { files: { @@ -283,7 +326,7 @@ export const $ChatMessage = { properties: { role: { $ref: '#/components/schemas/ChatRole', - title: 'One of CHATBOT|USER|SYSTEM to identify who the message is coming from.', + title: 'Role', }, message: { anyOf: [ @@ -294,7 +337,8 @@ export const $ChatMessage = { type: 'null', }, ], - title: 'Contents of the chat message.', + title: 'Message', + description: 'Contents of the chat message.', }, tool_plan: { anyOf: [ @@ -305,7 +349,8 @@ export const $ChatMessage = { type: 'null', }, ], - title: 'Contents of the tool plan.', + title: 'Tool Plan', + description: 'Contents of the tool plan.', }, tool_results: { anyOf: [ @@ -319,7 +364,8 @@ export const $ChatMessage = { type: 'null', }, ], - title: 'Results from the tool call.', + title: 'Tool Results', + description: 'Results from the tool call.', }, tool_calls: { anyOf: [ @@ -333,21 +379,23 @@ export const $ChatMessage = { type: 'null', }, ], - title: 'List of tool calls generated for custom tools', + title: 'Tool Calls', + description: 'List of tool calls generated for custom tools', }, }, type: 'object', required: ['role'], title: 'ChatMessage', - description: - "A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's message.", + description: `A list of previous messages between the user and the model, meant to give the mode +conversational context for responding to the user's message.`, } as const; export const $ChatResponseEvent = { properties: { event: { $ref: '#/components/schemas/StreamEvent', - title: 'type of stream event', + title: 'Event', + description: 'Type of stream event', }, data: { anyOf: [ @@ -388,12 +436,14 @@ export const $ChatResponseEvent = { $ref: '#/components/schemas/NonStreamedChatResponse', }, ], - title: 'Data returned from chat response of a given event type', + title: 'Data', + description: 'Data returned from chat response of a given event type', }, }, type: 'object', required: ['event', 'data'], title: 'ChatResponseEvent', + description: 'Chat Response Event', } as const; export const $ChatRole = { @@ -408,26 +458,31 @@ export const $Citation = { text: { type: 'string', title: 'Text', + description: 'Citation text', }, start: { type: 'integer', title: 'Start', + description: 'Start position for the citation', }, end: { type: 'integer', title: 'End', + description: 'End position for the citation', }, document_ids: { items: { type: 'string', }, type: 'array', - title: 'Document Ids', + title: 'Document IDs', + description: 'Documents used for the citation', }, }, type: 'object', required: ['text', 'start', 'end', 'document_ids'], title: 'Citation', + description: 'Schema for a citation', } as const; export const $CohereChatPromptTruncation = { @@ -441,7 +496,8 @@ export const $CohereChatRequest = { properties: { message: { type: 'string', - title: 'The message to send to the chatbot.', + title: 'Message', + description: 'The message to send to the chatbot', }, chat_history: { anyOf: [ @@ -455,12 +511,14 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Chat History', + description: 'A list of entries used to construct the conversation. If provided, these messages will be used to build the prompt and the conversation_id will be ignored so no data will be stored to maintain state.', }, conversation_id: { type: 'string', - title: + title: 'Conversation ID', + description: 'To store a conversation then create a conversation id and use it for every related request', }, tools: { @@ -475,7 +533,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: ` + title: 'Tools', + description: ` List of custom or managed tools to use for the response. If passing in managed tools, you only need to provide the name of the tool. If passing in custom tools, you need to provide the name, description, and optionally parameter defintions of the tool. @@ -532,7 +591,8 @@ export const $CohereChatRequest = { type: 'object', }, type: 'array', - title: `Documents to use to generate grounded response with citations. Example: + title: 'Documents', + description: `Documents to use to generate grounded response with citations. Example: documents=[ { "id": "national_geographic_everest", @@ -558,7 +618,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: 'The model to use for generating the response.', + title: 'Model', + description: 'The model to use for generating the response.', default: 'command-r-plus', }, temperature: { @@ -571,7 +632,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Temperature', + description: 'A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.', }, k: { @@ -585,7 +647,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Top-K', + description: 'Ensures only the top k most likely tokens are considered for generation at each step.', }, p: { @@ -599,7 +662,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Top-P', + description: 'Ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. If both k and p are enabled, p acts after k.', }, preamble: { @@ -611,7 +675,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: 'A string to override the preamble.', + title: 'Preamble', + description: 'A string to override the preamble.', }, file_ids: { anyOf: [ @@ -625,7 +690,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: 'List of File IDs for PDFs used in RAG for the response.', + title: 'File IDs', + description: 'List of File IDs for PDFs used in RAG for the response.', }, search_queries_only: { anyOf: [ @@ -636,7 +702,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Search Queries Only', + description: "When set to true a list of search queries are generated. No search will occur nor replies to the user's message.", default: false, }, @@ -650,7 +717,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Max Tokens', + description: 'The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations.', }, seed: { @@ -662,7 +730,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Seed', + description: 'If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed.', }, stop_sequences: { @@ -677,7 +746,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Stop Sequences', + description: 'A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence.', }, presence_penalty: { @@ -691,7 +761,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Presence Penalty', + description: 'Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies.', }, frequency_penalty: { @@ -705,12 +776,22 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Frequency Penalty', + description: 'Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation.', }, prompt_truncation: { - $ref: '#/components/schemas/CohereChatPromptTruncation', - title: "Dictates how the prompt will be constructed. Defaults to 'AUTO_PRESERVE_ORDER'.", + anyOf: [ + { + $ref: '#/components/schemas/CohereChatPromptTruncation', + }, + { + type: 'null', + }, + ], + title: 'Prompt Truncation', + description: + "Dictates how the prompt will be constructed. Defaults to 'AUTO_PRESERVE_ORDER'.", default: 'AUTO_PRESERVE_ORDER', }, tool_results: { @@ -725,7 +806,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Tool Results', + description: 'A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations.', }, force_single_step: { @@ -737,7 +819,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: + title: 'Force Single Step', + description: 'If set to true, the model will generate a single response in a single step. This is useful for generating a response to a single message.', }, agent_id: { @@ -749,7 +832,8 @@ export const $CohereChatRequest = { type: 'null', }, ], - title: 'The agent ID to use for the chat.', + title: 'Agent ID', + description: 'The agent ID to use for the chat.', }, }, type: 'object', @@ -763,61 +847,73 @@ export const $ConversationFilePublic = { properties: { id: { type: 'string', - title: 'Id', - }, - user_id: { - type: 'string', - title: 'User Id', + title: 'ID', + description: 'Unique identifier of the file', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When file was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', - }, - conversation_id: { - type: 'string', - title: 'Conversation Id', + title: 'Updated At Timestamp', + description: 'When file was updated', }, file_name: { type: 'string', title: 'File Name', + description: 'Name of the file', }, file_size: { type: 'integer', minimum: 0, title: 'File Size', + description: 'Size of the file in bytes', default: 0, }, + user_id: { + type: 'string', + title: 'User ID', + description: 'Unique identifier for who created the file', + }, + conversation_id: { + type: 'string', + title: 'Conversation ID', + description: 'Unique identifier for the conversation the file is associated to', + }, }, type: 'object', - required: ['id', 'user_id', 'created_at', 'updated_at', 'conversation_id', 'file_name'], + required: ['id', 'created_at', 'updated_at', 'file_name', 'user_id', 'conversation_id'], title: 'ConversationFilePublic', + description: 'Schema for a public conversation file', } as const; export const $ConversationPublic = { properties: { id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the conversation', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When the conversation was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When the conversation was updated', }, title: { type: 'string', title: 'Title', + description: 'Title of the conversation', }, messages: { items: { @@ -825,6 +921,7 @@ export const $ConversationPublic = { }, type: 'array', title: 'Messages', + description: 'The conversation messages', }, files: { items: { @@ -832,6 +929,7 @@ export const $ConversationPublic = { }, type: 'array', title: 'Files', + description: 'List of files for the conversation', }, description: { anyOf: [ @@ -843,6 +941,7 @@ export const $ConversationPublic = { }, ], title: 'Description', + description: 'Description of the conversation', }, agent_id: { anyOf: [ @@ -853,11 +952,13 @@ export const $ConversationPublic = { type: 'null', }, ], - title: 'Agent Id', + title: 'Agent ID', + description: 'Unique identifier for the agent used in the conversation', }, is_pinned: { type: 'boolean', title: 'Is Pinned', + description: 'If conversation is pinned', }, total_file_size: { type: 'integer', @@ -873,33 +974,36 @@ export const $ConversationPublic = { 'title', 'messages', 'files', - 'description', - 'agent_id', 'is_pinned', 'total_file_size', ], title: 'ConversationPublic', + description: 'A public conversation which removes the User ID and Organization ID', } as const; export const $ConversationWithoutMessages = { properties: { id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the conversation', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When the conversation was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When the conversation was updated', }, title: { type: 'string', title: 'Title', + description: 'Title of the conversation', }, files: { items: { @@ -907,6 +1011,7 @@ export const $ConversationWithoutMessages = { }, type: 'array', title: 'Files', + description: 'List of files for the conversation', }, description: { anyOf: [ @@ -918,6 +1023,7 @@ export const $ConversationWithoutMessages = { }, ], title: 'Description', + description: 'Description of the conversation', }, agent_id: { anyOf: [ @@ -928,11 +1034,13 @@ export const $ConversationWithoutMessages = { type: 'null', }, ], - title: 'Agent Id', + title: 'Agent ID', + description: 'Unique identifier for the agent used in the conversation', }, is_pinned: { type: 'boolean', title: 'Is Pinned', + description: 'If conversation is pinned', }, total_file_size: { type: 'integer', @@ -941,18 +1049,9 @@ export const $ConversationWithoutMessages = { }, }, type: 'object', - required: [ - 'id', - 'created_at', - 'updated_at', - 'title', - 'files', - 'description', - 'agent_id', - 'is_pinned', - 'total_file_size', - ], + required: ['id', 'created_at', 'updated_at', 'title', 'files', 'is_pinned', 'total_file_size'], title: 'ConversationWithoutMessages', + description: 'A public conversation without messages attached', } as const; export const $CreateAgentRequest = { @@ -1139,6 +1238,7 @@ export const $CreateGroup = { }, type: 'array', title: 'Schemas', + description: 'Schemas for the group', }, members: { items: { @@ -1146,10 +1246,12 @@ export const $CreateGroup = { }, type: 'array', title: 'Members', + description: 'Members of the group', }, displayName: { type: 'string', - title: 'Displayname', + title: 'Display Name', + description: 'Display name for the group', }, }, type: 'object', @@ -1162,34 +1264,40 @@ export const $CreateOrganization = { name: { type: 'string', title: 'Name', + description: 'Name of the organization', }, }, type: 'object', required: ['name'], title: 'CreateOrganization', + description: 'Request to create an organization', } as const; export const $CreateSnapshotRequest = { properties: { conversation_id: { type: 'string', - title: 'Conversation Id', + title: 'Conversation ID', + description: 'Unique identifier for the conversation', }, }, type: 'object', required: ['conversation_id'], title: 'CreateSnapshotRequest', + description: 'Request to create a snapshot', } as const; export const $CreateSnapshotResponse = { properties: { snapshot_id: { type: 'string', - title: 'Snapshot Id', + title: 'Snapshot ID', + description: 'Unique identifier for the snapshot', }, link_id: { type: 'string', - title: 'Link Id', + title: 'Link ID', + description: 'Unique identifier for the link', }, messages: { items: { @@ -1197,11 +1305,13 @@ export const $CreateSnapshotResponse = { }, type: 'array', title: 'Messages', + description: 'List of messages', }, }, type: 'object', required: ['snapshot_id', 'link_id', 'messages'], title: 'CreateSnapshotResponse', + description: 'Response for creating a snapshot', } as const; export const $DeleteAgent = { @@ -1215,6 +1325,7 @@ export const $DeleteAgentFileResponse = { properties: {}, type: 'object', title: 'DeleteAgentFileResponse', + description: 'Response for deleting an agent file', } as const; export const $DeleteAgentToolMetadata = { @@ -1228,54 +1339,63 @@ export const $DeleteConversationFileResponse = { properties: {}, type: 'object', title: 'DeleteConversationFileResponse', + description: 'Response for deleting a conversation file', } as const; export const $DeleteConversationResponse = { properties: {}, type: 'object', title: 'DeleteConversationResponse', + description: 'Response for deleting a conversation', } as const; export const $DeleteDeployment = { properties: {}, type: 'object', title: 'DeleteDeployment', + description: 'Delete Deployment Response', } as const; export const $DeleteModel = { properties: {}, type: 'object', title: 'DeleteModel', + description: 'Response for deleting a model', } as const; export const $DeleteOrganization = { properties: {}, type: 'object', title: 'DeleteOrganization', + description: 'Response when deleting organization', } as const; export const $DeleteSnapshotLinkResponse = { properties: {}, type: 'object', title: 'DeleteSnapshotLinkResponse', + description: 'Response for deleting a snapshot link', } as const; export const $DeleteSnapshotResponse = { properties: {}, type: 'object', title: 'DeleteSnapshotResponse', + description: 'Response for deleting a snapshot', } as const; export const $DeleteToolAuth = { properties: {}, type: 'object', title: 'DeleteToolAuth', + description: 'Response when deleting a tool auth', } as const; export const $DeleteUser = { properties: {}, type: 'object', title: 'DeleteUser', + description: 'Response when deleting a user', } as const; export const $Deployment = { @@ -1289,11 +1409,13 @@ export const $Deployment = { type: 'null', }, ], - title: 'Id', + title: 'ID', + description: 'Unique Identifier for the Deployment', }, name: { type: 'string', title: 'Name', + description: 'Name of the Deployment', }, models: { items: { @@ -1301,10 +1423,12 @@ export const $Deployment = { }, type: 'array', title: 'Models', + description: 'List of models for the deployment', }, is_available: { type: 'boolean', title: 'Is Available', + description: 'Is deployment is available', default: false, }, env_vars: { @@ -1320,6 +1444,7 @@ export const $Deployment = { }, ], title: 'Env Vars', + description: 'Environment Variables for the Deployment', }, description: { anyOf: [ @@ -1331,6 +1456,7 @@ export const $Deployment = { }, ], title: 'Description', + description: 'Description of the deployment', }, is_community: { anyOf: [ @@ -1342,12 +1468,14 @@ export const $Deployment = { }, ], title: 'Is Community', + description: 'Is the deployment from the commmunity', default: false, }, }, type: 'object', - required: ['name', 'models', 'env_vars'], + required: ['name', 'models'], title: 'Deployment', + description: 'Deployment Schema', } as const; export const $DeploymentCreate = { @@ -1361,11 +1489,13 @@ export const $DeploymentCreate = { type: 'null', }, ], - title: 'Id', + title: 'ID', + description: 'Unique Identifier for the Deployment', }, name: { type: 'string', title: 'Name', + description: 'Name of the Deployment', }, description: { anyOf: [ @@ -1377,14 +1507,17 @@ export const $DeploymentCreate = { }, ], title: 'Description', + description: 'Description of the deployment', }, deployment_class_name: { type: 'string', title: 'Deployment Class Name', + description: 'Deployment Class Name', }, is_community: { type: 'boolean', title: 'Is Community', + description: 'Is the deployment from the commmunity', default: false, }, default_deployment_config: { @@ -1393,11 +1526,13 @@ export const $DeploymentCreate = { }, type: 'object', title: 'Default Deployment Config', + description: 'The default deployment configuration', }, }, type: 'object', required: ['name', 'deployment_class_name', 'default_deployment_config'], title: 'DeploymentCreate', + description: 'Deployment Create Schema', } as const; export const $DeploymentUpdate = { @@ -1412,6 +1547,7 @@ export const $DeploymentUpdate = { }, ], title: 'Name', + description: 'Name of the Deployment', }, description: { anyOf: [ @@ -1423,6 +1559,7 @@ export const $DeploymentUpdate = { }, ], title: 'Description', + description: 'Description of the deployment', }, deployment_class_name: { anyOf: [ @@ -1434,6 +1571,7 @@ export const $DeploymentUpdate = { }, ], title: 'Deployment Class Name', + description: 'Deployment Class Name', }, is_community: { anyOf: [ @@ -1445,6 +1583,7 @@ export const $DeploymentUpdate = { }, ], title: 'Is Community', + description: 'Is the deployment from the commmunity', }, default_deployment_config: { anyOf: [ @@ -1459,10 +1598,12 @@ export const $DeploymentUpdate = { }, ], title: 'Default Deployment Config', + description: 'The default deployment configuration', }, }, type: 'object', title: 'DeploymentUpdate', + description: 'Deployment Update Schema', } as const; export const $Document = { @@ -1470,10 +1611,12 @@ export const $Document = { text: { type: 'string', title: 'Text', + description: 'Document text', }, document_id: { type: 'string', - title: 'Document Id', + title: 'Document_Id', + description: 'Unique Identifier for the document', }, title: { anyOf: [ @@ -1485,6 +1628,7 @@ export const $Document = { }, ], title: 'Title', + description: 'Document title', }, url: { anyOf: [ @@ -1495,7 +1639,8 @@ export const $Document = { type: 'null', }, ], - title: 'Url', + title: 'URL', + description: 'Document URL', }, fields: { anyOf: [ @@ -1507,6 +1652,7 @@ export const $Document = { }, ], title: 'Fields', + description: 'Document Fields', }, tool_name: { anyOf: [ @@ -1518,11 +1664,13 @@ export const $Document = { }, ], title: 'Tool Name', + description: 'Tool name for the document', }, }, type: 'object', - required: ['text', 'document_id', 'title', 'url', 'fields', 'tool_name'], + required: ['text', 'document_id'], title: 'Document', + description: 'Schema for a Document', } as const; export const $Email = { @@ -1530,6 +1678,7 @@ export const $Email = { primary: { type: 'boolean', title: 'Primary', + description: 'Is email the primary email', }, value: { anyOf: [ @@ -1541,10 +1690,12 @@ export const $Email = { }, ], title: 'Value', + description: 'Email value', }, type: { type: 'string', title: 'Type', + description: 'Type of email', }, }, type: 'object', @@ -1556,36 +1707,43 @@ export const $FileMetadata = { properties: { id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier of the file', }, - file_name: { + created_at: { type: 'string', - title: 'File Name', + format: 'date-time', + title: 'Created At Timestamp', + description: 'When file was created', }, - file_content: { + updated_at: { type: 'string', - title: 'File Content', + format: 'date-time', + title: 'Updated At Timestamp', + description: 'When file was updated', + }, + file_name: { + type: 'string', + title: 'File Name', + description: 'Name of the file', }, file_size: { type: 'integer', minimum: 0, title: 'File Size', + description: 'Size of the file in bytes', default: 0, }, - created_at: { - type: 'string', - format: 'date-time', - title: 'Created At', - }, - updated_at: { + file_content: { type: 'string', - format: 'date-time', - title: 'Updated At', + title: 'File Content', + description: 'The contents of the file', }, }, type: 'object', - required: ['id', 'file_name', 'file_content', 'created_at', 'updated_at'], + required: ['id', 'created_at', 'updated_at', 'file_name', 'file_content'], title: 'FileMetadata', + description: 'Schema for file metadata', } as const; export const $GenerateTitleResponse = { @@ -1593,6 +1751,7 @@ export const $GenerateTitleResponse = { title: { type: 'string', title: 'Title', + description: 'Title generated for the conversation', }, error: { anyOf: [ @@ -1604,11 +1763,13 @@ export const $GenerateTitleResponse = { }, ], title: 'Error', + description: 'Error message if the response is an error', }, }, type: 'object', required: ['title'], title: 'GenerateTitleResponse', + description: 'Response for generating a title', } as const; export const $Group = { @@ -1619,6 +1780,7 @@ export const $Group = { }, type: 'array', title: 'Schemas', + description: 'Schemas for the group', }, members: { items: { @@ -1626,17 +1788,21 @@ export const $Group = { }, type: 'array', title: 'Members', + description: 'Members of the group', }, displayName: { type: 'string', - title: 'Displayname', + title: 'Display Name', + description: 'Display name for the group', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the group', }, meta: { $ref: '#/components/schemas/Meta', + description: 'Metadata for the group', }, }, type: 'object', @@ -1649,10 +1815,12 @@ export const $GroupMember = { value: { type: 'string', title: 'Value', + description: 'Value', }, display: { type: 'string', title: 'Display', + description: 'Display', }, }, type: 'object', @@ -1665,6 +1833,7 @@ export const $GroupOperation = { op: { type: 'string', title: 'Op', + description: 'Op', }, path: { anyOf: [ @@ -1676,6 +1845,7 @@ export const $GroupOperation = { }, ], title: 'Path', + description: 'Path', }, value: { anyOf: [ @@ -1696,6 +1866,7 @@ export const $GroupOperation = { }, ], title: 'Value', + description: 'Value', }, }, type: 'object', @@ -1722,104 +1893,79 @@ export const $JWTResponse = { token: { type: 'string', title: 'Token', + description: 'JSON Web Token', }, }, type: 'object', required: ['token'], title: 'JWTResponse', -} as const; - -export const $ListAuthStrategy = { - properties: { - strategy: { - type: 'string', - title: 'Strategy', - }, - client_id: { - anyOf: [ - { - type: 'string', - }, - { - type: 'null', - }, - ], - title: 'Client Id', - }, - authorization_endpoint: { - anyOf: [ - { - type: 'string', - }, - { - type: 'null', - }, - ], - title: 'Authorization Endpoint', - }, - pkce_enabled: { - type: 'boolean', - title: 'Pkce Enabled', - }, - }, - type: 'object', - required: ['strategy', 'client_id', 'authorization_endpoint', 'pkce_enabled'], - title: 'ListAuthStrategy', + description: 'JWT Response', } as const; export const $ListConversationFile = { properties: { id: { type: 'string', - title: 'Id', - }, - user_id: { - type: 'string', - title: 'User Id', + title: 'ID', + description: 'Unique identifier of the file', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When file was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', - }, - conversation_id: { - type: 'string', - title: 'Conversation Id', + title: 'Updated At Timestamp', + description: 'When file was updated', }, file_name: { type: 'string', title: 'File Name', + description: 'Name of the file', }, file_size: { type: 'integer', minimum: 0, title: 'File Size', + description: 'Size of the file in bytes', default: 0, }, + user_id: { + type: 'string', + title: 'User ID', + description: 'Unique identifier for who created the file', + }, + conversation_id: { + type: 'string', + title: 'Conversation ID', + description: 'Unique identifier for the conversation the file is associated to', + }, }, type: 'object', - required: ['id', 'user_id', 'created_at', 'updated_at', 'conversation_id', 'file_name'], + required: ['id', 'created_at', 'updated_at', 'file_name', 'user_id', 'conversation_id'], title: 'ListConversationFile', + description: 'Listing conversation files', } as const; export const $ListGroupResponse = { properties: { totalResults: { type: 'integer', - title: 'Totalresults', + title: 'Total Results', + description: 'Total results available', }, startIndex: { type: 'integer', - title: 'Startindex', + title: 'Start Index', + description: 'Start index for returned results', }, itemsPerPage: { type: 'integer', - title: 'Itemsperpage', + title: 'Items Per Page', + description: 'Total results returned in the request', }, Resources: { items: { @@ -1827,6 +1973,7 @@ export const $ListGroupResponse = { }, type: 'array', title: 'Resources', + description: 'List of Groups', }, }, type: 'object', @@ -1838,15 +1985,18 @@ export const $ListUserResponse = { properties: { totalResults: { type: 'integer', - title: 'Totalresults', + title: 'Total Results', + description: 'Total results available', }, startIndex: { type: 'integer', - title: 'Startindex', + title: 'Start Index', + description: 'Start index for returned results', }, itemsPerPage: { type: 'integer', - title: 'Itemsperpage', + title: 'Items Per Page', + description: 'Total results returned in the request', }, Resources: { items: { @@ -1854,6 +2004,7 @@ export const $ListUserResponse = { }, type: 'array', title: 'Resources', + description: 'List of Users', }, }, type: 'object', @@ -1866,6 +2017,7 @@ export const $Login = { strategy: { type: 'string', title: 'Strategy', + description: 'Auth strategy to use', }, payload: { anyOf: [ @@ -1880,17 +2032,20 @@ export const $Login = { }, ], title: 'Payload', + description: 'Login payload depending on strategy used', }, }, type: 'object', required: ['strategy'], title: 'Login', + description: 'Login Request', } as const; export const $Logout = { properties: {}, type: 'object', title: 'Logout', + description: 'Logout Request', } as const; export const $Message = { @@ -1898,20 +2053,24 @@ export const $Message = { text: { type: 'string', title: 'Text', + description: 'The text content of the message', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier of the message', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When message was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When message was updated', }, generation_id: { anyOf: [ @@ -1922,15 +2081,18 @@ export const $Message = { type: 'null', }, ], - title: 'Generation Id', + title: 'Generation ID', + description: 'Generation ID for the message', }, position: { type: 'integer', title: 'Position', + description: 'Position in the conversation', }, is_active: { type: 'boolean', title: 'Is Active', + description: 'Is the message active', }, documents: { items: { @@ -1938,6 +2100,7 @@ export const $Message = { }, type: 'array', title: 'Documents', + description: 'Documents associated with the message', }, citations: { items: { @@ -1945,6 +2108,7 @@ export const $Message = { }, type: 'array', title: 'Citations', + description: 'Citations associated with the message', }, files: { items: { @@ -1952,6 +2116,7 @@ export const $Message = { }, type: 'array', title: 'Files', + description: 'Files associated with the message', }, tool_calls: { items: { @@ -1959,6 +2124,7 @@ export const $Message = { }, type: 'array', title: 'Tool Calls', + description: 'Tool calls associated with the message', }, tool_plan: { anyOf: [ @@ -1970,9 +2136,12 @@ export const $Message = { }, ], title: 'Tool Plan', + description: 'Tool plan associated with the message', }, agent: { $ref: '#/components/schemas/MessageAgent', + title: 'Agent', + description: 'Agent associated with the message', }, }, type: 'object', @@ -1981,17 +2150,16 @@ export const $Message = { 'id', 'created_at', 'updated_at', - 'generation_id', 'position', 'is_active', 'documents', 'citations', 'files', 'tool_calls', - 'tool_plan', 'agent', ], title: 'Message', + description: 'Message Schema', } as const; export const $MessageAgent = { @@ -2004,35 +2172,32 @@ export const $Meta = { properties: { resourceType: { type: 'string', - title: 'Resourcetype', + title: 'Resource Type', + description: 'Type of resource the metadata is for', }, created: { type: 'string', title: 'Created', + description: 'When metadata was created', }, lastModified: { type: 'string', - title: 'Lastmodified', + title: 'Last Modified', + description: 'When metadata was last modified', }, }, type: 'object', required: ['resourceType', 'created', 'lastModified'], title: 'Meta', + description: 'Schema for metadata', } as const; export const $Model = { properties: { - id: { - type: 'string', - title: 'Id', - }, name: { type: 'string', title: 'Name', - }, - deployment_id: { - type: 'string', - title: 'Deployment Id', + description: 'Model name', }, cohere_name: { anyOf: [ @@ -2044,6 +2209,7 @@ export const $Model = { }, ], title: 'Cohere Name', + description: 'Cohere model name', }, description: { anyOf: [ @@ -2055,10 +2221,21 @@ export const $Model = { }, ], title: 'Description', + description: 'Model description', + }, + id: { + type: 'string', + title: 'ID', + description: 'Unique identifier for the model', + }, + deployment_id: { + type: 'string', + title: 'Deployment ID', + description: 'Unique identifier for the deployment', }, }, type: 'object', - required: ['id', 'name', 'deployment_id', 'cohere_name', 'description'], + required: ['name', 'id', 'deployment_id'], title: 'Model', } as const; @@ -2067,6 +2244,7 @@ export const $ModelCreate = { name: { type: 'string', title: 'Name', + description: 'Model name', }, cohere_name: { anyOf: [ @@ -2078,6 +2256,7 @@ export const $ModelCreate = { }, ], title: 'Cohere Name', + description: 'Cohere model name', }, description: { anyOf: [ @@ -2089,14 +2268,16 @@ export const $ModelCreate = { }, ], title: 'Description', + description: 'Model description', }, deployment_id: { type: 'string', - title: 'Deployment Id', + title: 'Deployment ID', + description: 'Unique identifier for the deployment', }, }, type: 'object', - required: ['name', 'cohere_name', 'description', 'deployment_id'], + required: ['name', 'deployment_id'], title: 'ModelCreate', } as const; @@ -2112,6 +2293,7 @@ export const $ModelUpdate = { }, ], title: 'Name', + description: 'Model name', }, cohere_name: { anyOf: [ @@ -2123,6 +2305,7 @@ export const $ModelUpdate = { }, ], title: 'Cohere Name', + description: 'Cohere model name', }, description: { anyOf: [ @@ -2134,6 +2317,7 @@ export const $ModelUpdate = { }, ], title: 'Description', + description: 'Model description', }, deployment_id: { anyOf: [ @@ -2144,7 +2328,8 @@ export const $ModelUpdate = { type: 'null', }, ], - title: 'Deployment Id', + title: 'Deployment ID', + description: 'Unique identifier for the deployment', }, }, type: 'object', @@ -2155,11 +2340,13 @@ export const $Name = { properties: { givenName: { type: 'string', - title: 'Givenname', + title: 'Given Name', + description: "User's given name", }, familyName: { type: 'string', - title: 'Familyname', + title: 'Family Name', + description: "User's family name", }, }, type: 'object', @@ -2178,7 +2365,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Unique identifier for the response.', + title: 'Response ID', + description: 'Unique identifier for the response', }, generation_id: { anyOf: [ @@ -2189,7 +2377,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Unique identifier for the generation.', + title: 'Generation ID', + description: 'Unique identifier for the generation', }, chat_history: { anyOf: [ @@ -2203,16 +2392,19 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: + title: 'Chat History', + description: "A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's message.", }, finish_reason: { type: 'string', - title: 'Reason the chat stream ended.', + title: 'Finish Reason', + description: 'Reason the chat stream ended', }, text: { type: 'string', - title: 'Contents of the chat message.', + title: 'Text', + description: 'Contents of the chat message', }, citations: { anyOf: [ @@ -2226,7 +2418,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Citations for the chat message.', + title: 'Citations', + description: 'Citations for the chat message', default: [], }, documents: { @@ -2241,7 +2434,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Documents used to generate grounded response with citations.', + title: 'Documents', + description: 'Documents used to generate grounded response with citations', default: [], }, search_results: { @@ -2256,7 +2450,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Search results used to generate grounded response with citations.', + title: 'Search Results', + description: 'Search results used to generate grounded response with citations', default: [], }, search_queries: { @@ -2271,7 +2466,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'List of generated search queries.', + title: 'Search Queries', + description: 'List of generated search queries.', default: [], }, conversation_id: { @@ -2283,8 +2479,9 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: - 'To store a conversation then create a conversation id and use it for every related request.', + title: 'Conversation ID', + description: + 'To store a conversation then create a conversation id and use it for every related request', }, tool_calls: { anyOf: [ @@ -2298,7 +2495,8 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'List of tool calls generated for custom tools', + title: 'Tool Calls', + description: 'List of tool calls generated for custom tools', default: [], }, error: { @@ -2310,19 +2508,14 @@ export const $NonStreamedChatResponse = { type: 'null', }, ], - title: 'Error message if the response is an error.', + title: 'Error', + description: 'Error message if the response is an error', }, }, type: 'object', - required: [ - 'response_id', - 'generation_id', - 'chat_history', - 'finish_reason', - 'text', - 'conversation_id', - ], + required: ['finish_reason', 'text'], title: 'NonStreamedChatResponse', + description: 'Non streamed chat response', } as const; export const $Operation = { @@ -2330,6 +2523,7 @@ export const $Operation = { op: { type: 'string', title: 'Op', + description: 'Op', }, value: { additionalProperties: { @@ -2337,6 +2531,7 @@ export const $Operation = { }, type: 'object', title: 'Value', + description: 'Value', }, }, type: 'object', @@ -2349,25 +2544,30 @@ export const $Organization = { name: { type: 'string', title: 'Name', + description: 'Name of the organization', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier of the organization', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When organization was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When organization was updated', }, }, type: 'object', required: ['name', 'id', 'created_at', 'updated_at'], title: 'Organization', + description: 'Schema for an organization', } as const; export const $PatchGroup = { @@ -2378,6 +2578,7 @@ export const $PatchGroup = { }, type: 'array', title: 'Schemas', + description: 'Schemas for group', }, operations: { items: { @@ -2385,6 +2586,7 @@ export const $PatchGroup = { }, type: 'array', title: 'Operations', + description: 'Operations for the group', }, }, type: 'object', @@ -2400,6 +2602,7 @@ export const $PatchUser = { }, type: 'array', title: 'Schemas', + description: 'Schemas for user', }, operations: { items: { @@ -2407,6 +2610,7 @@ export const $PatchUser = { }, type: 'array', title: 'Operations', + description: 'Operations for the user', }, }, type: 'object', @@ -2419,15 +2623,18 @@ export const $SearchQuery = { text: { type: 'string', title: 'Text', + description: 'Text for the search', }, generation_id: { type: 'string', - title: 'Generation Id', + title: 'Generation ID', + description: 'Unique identifier for the generation', }, }, type: 'object', required: ['text', 'generation_id'], title: 'SearchQuery', + description: 'Schema for search query', } as const; export const $SnapshotData = { @@ -2435,10 +2642,12 @@ export const $SnapshotData = { title: { type: 'string', title: 'Title', + description: 'Title of the snapshot', }, description: { type: 'string', title: 'Description', + description: 'Description of the snapshot', }, messages: { items: { @@ -2446,43 +2655,53 @@ export const $SnapshotData = { }, type: 'array', title: 'Messages', + description: 'List of messages', }, }, type: 'object', required: ['title', 'description', 'messages'], title: 'SnapshotData', + description: 'Snapshot data', } as const; export const $SnapshotPublic = { properties: { conversation_id: { type: 'string', - title: 'Conversation Id', + title: 'Conversation ID', + description: 'Unique identifier for the conversation', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the snapshot', }, last_message_id: { type: 'string', - title: 'Last Message Id', + title: 'Last Message ID', + description: 'Unique identifier for the last message', }, version: { type: 'integer', title: 'Version', + description: 'Snapshot version', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When snapshot was creted', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When snapshot was updated', }, snapshot: { $ref: '#/components/schemas/SnapshotData', + title: 'Snapshot Data', + description: 'Data for the snapshot', }, }, type: 'object', @@ -2496,38 +2715,47 @@ export const $SnapshotPublic = { 'snapshot', ], title: 'SnapshotPublic', + description: 'Public snapshot', } as const; export const $SnapshotWithLinks = { properties: { conversation_id: { type: 'string', - title: 'Conversation Id', + title: 'Conversation ID', + description: 'Unique identifier for the conversation', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the snapshot', }, last_message_id: { type: 'string', - title: 'Last Message Id', + title: 'Last Message ID', + description: 'Unique identifier for the last message', }, version: { type: 'integer', title: 'Version', + description: 'Snapshot version', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When snapshot was creted', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When snapshot was updated', }, snapshot: { $ref: '#/components/schemas/SnapshotData', + title: 'Snapshot Data', + description: 'Data for the snapshot', }, links: { items: { @@ -2535,6 +2763,7 @@ export const $SnapshotWithLinks = { }, type: 'array', title: 'Links', + description: 'List of links', }, }, type: 'object', @@ -2549,6 +2778,7 @@ export const $SnapshotWithLinks = { 'links', ], title: 'SnapshotWithLinks', + description: 'Snapshot with links', } as const; export const $StreamCitationGeneration = { @@ -2558,13 +2788,14 @@ export const $StreamCitationGeneration = { $ref: '#/components/schemas/Citation', }, type: 'array', - title: 'Citations for the chat message.', + title: 'Citations', + description: 'Citations for the chat message', default: [], }, }, type: 'object', title: 'StreamCitationGeneration', - description: 'Stream citation generation event.', + description: 'Stream citation generation event', } as const; export const $StreamEnd = { @@ -2578,7 +2809,8 @@ export const $StreamEnd = { type: 'null', }, ], - title: 'Message Id', + title: 'Message ID', + description: 'Unique identifier for the message', }, response_id: { anyOf: [ @@ -2589,7 +2821,8 @@ export const $StreamEnd = { type: 'null', }, ], - title: 'Response Id', + title: 'Response ID', + description: 'Unique identifier for the response', }, generation_id: { anyOf: [ @@ -2600,7 +2833,8 @@ export const $StreamEnd = { type: 'null', }, ], - title: 'Generation Id', + title: 'Generation ID', + description: 'Unique identifier for the generation', }, conversation_id: { anyOf: [ @@ -2611,18 +2845,21 @@ export const $StreamEnd = { type: 'null', }, ], - title: 'Conversation Id', + title: 'Conversation ID', + description: 'Unique identifier for the conversation', }, text: { type: 'string', - title: 'Contents of the chat message.', + title: 'Text', + description: 'Contents of the chat message', }, citations: { items: { $ref: '#/components/schemas/Citation', }, type: 'array', - title: 'Citations for the chat message.', + title: 'Citations', + description: 'Citations for the chat messae.', default: [], }, documents: { @@ -2630,7 +2867,8 @@ export const $StreamEnd = { $ref: '#/components/schemas/Document', }, type: 'array', - title: 'Documents used to generate grounded response with citations.', + title: 'Documents', + description: 'Documents used to generate grounded response with citations', default: [], }, search_results: { @@ -2638,7 +2876,8 @@ export const $StreamEnd = { type: 'object', }, type: 'array', - title: 'Search results used to generate grounded response with citations.', + title: 'Search Results', + description: 'Search results used to generate grounded response with citations', default: [], }, search_queries: { @@ -2646,7 +2885,8 @@ export const $StreamEnd = { $ref: '#/components/schemas/SearchQuery', }, type: 'array', - title: 'List of generated search queries.', + title: 'Search Queries', + description: 'List of generated search queries', default: [], }, tool_calls: { @@ -2654,7 +2894,8 @@ export const $StreamEnd = { $ref: '#/components/schemas/ToolCall', }, type: 'array', - title: 'List of tool calls generated for custom tools', + title: 'Tool Calls', + description: 'List of tool calls generated for custom tools', default: [], }, finish_reason: { @@ -2667,6 +2908,7 @@ export const $StreamEnd = { }, ], title: 'Finish Reason', + description: 'Reson why the model finished the request', }, chat_history: { anyOf: [ @@ -2680,7 +2922,8 @@ export const $StreamEnd = { type: 'null', }, ], - title: + title: 'Chat History', + description: 'A list of entries used to construct the conversation. If provided, these messages will be used to build the prompt and the conversation_id will be ignored so no data will be stored to maintain state.', }, error: { @@ -2692,12 +2935,14 @@ export const $StreamEnd = { type: 'null', }, ], - title: 'Error message if the response is an error.', + title: 'Error', + description: 'Error message if the response is an error', }, }, type: 'object', required: ['text'], title: 'StreamEnd', + description: 'Stream end generation event', } as const; export const $StreamEvent = { @@ -2723,13 +2968,14 @@ export const $StreamQueryGeneration = { properties: { query: { type: 'string', - title: 'Search query used to generate grounded response with citations.', + title: 'Query', + description: 'Search query used to generate grounded response with citations', }, }, type: 'object', required: ['query'], title: 'StreamQueryGeneration', - description: 'Stream query generation event.', + description: 'Stream query generation event', } as const; export const $StreamSearchQueriesGeneration = { @@ -2739,13 +2985,14 @@ export const $StreamSearchQueriesGeneration = { $ref: '#/components/schemas/SearchQuery', }, type: 'array', - title: 'Search query used to generate grounded response with citations.', + title: 'Search Queries', + description: 'Search query used to generate grounded response with citations', default: [], }, }, type: 'object', title: 'StreamSearchQueriesGeneration', - description: 'Stream queries generation event.', + description: 'Stream queries generation event', } as const; export const $StreamSearchResults = { @@ -2755,7 +3002,8 @@ export const $StreamSearchResults = { type: 'object', }, type: 'array', - title: 'Search results used to generate grounded response with citations.', + title: 'Search Results', + description: 'Search results used to generate grounded response with citations', default: [], }, documents: { @@ -2763,12 +3011,14 @@ export const $StreamSearchResults = { $ref: '#/components/schemas/Document', }, type: 'array', - title: 'Documents used to generate grounded response with citations.', + title: 'Documents', + description: 'Documents used to generate grounded response with citations', default: [], }, }, type: 'object', title: 'StreamSearchResults', + description: 'Stream search generation event', } as const; export const $StreamStart = { @@ -2782,7 +3032,8 @@ export const $StreamStart = { type: 'null', }, ], - title: 'Generation Id', + title: 'Generation ID', + description: 'Generation ID for the event', }, conversation_id: { anyOf: [ @@ -2793,25 +3044,27 @@ export const $StreamStart = { type: 'null', }, ], - title: 'Conversation Id', + title: 'Conversation ID', + description: 'Conversation ID for the event', }, }, type: 'object', title: 'StreamStart', - description: 'Stream start event.', + description: 'Stream start event', } as const; export const $StreamTextGeneration = { properties: { text: { type: 'string', - title: 'Contents of the chat message.', + title: 'Text', + description: 'Contents of the chat message', }, }, type: 'object', required: ['text'], title: 'StreamTextGeneration', - description: 'Stream text generation event.', + description: 'Stream text generation event', } as const; export const $StreamToolCallsChunk = { @@ -2825,7 +3078,8 @@ export const $StreamToolCallsChunk = { type: 'null', }, ], - title: 'Partial tool call', + title: 'Tool Call Delta', + description: 'Partial tool call', default: {}, }, text: { @@ -2837,26 +3091,24 @@ export const $StreamToolCallsChunk = { type: 'null', }, ], - title: 'Contents of the chat message.', + title: 'Text', + description: 'Contents of the chat message', }, }, type: 'object', - required: ['text'], title: 'StreamToolCallsChunk', + description: 'Stream tool call chunk generated event', } as const; export const $StreamToolCallsGeneration = { properties: { stream_search_results: { - anyOf: [ - { - $ref: '#/components/schemas/StreamSearchResults', - }, - { - type: 'null', - }, - ], - title: 'List of search results used to generate grounded response with citations', + items: { + $ref: '#/components/schemas/StreamSearchResults', + }, + type: 'array', + title: 'Stream Search Results', + description: 'List of search results used to generate grounded response with citations', default: [], }, tool_calls: { @@ -2871,7 +3123,8 @@ export const $StreamToolCallsGeneration = { type: 'null', }, ], - title: 'List of tool calls generated for custom tools', + title: 'Tool Calls', + description: 'List of tool calls generated for custom tools', default: [], }, text: { @@ -2883,59 +3136,69 @@ export const $StreamToolCallsGeneration = { type: 'null', }, ], - title: 'Contents of the chat message.', + title: 'Text', + description: 'Contents of the chat message', }, }, type: 'object', - required: ['text'], title: 'StreamToolCallsGeneration', - description: 'Stream tool calls generation event.', + description: 'Stream tool calls generation event', } as const; export const $StreamToolInput = { properties: { input_type: { $ref: '#/components/schemas/ToolInputType', + title: 'Input Type', + description: 'Tool input type', }, tool_name: { type: 'string', title: 'Tool Name', + description: 'Name of the tool to be used', }, input: { type: 'string', title: 'Input', + description: 'Tool input', }, text: { type: 'string', title: 'Text', + description: 'Contents of the chat message', }, }, type: 'object', required: ['input_type', 'tool_name', 'input', 'text'], title: 'StreamToolInput', + description: 'Stream tool input generation event', } as const; export const $StreamToolResult = { properties: { result: { title: 'Result', + description: 'Result from the tool', }, tool_name: { type: 'string', title: 'Tool Name', + description: 'Name of tool that generated the result', }, documents: { items: { $ref: '#/components/schemas/Document', }, type: 'array', - title: 'Documents used to generate grounded response with citations.', + title: 'Documents', + description: 'Documents used to generate grounded response with citations', default: [], }, }, type: 'object', required: ['result', 'tool_name'], title: 'StreamToolResult', + description: 'Stream tool result generation event', } as const; export const $ToggleConversationPinRequest = { @@ -2943,11 +3206,13 @@ export const $ToggleConversationPinRequest = { is_pinned: { type: 'boolean', title: 'Is Pinned', + description: 'If conversation is pinned', }, }, type: 'object', required: ['is_pinned'], title: 'ToggleConversationPinRequest', + description: 'Request to toggle pinning a conversation', } as const; export const $Tool = { @@ -2962,6 +3227,7 @@ export const $Tool = { }, ], title: 'Name', + description: 'Name of the Tool', default: '', }, parameter_definitions: { @@ -2974,11 +3240,13 @@ export const $Tool = { }, ], title: 'Parameter Definitions', + description: 'Parameters definitions for the tool', default: {}, }, }, type: 'object', title: 'Tool', + description: 'Tool Schema', } as const; export const $ToolCall = { @@ -2986,16 +3254,19 @@ export const $ToolCall = { name: { type: 'string', title: 'Name', + description: 'Name of the Tool', }, parameters: { type: 'object', title: 'Parameters', + description: 'Parameters for the tool call', default: {}, }, }, type: 'object', required: ['name'], title: 'ToolCall', + description: 'Schema for Tool Call', } as const; export const $ToolCallDelta = { @@ -3010,6 +3281,7 @@ export const $ToolCallDelta = { }, ], title: 'Name', + description: 'Name of the Tool', }, index: { anyOf: [ @@ -3021,6 +3293,7 @@ export const $ToolCallDelta = { }, ], title: 'Index', + description: 'Index', }, parameters: { anyOf: [ @@ -3032,17 +3305,19 @@ export const $ToolCallDelta = { }, ], title: 'Parameters', + description: 'Parameters for the tool call', }, }, type: 'object', - required: ['name', 'index', 'parameters'], title: 'ToolCallDelta', + description: 'Schema for Tool Call Delta', } as const; export const $ToolCategory = { type: 'string', enum: ['Data loader', 'File loader', 'Function', 'Web search'], title: 'ToolCategory', + description: 'Supported Tool Categories', } as const; export const $ToolDefinition = { @@ -3057,6 +3332,7 @@ export const $ToolDefinition = { }, ], title: 'Name', + description: 'Name of the Tool', default: '', }, parameter_definitions: { @@ -3069,16 +3345,19 @@ export const $ToolDefinition = { }, ], title: 'Parameter Definitions', + description: 'Parameters definitions for the tool', default: {}, }, display_name: { type: 'string', title: 'Display Name', + description: 'Display name for the tool', default: '', }, description: { type: 'string', title: 'Description', + description: 'Description of the tool', default: '', }, error_message: { @@ -3091,30 +3370,37 @@ export const $ToolDefinition = { }, ], title: 'Error Message', + description: 'Error message', default: '', }, kwargs: { type: 'object', - title: 'Kwargs', + title: 'kwargs', + description: 'kwags for the tool', default: {}, }, is_visible: { type: 'boolean', title: 'Is Visible', + description: 'Is the tool visible', default: false, }, is_available: { type: 'boolean', title: 'Is Available', + description: 'Is the tool available', default: false, }, category: { $ref: '#/components/schemas/ToolCategory', + title: 'Category', + description: 'Tool category', default: 'Data loader', }, is_auth_required: { type: 'boolean', title: 'Is Auth Required', + description: 'Is auth required for the tool', default: false, }, auth_url: { @@ -3127,6 +3413,7 @@ export const $ToolDefinition = { }, ], title: 'Auth Url', + description: 'Auth url for the tool', default: '', }, token: { @@ -3139,16 +3426,19 @@ export const $ToolDefinition = { }, ], title: 'Token', + description: 'Token for the tool', default: '', }, should_return_token: { type: 'boolean', title: 'Should Return Token', + description: 'If the tool returns a token', default: false, }, }, type: 'object', title: 'ToolDefinition', + description: 'Tool Definition Schema', } as const; export const $ToolInputType = { @@ -3363,6 +3653,7 @@ export const $UpdateConversationRequest = { }, ], title: 'Title', + description: 'Title of the conversation', }, description: { anyOf: [ @@ -3374,10 +3665,12 @@ export const $UpdateConversationRequest = { }, ], title: 'Description', + description: 'Description of the conversation', }, }, type: 'object', title: 'UpdateConversationRequest', + description: 'Request to update a conversation', } as const; export const $UpdateDeploymentEnv = { @@ -3388,11 +3681,13 @@ export const $UpdateDeploymentEnv = { }, type: 'object', title: 'Env Vars', + description: 'Environment Variables for the Deployment', }, }, type: 'object', required: ['env_vars'], title: 'UpdateDeploymentEnv', + description: 'Request to update Deployment Environment Variables', } as const; export const $UpdateOrganization = { @@ -3407,83 +3702,98 @@ export const $UpdateOrganization = { }, ], title: 'Name', + description: 'Name of the organization', }, }, type: 'object', - required: ['name'], title: 'UpdateOrganization', + description: 'Request to update an organization', } as const; export const $UploadAgentFileResponse = { properties: { id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier of the file', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When file was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When file was updated', }, file_name: { type: 'string', title: 'File Name', + description: 'Name of the file', }, file_size: { type: 'integer', minimum: 0, title: 'File Size', + description: 'Size of the file in bytes', default: 0, }, }, type: 'object', required: ['id', 'created_at', 'updated_at', 'file_name'], title: 'UploadAgentFileResponse', + description: 'Reponse for uploading an agent file', } as const; export const $UploadConversationFileResponse = { properties: { id: { type: 'string', - title: 'Id', - }, - user_id: { - type: 'string', - title: 'User Id', + title: 'ID', + description: 'Unique identifier of the file', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When file was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', - }, - conversation_id: { - type: 'string', - title: 'Conversation Id', + title: 'Updated At Timestamp', + description: 'When file was updated', }, file_name: { type: 'string', title: 'File Name', + description: 'Name of the file', }, file_size: { type: 'integer', minimum: 0, title: 'File Size', + description: 'Size of the file in bytes', default: 0, }, + user_id: { + type: 'string', + title: 'User ID', + description: 'Unique identifier for who created the file', + }, + conversation_id: { + type: 'string', + title: 'Conversation ID', + description: 'Unique identifier for the conversation the file is associated to', + }, }, type: 'object', - required: ['id', 'user_id', 'created_at', 'updated_at', 'conversation_id', 'file_name'], + required: ['id', 'created_at', 'updated_at', 'file_name', 'user_id', 'conversation_id'], title: 'UploadConversationFileResponse', + description: 'Response for uploading a conversation file', } as const; export const $ValidationError = { @@ -3527,7 +3837,8 @@ export const $backend__schemas__scim__CreateUser = { type: 'null', }, ], - title: 'Username', + title: 'User Name', + description: 'User name', }, active: { anyOf: [ @@ -3539,6 +3850,7 @@ export const $backend__schemas__scim__CreateUser = { }, ], title: 'Active', + description: 'Is user active', }, schemas: { items: { @@ -3546,9 +3858,12 @@ export const $backend__schemas__scim__CreateUser = { }, type: 'array', title: 'Schemas', + description: 'Schemas for the user', }, name: { $ref: '#/components/schemas/Name', + title: 'Name', + description: 'Name of user', }, emails: { items: { @@ -3556,14 +3871,16 @@ export const $backend__schemas__scim__CreateUser = { }, type: 'array', title: 'Emails', + description: 'List of emails for user', }, externalId: { type: 'string', - title: 'Externalid', + title: 'External ID', + description: 'External ID for the user', }, }, type: 'object', - required: ['userName', 'active', 'schemas', 'name', 'emails', 'externalId'], + required: ['schemas', 'name', 'emails', 'externalId'], title: 'CreateUser', } as const; @@ -3578,7 +3895,8 @@ export const $backend__schemas__scim__UpdateUser = { type: 'null', }, ], - title: 'Username', + title: 'User Name', + description: 'User name', }, active: { anyOf: [ @@ -3590,6 +3908,7 @@ export const $backend__schemas__scim__UpdateUser = { }, ], title: 'Active', + description: 'Is user active', }, schemas: { items: { @@ -3597,6 +3916,11 @@ export const $backend__schemas__scim__UpdateUser = { }, type: 'array', title: 'Schemas', + description: 'Schemas for the user', + }, + name: { + $ref: '#/components/schemas/Name', + description: 'Name of user', }, emails: { items: { @@ -3604,13 +3928,11 @@ export const $backend__schemas__scim__UpdateUser = { }, type: 'array', title: 'Emails', - }, - name: { - $ref: '#/components/schemas/Name', + description: 'List of emails for user', }, }, type: 'object', - required: ['userName', 'active', 'schemas', 'emails', 'name'], + required: ['schemas', 'name', 'emails'], title: 'UpdateUser', } as const; @@ -3625,7 +3947,8 @@ export const $backend__schemas__scim__User = { type: 'null', }, ], - title: 'Username', + title: 'User Name', + description: 'User name', }, active: { anyOf: [ @@ -3637,6 +3960,7 @@ export const $backend__schemas__scim__User = { }, ], title: 'Active', + description: 'Is user active', }, schemas: { items: { @@ -3644,21 +3968,25 @@ export const $backend__schemas__scim__User = { }, type: 'array', title: 'Schemas', + description: 'Schemas for the user', }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: 'Unique identifier for the user', }, externalId: { type: 'string', - title: 'Externalid', + title: 'External ID', + description: 'External ID for the user', }, meta: { $ref: '#/components/schemas/Meta', + description: 'Metadata for the user', }, }, type: 'object', - required: ['userName', 'active', 'schemas', 'id', 'externalId', 'meta'], + required: ['schemas', 'id', 'externalId', 'meta'], title: 'User', } as const; @@ -3674,6 +4002,7 @@ export const $backend__schemas__user__CreateUser = { }, ], title: 'Password', + description: 'Password for the user', }, hashed_password: { anyOf: [ @@ -3686,10 +4015,12 @@ export const $backend__schemas__user__CreateUser = { }, ], title: 'Hashed Password', + description: "The user's password hashed", }, fullname: { type: 'string', - title: 'Fullname', + title: 'Full Name', + description: "User's Full Name", }, email: { anyOf: [ @@ -3701,11 +4032,13 @@ export const $backend__schemas__user__CreateUser = { }, ], title: 'Email', + description: "User's email address", }, }, type: 'object', required: ['fullname'], title: 'CreateUser', + description: 'Request to create a user', } as const; export const $backend__schemas__user__UpdateUser = { @@ -3720,6 +4053,7 @@ export const $backend__schemas__user__UpdateUser = { }, ], title: 'Password', + description: 'Password for the user', }, hashed_password: { anyOf: [ @@ -3732,6 +4066,7 @@ export const $backend__schemas__user__UpdateUser = { }, ], title: 'Hashed Password', + description: "The user's password hashed", }, fullname: { anyOf: [ @@ -3742,7 +4077,8 @@ export const $backend__schemas__user__UpdateUser = { type: 'null', }, ], - title: 'Fullname', + title: 'Full Name', + description: "User's Full Name", }, email: { anyOf: [ @@ -3754,17 +4090,20 @@ export const $backend__schemas__user__UpdateUser = { }, ], title: 'Email', + description: "User's email address", }, }, type: 'object', title: 'UpdateUser', + description: 'Request to update a user', } as const; export const $backend__schemas__user__User = { properties: { fullname: { type: 'string', - title: 'Fullname', + title: 'Full Name', + description: "User's Full Name", }, email: { anyOf: [ @@ -3776,23 +4115,28 @@ export const $backend__schemas__user__User = { }, ], title: 'Email', + description: "User's email address", }, id: { type: 'string', - title: 'Id', + title: 'ID', + description: '', }, created_at: { type: 'string', format: 'date-time', - title: 'Created At', + title: 'Created At Timestamp', + description: 'When the user was created', }, updated_at: { type: 'string', format: 'date-time', - title: 'Updated At', + title: 'Updated At Timestamp', + description: 'When the user was updated', }, }, type: 'object', required: ['fullname', 'id', 'created_at', 'updated_at'], title: 'User', + description: 'User schema', } as const; diff --git a/src/interfaces/assistants_web/src/cohere-client/generated/services.gen.ts b/src/interfaces/assistants_web/src/cohere-client/generated/services.gen.ts index e20e458ef1..9d40638905 100644 --- a/src/interfaces/assistants_web/src/cohere-client/generated/services.gen.ts +++ b/src/interfaces/assistants_web/src/cohere-client/generated/services.gen.ts @@ -120,8 +120,8 @@ import type { RegenerateChatStreamV1ChatStreamRegeneratePostResponse, SearchConversationsV1ConversationsSearchGetData, SearchConversationsV1ConversationsSearchGetResponse, - SetEnvVarsV1DeploymentsNameSetEnvVarsPostData, - SetEnvVarsV1DeploymentsNameSetEnvVarsPostResponse, + SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostData, + SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostResponse, SynthesizeMessageV1ConversationsConversationIdSynthesizeMessageIdGetData, SynthesizeMessageV1ConversationsConversationIdSynthesizeMessageIdGetResponse, ToggleConversationPinV1ConversationsConversationIdTogglePinPutData, @@ -145,18 +145,13 @@ import type { UpdateUserV1UsersUserIdPutResponse, } from './types.gen'; -export class DefaultService { +export class AuthService { constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get Strategies * Retrieves the currently enabled list of Authentication strategies. - * - * Args: - * ctx (Context): Context object. - * Returns: - * List[dict]: List of dictionaries containing the enabled auth strategy names. - * @returns ListAuthStrategy Successful Response + * @returns AuthStrategy Successful Response * @throws ApiError */ public getStrategiesV1AuthStrategiesGet(): CancelablePromise { @@ -171,14 +166,6 @@ export class DefaultService { * Logs user in, performing basic email/password auth. * Verifies their credentials, retrieves the user and returns a JWT token. * - * Args: - * login (Login): Login payload. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * dict: JWT token on Basic auth success - * * Raises: * HTTPException: If the strategy or payload are invalid, or if the login fails. * @param data The data for the request. @@ -202,21 +189,11 @@ export class DefaultService { * Authorize * Callback authorization endpoint used for OAuth providers after authenticating on the provider's login screen. * - * Args: - * strategy (str): Current strategy name. - * request (Request): Current Request object. - * session (Session): DB session. - * code (str): OAuth code. - * ctx (Context): Context object. - * - * Returns: - * dict: Containing "token" key, on success. - * * Raises: * HTTPException: If authentication fails, or strategy is invalid. * @param data The data for the request. - * @param data.strategy - * @param data.code + * @param data.strategy Name of strategy in question + * @param data.code OAuth Code * @returns JWTResponse Successful Response * @throws ApiError */ @@ -241,15 +218,6 @@ export class DefaultService { /** * Logout * Logs out the current user, adding the given JWT token to the blacklist. - * - * Args: - * request (Request): current Request object. - * session (DBSessionDep): Database session. - * token (dict): JWT token payload. - * ctx (Context): Context object. - * - * Returns: - * dict: Empty on success * @returns Logout Successful Response * @throws ApiError */ @@ -268,11 +236,6 @@ export class DefaultService { * * If completed, a ToolAuth is stored in the DB containing the access token for the tool. * - * Args: - * request (Request): current Request object. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * * Returns: * RedirectResponse: A redirect pointing to the frontend, contains an error query parameter if * an unexpected error happens during the authentication. @@ -295,19 +258,10 @@ export class DefaultService { * * If completed, the corresponding ToolAuth for the requesting user is removed from the DB. * - * Args: - * tool_id (str): Tool ID to be deleted for the user. (eg. google_drive) Should be one of the values listed in the Tool string enum class. - * request (Request): current Request object. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * DeleteToolAuth: Empty response. - * * Raises: * HTTPException: If there was an error deleting the tool auth. * @param data The data for the request. - * @param data.toolId + * @param data.toolId Tool ID for tool in question * @returns DeleteToolAuth Successful Response * @throws ApiError */ @@ -325,19 +279,14 @@ export class DefaultService { }, }); } +} + +export class ChatService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Chat Stream * Stream chat endpoint to handle user messages and return chatbot responses. - * - * Args: - * session (DBSessionDep): Database session. - * chat_request (CohereChatRequest): Chat request data. - * request (Request): Request object. - * ctx (Context): Context object. - * - * Returns: - * EventSourceResponse: Server-sent event response with chatbot responses. * @param data The data for the request. * @param data.requestBody * @returns ChatResponseEvent Successful Response @@ -360,15 +309,6 @@ export class DefaultService { /** * Regenerate Chat Stream * Endpoint to regenerate stream chat response for the last user message. - * - * Args: - * session (DBSessionDep): Database session. - * chat_request (CohereChatRequest): Chat request data. - * request (Request): Request object. - * ctx (Context): Context object. - * - * Returns: - * EventSourceResponse: Server-sent event response with chatbot responses. * @param data The data for the request. * @param data.requestBody * @returns unknown Successful Response @@ -391,15 +331,6 @@ export class DefaultService { /** * Chat * Chat endpoint to handle user messages and return chatbot responses. - * - * Args: - * chat_request (CohereChatRequest): Chat request data. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * ctx (Context): Context object. - * - * Returns: - * NonStreamedChatResponse: Chatbot response. * @param data The data for the request. * @param data.requestBody * @returns NonStreamedChatResponse Successful Response @@ -416,18 +347,14 @@ export class DefaultService { }, }); } +} + +export class UserService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create User * Create a new user. - * - * Args: - * user (CreateUser): User data to be created. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * User: Created user. * @param data The data for the request. * @param data.requestBody * @returns backend__schemas__user__User Successful Response @@ -450,18 +377,9 @@ export class DefaultService { /** * List Users * List all users. - * - * Args: - * offset (int): Offset to start the list. - * limit (int): Limit of users to be listed. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * list[User]: List of users. * @param data The data for the request. - * @param data.offset - * @param data.limit + * @param data.offset Offset for where request should start returning records from + * @param data.limit Maximum number of records to return per request * @returns backend__schemas__user__User Successful Response * @throws ApiError */ @@ -485,18 +403,10 @@ export class DefaultService { * Get User * Get a user by ID. * - * Args: - * user_id (str): User ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * User: User with the given ID. - * * Raises: * HTTPException: If the user with the given ID is not found. * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @returns backend__schemas__user__User Successful Response * @throws ApiError */ @@ -519,20 +429,10 @@ export class DefaultService { * Update User * Update a user by ID. * - * Args: - * user_id (str): User ID. - * new_user (UpdateUser): New user data. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * ctx (Context): Context object - * - * Returns: - * User: Updated user. - * * Raises: * HTTPException: If the user with the given ID is not found. * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @param data.requestBody * @returns backend__schemas__user__User Successful Response * @throws ApiError @@ -556,21 +456,12 @@ export class DefaultService { /** * Delete User - * " * Delete a user by ID. * - * Args: - * user_id (str): User ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * DeleteUser: Empty response. - * * Raises: * HTTPException: If the user with the given ID is not found. * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @returns DeleteUser Successful Response * @throws ApiError */ @@ -588,23 +479,19 @@ export class DefaultService { }, }); } +} + +export class ConversationService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get Conversation * Get a conversation by ID. * - * Args: - * conversation_id (str): Conversation ID. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * - * Returns: - * ConversationPublic: Conversation with the given ID. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId + * @param data.conversationId Conversation ID for conversation in question * @returns ConversationPublic Successful Response * @throws ApiError */ @@ -627,19 +514,10 @@ export class DefaultService { * Update Conversation * Update a conversation by ID. * - * Args: - * conversation_id (str): Conversation ID. - * new_conversation (UpdateConversationRequest): New conversation data. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * ConversationPublic: Updated conversation. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId + * @param data.conversationId Conversation ID for conversation in question * @param data.requestBody * @returns ConversationPublic Successful Response * @throws ApiError @@ -665,18 +543,10 @@ export class DefaultService { * Delete Conversation * Delete a conversation by ID. * - * Args: - * conversation_id (str): Conversation ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * DeleteConversationResponse: Empty response. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId + * @param data.conversationId Conversation ID for conversation in question * @returns DeleteConversationResponse Successful Response * @throws ApiError */ @@ -698,22 +568,11 @@ export class DefaultService { /** * List Conversations * List all conversations. - * - * Args: - * offset (int): Offset to start the list. - * limit (int): Limit of conversations to be listed. - * order_by (str): A field by which to order the conversations. - * agent_id (str): Query parameter for agent ID to optionally filter conversations by agent. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * - * Returns: - * list[ConversationWithoutMessages]: List of conversations. * @param data The data for the request. - * @param data.offset - * @param data.limit - * @param data.orderBy - * @param data.agentId + * @param data.orderBy Field to sorts results by + * @param data.agentId Agent ID to filter results by + * @param data.offset Offset for where request should start returning records from + * @param data.limit Maximum number of records to return per request * @returns ConversationWithoutMessages Successful Response * @throws ApiError */ @@ -724,10 +583,10 @@ export class DefaultService { method: 'GET', url: '/v1/conversations', query: { - offset: data.offset, - limit: data.limit, order_by: data.orderBy, agent_id: data.agentId, + offset: data.offset, + limit: data.limit, }, errors: { 422: 'Validation Error', @@ -737,8 +596,9 @@ export class DefaultService { /** * Toggle Conversation Pin + * Toggle whether a conversation is pinned or not * @param data The data for the request. - * @param data.conversationId + * @param data.conversationId Conversation ID for conversation in question * @param data.requestBody * @returns ConversationWithoutMessages Successful Response * @throws ApiError @@ -763,23 +623,12 @@ export class DefaultService { /** * Search Conversations * Search conversations by title. - * - * Args: - * query (str): Query string to search for in conversation titles. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * offset (int): Offset to start the list. - * limit (int): Limit of conversations to be listed. - * agent_id (str): Query parameter for agent ID to optionally filter conversations by agent. - * ctx (Context): Context object. - * - * Returns: - * list[ConversationWithoutMessages]: List of conversations that match the query. * @param data The data for the request. - * @param data.query - * @param data.offset - * @param data.limit - * @param data.agentId + * @param data.query Query string to search for in a conversation title + * @param data.orderBy Field to sorts results by + * @param data.agentId Agent ID to filter results by + * @param data.offset Offset for where request should start returning records from + * @param data.limit Maximum number of records to return per request * @returns ConversationWithoutMessages Successful Response * @throws ApiError */ @@ -791,9 +640,10 @@ export class DefaultService { url: '/v1/conversations:search', query: { query: data.query, + order_by: data.orderBy, + agent_id: data.agentId, offset: data.offset, limit: data.limit, - agent_id: data.agentId, }, errors: { 422: 'Validation Error', @@ -806,15 +656,6 @@ export class DefaultService { * Uploads and creates a batch of File object. * If no conversation_id is provided, a new Conversation is created as well. * - * Args: - * session (DBSessionDep): Database session. - * conversation_id (Optional[str]): Conversation ID passed from request query parameter. - * files (list[FastAPIUploadFile]): List of files to be uploaded. - * ctx (Context): Context object. - * - * Returns: - * list[UploadConversationFileResponse]: List of uploaded files. - * * Raises: * HTTPException: If the conversation with the given ID is not found. Status code 404. * HTTPException: If the file wasn't uploaded correctly. Status code 500. @@ -841,18 +682,10 @@ export class DefaultService { * List Files * List all files from a conversation. Important - no pagination support yet. * - * Args: - * conversation_id (str): Conversation ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * list[ListConversationFile]: List of files from the conversation. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId + * @param data.conversationId Conversation ID for conversation in question * @returns ListConversationFile Successful Response * @throws ApiError */ @@ -875,20 +708,11 @@ export class DefaultService { * Get File * Get a conversation file by ID. * - * Args: - * conversation_id (str): Conversation ID. - * file_id (str): File ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * FileMetadata: File with the given ID. - * * Raises: * HTTPException: If the conversation or file with the given ID is not found, or if the file does not belong to the conversation. * @param data The data for the request. - * @param data.conversationId - * @param data.fileId + * @param data.conversationId Conversation ID for conversation in question + * @param data.fileId File ID for file in question * @returns FileMetadata Successful Response * @throws ApiError */ @@ -912,19 +736,11 @@ export class DefaultService { * Delete File * Delete a file by ID. * - * Args: - * conversation_id (str): Conversation ID. - * file_id (str): File ID. - * session (DBSessionDep): Database session. - * - * Returns: - * DeleteFile: Empty response. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId - * @param data.fileId + * @param data.conversationId Conversation ID for conversation in question + * @param data.fileId File ID for file in question * @returns DeleteConversationFileResponse Successful Response * @throws ApiError */ @@ -948,20 +764,11 @@ export class DefaultService { * Generate Title * Generate a title for a conversation and update the conversation with the generated title. * - * Args: - * conversation_id (str): Conversation ID. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * ctx (Context): Context object. - * - * Returns: - * str: Generated title for the conversation. - * * Raises: * HTTPException: If the conversation with the given ID is not found. * @param data The data for the request. - * @param data.conversationId - * @param data.model + * @param data.conversationId Conversation ID for conversation in question + * @param data.model Model to filter results by * @returns GenerateTitleResponse Successful Response * @throws ApiError */ @@ -987,20 +794,11 @@ export class DefaultService { * Synthesize Message * Generate a synthesized audio for a specific message in a conversation. * - * Args: - * conversation_id (str): Conversation ID. - * message_id (str): Message ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * Response: Synthesized audio file. - * * Raises: * HTTPException: If the message with the given ID is not found or synthesis fails. * @param data The data for the request. - * @param data.conversationId - * @param data.messageId + * @param data.conversationId Conversation ID for conversation in question + * @param data.messageId Message ID for message in question * @returns unknown Successful Response * @throws ApiError */ @@ -1019,20 +817,16 @@ export class DefaultService { }, }); } +} + +export class ToolService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * List Tools * List all available tools. - * - * Args: - * request (Request): The request to validate - * session (DBSessionDep): Database session. - * agent_id (str): Agent ID. - * ctx (Context): Context object. - * Returns: - * list[ToolDefinition]: List of available tools. * @param data The data for the request. - * @param data.agentId + * @param data.agentId Agent ID to filter results by * @returns ToolDefinition Successful Response * @throws ApiError */ @@ -1050,17 +844,14 @@ export class DefaultService { }, }); } +} + +export class DeploymentService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create Deployment * Create a new deployment. - * - * Args: - * deployment (DeploymentCreate): Deployment data to be created. - * session (DBSessionDep): Database session. - * - * Returns: - * DeploymentSchema: Created deployment. * @param data The data for the request. * @param data.requestBody * @returns Deployment Successful Response @@ -1083,15 +874,8 @@ export class DefaultService { /** * List Deployments * List all available deployments and their models. - * - * Args: - * session (DBSessionDep) - * all (bool): Include all deployments, regardless of availability. - * ctx (Context): Context object. - * Returns: - * list[Deployment]: List of available deployment options. * @param data The data for the request. - * @param data.all + * @param data.all Include all deployments, regardless of availability. * @returns Deployment Successful Response * @throws ApiError */ @@ -1114,18 +898,10 @@ export class DefaultService { * Update Deployment * Update a deployment. * - * Args: - * deployment_id (str): Deployment ID. - * new_deployment (DeploymentUpdate): Deployment data to be updated. - * session (DBSessionDep): Database session. - * - * Returns: - * Deployment: Updated deployment. - * * Raises: * HTTPException: If deployment not found. * @param data The data for the request. - * @param data.deploymentId + * @param data.deploymentId Deployment ID for deployment in question * @param data.requestBody * @returns Deployment Successful Response * @throws ApiError @@ -1150,11 +926,8 @@ export class DefaultService { /** * Get Deployment * Get a deployment by ID. - * - * Returns: - * Deployment: Deployment with the given ID. * @param data The data for the request. - * @param data.deploymentId + * @param data.deploymentId Deployment ID for deployment in question * @returns Deployment Successful Response * @throws ApiError */ @@ -1177,18 +950,10 @@ export class DefaultService { * Delete Deployment * Delete a deployment by ID. * - * Args: - * deployment_id (str): Deployment ID. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * - * Returns: - * DeleteDeployment: Empty response. - * * Raises: * HTTPException: If the deployment with the given ID is not found. * @param data The data for the request. - * @param data.deploymentId + * @param data.deploymentId Deployment ID for deployment in question * @returns DeleteDeployment Successful Response * @throws ApiError */ @@ -1210,28 +975,20 @@ export class DefaultService { /** * Set Env Vars * Set environment variables for the deployment. - * - * Args: - * name (str): Deployment name. - * env_vars (UpdateDeploymentEnv): Environment variables to set. - * valid_env_vars (str): Validated environment variables. - * ctx (Context): Context object. - * Returns: - * str: Empty string. * @param data The data for the request. - * @param data.name + * @param data.deploymentName Deployment Name for deployment in question * @param data.requestBody * @returns unknown Successful Response * @throws ApiError */ - public setEnvVarsV1DeploymentsNameSetEnvVarsPost( - data: SetEnvVarsV1DeploymentsNameSetEnvVarsPostData - ): CancelablePromise { + public setEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPost( + data: SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostData + ): CancelablePromise { return this.httpRequest.request({ method: 'POST', - url: '/v1/deployments/{name}/set_env_vars', + url: '/v1/deployments/{deployment_name}/set_env_vars', path: { - name: data.name, + deployment_name: data.deploymentName, }, body: data.requestBody, mediaType: 'application/json', @@ -1240,15 +997,14 @@ export class DefaultService { }, }); } +} + +export class ExperimentalFeaturesService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * List Experimental Features * List all experimental features and if they are enabled - * - * Args: - * ctx (Context): Context object. - * Returns: - * Dict[str, bool]: Experimental feature and their isEnabled state * @returns boolean Successful Response * @throws ApiError */ @@ -1258,6 +1014,10 @@ export class DefaultService { url: '/v1/experimental_features/', }); } +} + +export class AgentsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create Agent @@ -1289,7 +1049,7 @@ export class DefaultService { * List all agents. * @param data The data for the request. * @param data.visibility Agent visibility - * @param data.organizationId Organization ID of the agent + * @param data.organizationId Organization ID to filter results by * @param data.offset Offset for where request should start returning records from * @param data.limit Maximum number of records to return per request * @returns AgentPublic Successful Response @@ -1613,17 +1373,14 @@ export class DefaultService { }, }); } +} + +export class SnapshotService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * List Snapshots * List all snapshots. - * - * Args: - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * list[SnapshotWithLinks]: List of all snapshots with their links. * @returns SnapshotWithLinks Successful Response * @throws ApiError */ @@ -1637,14 +1394,6 @@ export class DefaultService { /** * Create Snapshot * Create a new snapshot and snapshot link to share the conversation. - * - * Args: - * snapshot_request (CreateSnapshotRequest): Snapshot creation request. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * CreateSnapshotResponse: Snapshot creation response. * @param data The data for the request. * @param data.requestBody * @returns CreateSnapshotResponse Successful Response @@ -1667,16 +1416,8 @@ export class DefaultService { /** * Get Snapshot * Get a snapshot by link ID. - * - * Args: - * link_id (str): Snapshot link ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * Snapshot: Snapshot with the given link ID. * @param data The data for the request. - * @param data.linkId + * @param data.linkId Link ID for the snapshot link in question * @returns SnapshotPublic Successful Response * @throws ApiError */ @@ -1698,16 +1439,8 @@ export class DefaultService { /** * Delete Snapshot Link * Delete a snapshot link by ID. - * - * Args: - * link_id (str): Snapshot link ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * DeleteSnapshotLinkResponse: Empty response. * @param data The data for the request. - * @param data.linkId + * @param data.linkId Link ID for the snapshot link in question * @returns DeleteSnapshotLinkResponse Successful Response * @throws ApiError */ @@ -1729,16 +1462,8 @@ export class DefaultService { /** * Delete Snapshot * Delete a snapshot by ID. - * - * Args: - * snapshot_id (str): Snapshot ID. - * session (DBSessionDep): Database session. - * ctx (Context): Context object. - * - * Returns: - * DeleteSnapshotResponse: Empty response. * @param data The data for the request. - * @param data.snapshotId + * @param data.snapshotId Snapshot ID for the snapshot in question * @returns DeleteSnapshotResponse Successful Response * @throws ApiError */ @@ -1756,17 +1481,14 @@ export class DefaultService { }, }); } +} + +export class OrganizationService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * List Organizations * List all available organizations. - * - * Args: - * request (Request): Request object. - * session (DBSessionDep): Database session. - * - * Returns: - * list[Organization]: List of available organizations. * @returns Organization Successful Response * @throws ApiError */ @@ -1780,13 +1502,6 @@ export class DefaultService { /** * Create Organization * Create a new organization. - * - * Args: - * organization (CreateOrganization): Organization data - * session (DBSessionDep): Database session. - * - * Returns: - * Organization: Created organization. * @param data The data for the request. * @param data.requestBody * @returns Organization Successful Response @@ -1809,16 +1524,8 @@ export class DefaultService { /** * Update Organization * Update organization by ID. - * - * Args: - * organization_id (str): Tool ID. - * new_organization (ToolUpdate): New organization data. - * session (DBSessionDep): Database session. - * - * Returns: - * Organization: Updated organization. * @param data The data for the request. - * @param data.organizationId + * @param data.organizationId Organization ID for the organization in question * @param data.requestBody * @returns Organization Successful Response * @throws ApiError @@ -1843,16 +1550,8 @@ export class DefaultService { /** * Get Organization * Get a organization by ID. - * - * Args: - * organization_id (str): Tool ID. - * session (DBSessionDep): Database session. - * ctx: Context. - * - * Returns: - * Organization: Organization with the given ID. * @param data The data for the request. - * @param data.organizationId + * @param data.organizationId Organization ID for the organization in question * @returns Organization Successful Response * @throws ApiError */ @@ -1874,15 +1573,8 @@ export class DefaultService { /** * Delete Organization * Delete a organization by ID. - * - * Args: - * organization_id (str): Tool ID. - * session (DBSessionDep): Database session. - * - * Returns: - * DeleteOrganization: Organization deleted. * @param data The data for the request. - * @param data.organizationId + * @param data.organizationId Organization ID for the organization in question * @returns DeleteOrganization Successful Response * @throws ApiError */ @@ -1904,15 +1596,8 @@ export class DefaultService { /** * Get Organization Users * Get organization users by ID. - * - * Args: - * organization_id (str): Organization ID. - * session (DBSessionDep): Database session. - * - * Returns: - * list[User]: List of users in the organization * @param data The data for the request. - * @param data.organizationId + * @param data.organizationId Organization ID for the organization in question * @returns backend__schemas__user__User Successful Response * @throws ApiError */ @@ -1930,17 +1615,14 @@ export class DefaultService { }, }); } +} + +export class ModelService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create Model * Create a new model. - * - * Args: - * model (ModelCreate): Model data to be created. - * session (DBSessionDep): Database session. - * - * Returns: - * ModelSchema: Created model. * @param data The data for the request. * @param data.requestBody * @returns Model Successful Response @@ -1963,12 +1645,9 @@ export class DefaultService { /** * List Models * List all available models - * - * Returns: - * list[Model]: List of available models. * @param data The data for the request. - * @param data.offset - * @param data.limit + * @param data.offset Offset for where request should start returning records from + * @param data.limit Maximum number of records to return per request * @returns Model Successful Response * @throws ApiError */ @@ -1992,18 +1671,10 @@ export class DefaultService { * Update Model * Update a model by ID. * - * Args: - * model_id (str): Model ID. - * new_model (ModelCreateUpdate): New model data. - * session (DBSessionDep): Database session. - * - * Returns: - * ModelSchema: Updated model. - * * Raises: * HTTPException: If the model with the given ID is not found. * @param data The data for the request. - * @param data.modelId + * @param data.modelId Model ID for the model in question * @param data.requestBody * @returns Model Successful Response * @throws ApiError @@ -2028,11 +1699,8 @@ export class DefaultService { /** * Get Model * Get a model by ID. - * - * Returns: - * Model: Model with the given ID. * @param data The data for the request. - * @param data.modelId + * @param data.modelId Model ID for the model in question * @returns Model Successful Response * @throws ApiError */ @@ -2055,18 +1723,10 @@ export class DefaultService { * Delete Model * Delete a model by ID. * - * Args: - * model_id (str): Model ID. - * session (DBSessionDep): Database session. - * request (Request): Request object. - * - * Returns: - * DeleteModel: Empty response. - * * Raises: * HTTPException: If the model with the given ID is not found. * @param data The data for the request. - * @param data.modelId + * @param data.modelId Model ID for the model in question * @returns DeleteModel Successful Response * @throws ApiError */ @@ -2084,13 +1744,18 @@ export class DefaultService { }, }); } +} + +export class ScimService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get Users + * Return users * @param data The data for the request. - * @param data.count - * @param data.startIndex - * @param data.filter + * @param data.startIndex Start Index for request + * @param data.count Maximum number of records to return per request + * @param data.filter Filter to use when filtering response * @returns ListUserResponse Successful Response * @throws ApiError */ @@ -2101,8 +1766,8 @@ export class DefaultService { method: 'GET', url: '/scim/v2/Users', query: { - count: data.count, start_index: data.startIndex, + count: data.count, filter: data.filter, }, errors: { @@ -2113,6 +1778,7 @@ export class DefaultService { /** * Create User + * Create a new user * @param data The data for the request. * @param data.requestBody * @returns unknown Successful Response @@ -2134,8 +1800,9 @@ export class DefaultService { /** * Get User + * Get user by User ID * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @returns unknown Successful Response * @throws ApiError */ @@ -2156,8 +1823,9 @@ export class DefaultService { /** * Update User + * Update a user * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @param data.requestBody * @returns unknown Successful Response * @throws ApiError @@ -2181,8 +1849,9 @@ export class DefaultService { /** * Patch User + * Patch a user * @param data The data for the request. - * @param data.userId + * @param data.userId User ID for the user in question * @param data.requestBody * @returns unknown Successful Response * @throws ApiError @@ -2206,10 +1875,11 @@ export class DefaultService { /** * Get Groups + * Return Groups * @param data The data for the request. - * @param data.count - * @param data.startIndex - * @param data.filter + * @param data.startIndex Start Index for request + * @param data.count Maximum number of records to return per request + * @param data.filter Filter to use when filtering response * @returns ListGroupResponse Successful Response * @throws ApiError */ @@ -2220,8 +1890,8 @@ export class DefaultService { method: 'GET', url: '/scim/v2/Groups', query: { - count: data.count, start_index: data.startIndex, + count: data.count, filter: data.filter, }, errors: { @@ -2232,6 +1902,7 @@ export class DefaultService { /** * Create Group + * Create a group * @param data The data for the request. * @param data.requestBody * @returns unknown Successful Response @@ -2253,8 +1924,9 @@ export class DefaultService { /** * Get Group + * Get group by group ID * @param data The data for the request. - * @param data.groupId + * @param data.groupId Group ID for the group in question * @returns unknown Successful Response * @throws ApiError */ @@ -2275,8 +1947,9 @@ export class DefaultService { /** * Patch Group + * Patch a group * @param data The data for the request. - * @param data.groupId + * @param data.groupId Group ID for the group in question * @param data.requestBody * @returns unknown Successful Response * @throws ApiError @@ -2300,8 +1973,9 @@ export class DefaultService { /** * Delete Group + * Delete a group * @param data The data for the request. - * @param data.groupId + * @param data.groupId Group ID for the group in question * @returns void Successful Response * @throws ApiError */ @@ -2319,6 +1993,10 @@ export class DefaultService { }, }); } +} + +export class DefaultService { + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Health diff --git a/src/interfaces/assistants_web/src/cohere-client/generated/types.gen.ts b/src/interfaces/assistants_web/src/cohere-client/generated/types.gen.ts index 7ae5f4ce58..62cc7928cd 100644 --- a/src/interfaces/assistants_web/src/cohere-client/generated/types.gen.ts +++ b/src/interfaces/assistants_web/src/cohere-client/generated/types.gen.ts @@ -139,6 +139,28 @@ export enum AgentVisibility { ALL = 'all', } +/** + * Auth Strategy + */ +export type AuthStrategy = { + /** + * Auth strategy name + */ + strategy: string; + /** + * Client ID to be used + */ + client_id?: string | null; + /** + * The endpoint for authorization + */ + authorization_endpoint?: string | null; + /** + * If PKCE is enabled + */ + pkce_enabled: boolean; +}; + export type Body_batch_upload_file_v1_agents_batch_upload_file_post = { files: Array; }; @@ -149,22 +171,44 @@ export type Body_batch_upload_file_v1_conversations_batch_upload_file_post = { }; /** - * A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's message. + * A list of previous messages between the user and the model, meant to give the mode + * conversational context for responding to the user's message. */ export type ChatMessage = { role: ChatRole; + /** + * Contents of the chat message. + */ message?: string | null; + /** + * Contents of the tool plan. + */ tool_plan?: string | null; + /** + * Results from the tool call. + */ tool_results?: Array<{ [key: string]: unknown; }> | null; + /** + * List of tool calls generated for custom tools + */ tool_calls?: Array<{ [key: string]: unknown; }> | null; }; +/** + * Chat Response Event + */ export type ChatResponseEvent = { + /** + * Type of stream event + */ event: StreamEvent; + /** + * Data returned from chat response of a given event type + */ data: | StreamStart | StreamTextGeneration @@ -190,10 +234,25 @@ export enum ChatRole { TOOL = 'TOOL', } +/** + * Schema for a citation + */ export type Citation = { + /** + * Citation text + */ text: string; + /** + * Start position for the citation + */ start: number; + /** + * End position for the citation + */ end: number; + /** + * Documents used for the citation + */ document_ids: Array; }; @@ -210,64 +269,273 @@ export enum CohereChatPromptTruncation { * See: https://github.com/cohere-ai/cohere-python/blob/main/src/cohere/base_client.py#L1629 */ export type CohereChatRequest = { + /** + * The message to send to the chatbot + */ message: string; + /** + * A list of entries used to construct the conversation. If provided, these messages will be used to build the prompt and the conversation_id will be ignored so no data will be stored to maintain state. + */ chat_history?: Array | null; + /** + * To store a conversation then create a conversation id and use it for every related request + */ conversation_id?: string; + /** + * + * List of custom or managed tools to use for the response. + * If passing in managed tools, you only need to provide the name of the tool. + * If passing in custom tools, you need to provide the name, description, and optionally parameter defintions of the tool. + * Passing a mix of custom and managed tools is not supported. + * + * Managed Tools Examples: + * tools=[ + * { + * "name": "Wiki Retriever - LangChain", + * }, + * { + * "name": "Calculator", + * } + * ] + * + * Custom Tools Examples: + * tools=[ + * { + * "name": "movie_title_generator", + * "description": "tool to generate a cool movie title", + * "parameter_definitions": { + * "synopsis": { + * "description": "short synopsis of the movie", + * "type": "str", + * "required": true + * } + * } + * }, + * { + * "name": "random_number_generator", + * "description": "tool to generate a random number between min and max", + * "parameter_definitions": { + * "min": { + * "description": "minimum number", + * "type": "int", + * "required": true + * }, + * "max": { + * "description": "maximum number", + * "type": "int", + * "required": true + * } + * } + * }, + * { + * "name": "joke_generator", + * "description": "tool to generate a random joke", + * } + * ] + * + */ tools?: Array | null; + /** + * Documents to use to generate grounded response with citations. Example: + * documents=[ + * { + * "id": "national_geographic_everest", + * "title": "Height of Mount Everest", + * "text": "The height of Mount Everest is 29,035 feet", + * "url": "https://education.nationalgeographic.org/resource/mount-everest/", + * }, + * { + * "id": "national_geographic_mariana", + * "title": "Depth of the Mariana Trench", + * "text": "The depth of the Mariana Trench is 36,070 feet", + * "url": "https://www.nationalgeographic.org/activity/mariana-trench-deepest-place-earth", + * }, + * ] + * + */ documents?: Array<{ [key: string]: unknown; }>; + /** + * The model to use for generating the response. + */ model?: string | null; + /** + * A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations. + */ temperature?: number | null; + /** + * Ensures only the top k most likely tokens are considered for generation at each step. + */ k?: number | null; + /** + * Ensures that only the most likely tokens, with total probability mass of p, are considered for generation at each step. If both k and p are enabled, p acts after k. + */ p?: number | null; + /** + * A string to override the preamble. + */ preamble?: string | null; + /** + * List of File IDs for PDFs used in RAG for the response. + */ file_ids?: Array | null; + /** + * When set to true a list of search queries are generated. No search will occur nor replies to the user's message. + */ search_queries_only?: boolean | null; + /** + * The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. + */ max_tokens?: number | null; + /** + * If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. + */ seed?: number | null; + /** + * A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. + */ stop_sequences?: Array | null; + /** + * Used to reduce repetitiveness of generated tokens. Similar to frequency_penalty, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. + */ presence_penalty?: number | null; + /** + * Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. + */ frequency_penalty?: number | null; - prompt_truncation?: CohereChatPromptTruncation; + /** + * Dictates how the prompt will be constructed. Defaults to 'AUTO_PRESERVE_ORDER'. + */ + prompt_truncation?: CohereChatPromptTruncation | null; + /** + * A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. + */ tool_results?: Array<{ [key: string]: unknown; }> | null; + /** + * If set to true, the model will generate a single response in a single step. This is useful for generating a response to a single message. + */ force_single_step?: boolean | null; + /** + * The agent ID to use for the chat. + */ agent_id?: string | null; }; +/** + * Schema for a public conversation file + */ export type ConversationFilePublic = { + /** + * Unique identifier of the file + */ id: string; - user_id: string; + /** + * When file was created + */ created_at: string; + /** + * When file was updated + */ updated_at: string; - conversation_id: string; + /** + * Name of the file + */ file_name: string; + /** + * Size of the file in bytes + */ file_size?: number; + /** + * Unique identifier for who created the file + */ + user_id: string; + /** + * Unique identifier for the conversation the file is associated to + */ + conversation_id: string; }; +/** + * A public conversation which removes the User ID and Organization ID + */ export type ConversationPublic = { + /** + * Unique identifier for the conversation + */ id: string; + /** + * When the conversation was created + */ created_at: string; + /** + * When the conversation was updated + */ updated_at: string; + /** + * Title of the conversation + */ title: string; + /** + * The conversation messages + */ messages: Array; + /** + * List of files for the conversation + */ files: Array; - description: string | null; - agent_id: string | null; + /** + * Description of the conversation + */ + description?: string | null; + /** + * Unique identifier for the agent used in the conversation + */ + agent_id?: string | null; + /** + * If conversation is pinned + */ is_pinned: boolean; readonly total_file_size: number; }; +/** + * A public conversation without messages attached + */ export type ConversationWithoutMessages = { + /** + * Unique identifier for the conversation + */ id: string; + /** + * When the conversation was created + */ created_at: string; + /** + * When the conversation was updated + */ updated_at: string; + /** + * Title of the conversation + */ title: string; + /** + * List of files for the conversation + */ files: Array; - description: string | null; - agent_id: string | null; + /** + * Description of the conversation + */ + description?: string | null; + /** + * Unique identifier for the agent used in the conversation + */ + agent_id?: string | null; + /** + * If conversation is pinned + */ is_pinned: boolean; readonly total_file_size: number; }; @@ -349,22 +617,55 @@ export type CreateAgentToolMetadataRequest = { }; export type CreateGroup = { + /** + * Schemas for the group + */ schemas: Array; + /** + * Members of the group + */ members: Array; + /** + * Display name for the group + */ displayName: string; }; +/** + * Request to create an organization + */ export type CreateOrganization = { + /** + * Name of the organization + */ name: string; }; +/** + * Request to create a snapshot + */ export type CreateSnapshotRequest = { + /** + * Unique identifier for the conversation + */ conversation_id: string; }; +/** + * Response for creating a snapshot + */ export type CreateSnapshotResponse = { + /** + * Unique identifier for the snapshot + */ snapshot_id: string; + /** + * Unique identifier for the link + */ link_id: string; + /** + * List of messages + */ messages: Array; }; @@ -373,6 +674,9 @@ export type CreateSnapshotResponse = { */ export type DeleteAgent = unknown; +/** + * Response for deleting an agent file + */ export type DeleteAgentFileResponse = unknown; /** @@ -380,102 +684,282 @@ export type DeleteAgentFileResponse = unknown; */ export type DeleteAgentToolMetadata = unknown; +/** + * Response for deleting a conversation file + */ export type DeleteConversationFileResponse = unknown; +/** + * Response for deleting a conversation + */ export type DeleteConversationResponse = unknown; +/** + * Delete Deployment Response + */ export type DeleteDeployment = unknown; +/** + * Response for deleting a model + */ export type DeleteModel = unknown; +/** + * Response when deleting organization + */ export type DeleteOrganization = unknown; +/** + * Response for deleting a snapshot link + */ export type DeleteSnapshotLinkResponse = unknown; +/** + * Response for deleting a snapshot + */ export type DeleteSnapshotResponse = unknown; +/** + * Response when deleting a tool auth + */ export type DeleteToolAuth = unknown; +/** + * Response when deleting a user + */ export type DeleteUser = unknown; +/** + * Deployment Schema + */ export type Deployment = { + /** + * Unique Identifier for the Deployment + */ id?: string | null; + /** + * Name of the Deployment + */ name: string; + /** + * List of models for the deployment + */ models: Array; + /** + * Is deployment is available + */ is_available?: boolean; - env_vars: Array | null; + /** + * Environment Variables for the Deployment + */ + env_vars?: Array | null; + /** + * Description of the deployment + */ description?: string | null; + /** + * Is the deployment from the commmunity + */ is_community?: boolean | null; }; +/** + * Deployment Create Schema + */ export type DeploymentCreate = { + /** + * Unique Identifier for the Deployment + */ id?: string | null; + /** + * Name of the Deployment + */ name: string; + /** + * Description of the deployment + */ description?: string | null; + /** + * Deployment Class Name + */ deployment_class_name: string; + /** + * Is the deployment from the commmunity + */ is_community?: boolean; + /** + * The default deployment configuration + */ default_deployment_config: { [key: string]: string; }; }; +/** + * Deployment Update Schema + */ export type DeploymentUpdate = { + /** + * Name of the Deployment + */ name?: string | null; + /** + * Description of the deployment + */ description?: string | null; + /** + * Deployment Class Name + */ deployment_class_name?: string | null; + /** + * Is the deployment from the commmunity + */ is_community?: boolean | null; + /** + * The default deployment configuration + */ default_deployment_config?: { [key: string]: string; } | null; }; +/** + * Schema for a Document + */ export type Document = { + /** + * Document text + */ text: string; + /** + * Unique Identifier for the document + */ document_id: string; - title: string | null; - url: string | null; - fields: { + /** + * Document title + */ + title?: string | null; + /** + * Document URL + */ + url?: string | null; + /** + * Document Fields + */ + fields?: { [key: string]: unknown; } | null; - tool_name: string | null; + /** + * Tool name for the document + */ + tool_name?: string | null; }; export type Email = { + /** + * Is email the primary email + */ primary: boolean; + /** + * Email value + */ value?: string | null; + /** + * Type of email + */ type: string; }; +/** + * Schema for file metadata + */ export type FileMetadata = { + /** + * Unique identifier of the file + */ id: string; - file_name: string; - file_content: string; - file_size?: number; - created_at: string; + /** + * When file was created + */ + created_at: string; + /** + * When file was updated + */ updated_at: string; + /** + * Name of the file + */ + file_name: string; + /** + * Size of the file in bytes + */ + file_size?: number; + /** + * The contents of the file + */ + file_content: string; }; +/** + * Response for generating a title + */ export type GenerateTitleResponse = { + /** + * Title generated for the conversation + */ title: string; + /** + * Error message if the response is an error + */ error?: string | null; }; export type Group = { + /** + * Schemas for the group + */ schemas: Array; + /** + * Members of the group + */ members: Array; + /** + * Display name for the group + */ displayName: string; + /** + * Unique identifier for the group + */ id: string; + /** + * Metadata for the group + */ meta: Meta; }; export type GroupMember = { + /** + * Value + */ value: string; + /** + * Display + */ display: string; }; export type GroupOperation = { + /** + * Op + */ op: string; + /** + * Path + */ path?: string | null; + /** + * Value + */ value: | { [key: string]: string; @@ -489,63 +973,164 @@ export type HTTPValidationError = { detail?: Array; }; +/** + * JWT Response + */ export type JWTResponse = { + /** + * JSON Web Token + */ token: string; }; -export type ListAuthStrategy = { - strategy: string; - client_id: string | null; - authorization_endpoint: string | null; - pkce_enabled: boolean; -}; - +/** + * Listing conversation files + */ export type ListConversationFile = { + /** + * Unique identifier of the file + */ id: string; - user_id: string; + /** + * When file was created + */ created_at: string; + /** + * When file was updated + */ updated_at: string; - conversation_id: string; + /** + * Name of the file + */ file_name: string; + /** + * Size of the file in bytes + */ file_size?: number; + /** + * Unique identifier for who created the file + */ + user_id: string; + /** + * Unique identifier for the conversation the file is associated to + */ + conversation_id: string; }; export type ListGroupResponse = { + /** + * Total results available + */ totalResults: number; + /** + * Start index for returned results + */ startIndex: number; + /** + * Total results returned in the request + */ itemsPerPage: number; + /** + * List of Groups + */ Resources: Array; }; export type ListUserResponse = { + /** + * Total results available + */ totalResults: number; + /** + * Start index for returned results + */ startIndex: number; + /** + * Total results returned in the request + */ itemsPerPage: number; + /** + * List of Users + */ Resources: Array; }; +/** + * Login Request + */ export type Login = { + /** + * Auth strategy to use + */ strategy: string; + /** + * Login payload depending on strategy used + */ payload?: { [key: string]: string; } | null; }; +/** + * Logout Request + */ export type Logout = unknown; +/** + * Message Schema + */ export type Message = { + /** + * The text content of the message + */ text: string; + /** + * Unique identifier of the message + */ id: string; + /** + * When message was created + */ created_at: string; + /** + * When message was updated + */ updated_at: string; - generation_id: string | null; + /** + * Generation ID for the message + */ + generation_id?: string | null; + /** + * Position in the conversation + */ position: number; + /** + * Is the message active + */ is_active: boolean; + /** + * Documents associated with the message + */ documents: Array; + /** + * Citations associated with the message + */ citations: Array; + /** + * Files associated with the message + */ files: Array; + /** + * Tool calls associated with the message + */ tool_calls: Array; - tool_plan: string | null; + /** + * Tool plan associated with the message + */ + tool_plan?: string | null; + /** + * Agent associated with the message + */ agent: MessageAgent; }; @@ -554,134 +1139,380 @@ export enum MessageAgent { CHATBOT = 'CHATBOT', } +/** + * Schema for metadata + */ export type Meta = { + /** + * Type of resource the metadata is for + */ resourceType: string; + /** + * When metadata was created + */ created: string; + /** + * When metadata was last modified + */ lastModified: string; }; export type Model = { - id: string; + /** + * Model name + */ name: string; + /** + * Cohere model name + */ + cohere_name?: string | null; + /** + * Model description + */ + description?: string | null; + /** + * Unique identifier for the model + */ + id: string; + /** + * Unique identifier for the deployment + */ deployment_id: string; - cohere_name: string | null; - description: string | null; }; export type ModelCreate = { + /** + * Model name + */ name: string; - cohere_name: string | null; - description: string | null; + /** + * Cohere model name + */ + cohere_name?: string | null; + /** + * Model description + */ + description?: string | null; + /** + * Unique identifier for the deployment + */ deployment_id: string; }; export type ModelUpdate = { + /** + * Model name + */ name?: string | null; + /** + * Cohere model name + */ cohere_name?: string | null; + /** + * Model description + */ description?: string | null; + /** + * Unique identifier for the deployment + */ deployment_id?: string | null; }; export type Name = { + /** + * User's given name + */ givenName: string; + /** + * User's family name + */ familyName: string; }; +/** + * Non streamed chat response + */ export type NonStreamedChatResponse = { - response_id: string | null; - generation_id: string | null; - chat_history: Array | null; + /** + * Unique identifier for the response + */ + response_id?: string | null; + /** + * Unique identifier for the generation + */ + generation_id?: string | null; + /** + * A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's message. + */ + chat_history?: Array | null; + /** + * Reason the chat stream ended + */ finish_reason: string; + /** + * Contents of the chat message + */ text: string; + /** + * Citations for the chat message + */ citations?: Array | null; + /** + * Documents used to generate grounded response with citations + */ documents?: Array | null; + /** + * Search results used to generate grounded response with citations + */ search_results?: Array<{ [key: string]: unknown; }> | null; + /** + * List of generated search queries. + */ search_queries?: Array | null; - conversation_id: string | null; + /** + * To store a conversation then create a conversation id and use it for every related request + */ + conversation_id?: string | null; + /** + * List of tool calls generated for custom tools + */ tool_calls?: Array | null; + /** + * Error message if the response is an error + */ error?: string | null; }; export type Operation = { + /** + * Op + */ op: string; + /** + * Value + */ value: { [key: string]: boolean; }; }; +/** + * Schema for an organization + */ export type Organization = { + /** + * Name of the organization + */ name: string; + /** + * Unique identifier of the organization + */ id: string; + /** + * When organization was created + */ created_at: string; + /** + * When organization was updated + */ updated_at: string; }; export type PatchGroup = { + /** + * Schemas for group + */ schemas: Array; + /** + * Operations for the group + */ operations: Array; }; export type PatchUser = { + /** + * Schemas for user + */ schemas: Array; + /** + * Operations for the user + */ operations: Array; }; +/** + * Schema for search query + */ export type SearchQuery = { + /** + * Text for the search + */ text: string; + /** + * Unique identifier for the generation + */ generation_id: string; }; +/** + * Snapshot data + */ export type SnapshotData = { + /** + * Title of the snapshot + */ title: string; + /** + * Description of the snapshot + */ description: string; + /** + * List of messages + */ messages: Array; }; +/** + * Public snapshot + */ export type SnapshotPublic = { + /** + * Unique identifier for the conversation + */ conversation_id: string; + /** + * Unique identifier for the snapshot + */ id: string; + /** + * Unique identifier for the last message + */ last_message_id: string; + /** + * Snapshot version + */ version: number; + /** + * When snapshot was creted + */ created_at: string; + /** + * When snapshot was updated + */ updated_at: string; + /** + * Data for the snapshot + */ snapshot: SnapshotData; }; +/** + * Snapshot with links + */ export type SnapshotWithLinks = { + /** + * Unique identifier for the conversation + */ conversation_id: string; + /** + * Unique identifier for the snapshot + */ id: string; + /** + * Unique identifier for the last message + */ last_message_id: string; + /** + * Snapshot version + */ version: number; + /** + * When snapshot was creted + */ created_at: string; + /** + * When snapshot was updated + */ updated_at: string; + /** + * Data for the snapshot + */ snapshot: SnapshotData; + /** + * List of links + */ links: Array; }; /** - * Stream citation generation event. + * Stream citation generation event */ export type StreamCitationGeneration = { + /** + * Citations for the chat message + */ citations?: Array; }; +/** + * Stream end generation event + */ export type StreamEnd = { + /** + * Unique identifier for the message + */ message_id?: string | null; + /** + * Unique identifier for the response + */ response_id?: string | null; + /** + * Unique identifier for the generation + */ generation_id?: string | null; + /** + * Unique identifier for the conversation + */ conversation_id?: string | null; + /** + * Contents of the chat message + */ text: string; + /** + * Citations for the chat messae. + */ citations?: Array; + /** + * Documents used to generate grounded response with citations + */ documents?: Array; + /** + * Search results used to generate grounded response with citations + */ search_results?: Array<{ [key: string]: unknown; }>; + /** + * List of generated search queries + */ search_queries?: Array; + /** + * List of tool calls generated for custom tools + */ tool_calls?: Array; + /** + * Reson why the model finished the request + */ finish_reason?: string | null; + /** + * A list of entries used to construct the conversation. If provided, these messages will be used to build the prompt and the conversation_id will be ignored so no data will be stored to maintain state. + */ chat_history?: Array | null; + /** + * Error message if the response is an error + */ error?: string | null; }; @@ -703,92 +1534,200 @@ export enum StreamEvent { } /** - * Stream query generation event. + * Stream query generation event */ export type StreamQueryGeneration = { + /** + * Search query used to generate grounded response with citations + */ query: string; }; /** - * Stream queries generation event. + * Stream queries generation event */ export type StreamSearchQueriesGeneration = { + /** + * Search query used to generate grounded response with citations + */ search_queries?: Array; }; +/** + * Stream search generation event + */ export type StreamSearchResults = { + /** + * Search results used to generate grounded response with citations + */ search_results?: Array<{ [key: string]: unknown; }>; + /** + * Documents used to generate grounded response with citations + */ documents?: Array; }; /** - * Stream start event. + * Stream start event */ export type StreamStart = { + /** + * Generation ID for the event + */ generation_id?: string | null; + /** + * Conversation ID for the event + */ conversation_id?: string | null; }; /** - * Stream text generation event. + * Stream text generation event */ export type StreamTextGeneration = { + /** + * Contents of the chat message + */ text: string; }; +/** + * Stream tool call chunk generated event + */ export type StreamToolCallsChunk = { + /** + * Partial tool call + */ tool_call_delta?: ToolCallDelta | null; - text: string | null; + /** + * Contents of the chat message + */ + text?: string | null; }; /** - * Stream tool calls generation event. + * Stream tool calls generation event */ export type StreamToolCallsGeneration = { - stream_search_results?: StreamSearchResults | null; + /** + * List of search results used to generate grounded response with citations + */ + stream_search_results?: Array; + /** + * List of tool calls generated for custom tools + */ tool_calls?: Array | null; - text: string | null; + /** + * Contents of the chat message + */ + text?: string | null; }; +/** + * Stream tool input generation event + */ export type StreamToolInput = { + /** + * Tool input type + */ input_type: ToolInputType; + /** + * Name of the tool to be used + */ tool_name: string; + /** + * Tool input + */ input: string; + /** + * Contents of the chat message + */ text: string; }; +/** + * Stream tool result generation event + */ export type StreamToolResult = { + /** + * Result from the tool + */ result: unknown; + /** + * Name of tool that generated the result + */ tool_name: string; + /** + * Documents used to generate grounded response with citations + */ documents?: Array; }; +/** + * Request to toggle pinning a conversation + */ export type ToggleConversationPinRequest = { + /** + * If conversation is pinned + */ is_pinned: boolean; }; +/** + * Tool Schema + */ export type Tool = { + /** + * Name of the Tool + */ name?: string | null; + /** + * Parameters definitions for the tool + */ parameter_definitions?: { [key: string]: unknown; } | null; }; +/** + * Schema for Tool Call + */ export type ToolCall = { + /** + * Name of the Tool + */ name: string; + /** + * Parameters for the tool call + */ parameters?: { [key: string]: unknown; }; }; +/** + * Schema for Tool Call Delta + */ export type ToolCallDelta = { - name: string | null; - index: number | null; - parameters: string | null; + /** + * Name of the Tool + */ + name?: string | null; + /** + * Index + */ + index?: number | null; + /** + * Parameters for the tool call + */ + parameters?: string | null; }; +/** + * Supported Tool Categories + */ export enum ToolCategory { DATA_LOADER = 'Data loader', FILE_LOADER = 'File loader', @@ -796,23 +1735,65 @@ export enum ToolCategory { WEB_SEARCH = 'Web search', } +/** + * Tool Definition Schema + */ export type ToolDefinition = { + /** + * Name of the Tool + */ name?: string | null; + /** + * Parameters definitions for the tool + */ parameter_definitions?: { [key: string]: unknown; } | null; + /** + * Display name for the tool + */ display_name?: string; + /** + * Description of the tool + */ description?: string; + /** + * Error message + */ error_message?: string | null; + /** + * kwags for the tool + */ kwargs?: { [key: string]: unknown; }; + /** + * Is the tool visible + */ is_visible?: boolean; + /** + * Is the tool available + */ is_available?: boolean; + /** + * Tool category + */ category?: ToolCategory; + /** + * Is auth required for the tool + */ is_auth_required?: boolean; + /** + * Auth url for the tool + */ auth_url?: string | null; + /** + * Token for the tool + */ token?: string | null; + /** + * If the tool returns a token + */ should_return_token?: boolean; }; @@ -894,37 +1875,100 @@ export type UpdateAgentToolMetadataRequest = { }> | null; }; +/** + * Request to update a conversation + */ export type UpdateConversationRequest = { + /** + * Title of the conversation + */ title?: string | null; + /** + * Description of the conversation + */ description?: string | null; }; +/** + * Request to update Deployment Environment Variables + */ export type UpdateDeploymentEnv = { + /** + * Environment Variables for the Deployment + */ env_vars: { [key: string]: string; }; }; +/** + * Request to update an organization + */ export type UpdateOrganization = { - name: string | null; + /** + * Name of the organization + */ + name?: string | null; }; +/** + * Reponse for uploading an agent file + */ export type UploadAgentFileResponse = { + /** + * Unique identifier of the file + */ id: string; + /** + * When file was created + */ created_at: string; + /** + * When file was updated + */ updated_at: string; + /** + * Name of the file + */ file_name: string; + /** + * Size of the file in bytes + */ file_size?: number; }; +/** + * Response for uploading a conversation file + */ export type UploadConversationFileResponse = { + /** + * Unique identifier of the file + */ id: string; - user_id: string; + /** + * When file was created + */ created_at: string; + /** + * When file was updated + */ updated_at: string; - conversation_id: string; + /** + * Name of the file + */ file_name: string; + /** + * Size of the file in bytes + */ file_size?: number; + /** + * Unique identifier for who created the file + */ + user_id: string; + /** + * Unique identifier for the conversation the file is associated to + */ + conversation_id: string; }; export type ValidationError = { @@ -934,54 +1978,150 @@ export type ValidationError = { }; export type backend__schemas__scim__CreateUser = { - userName: string | null; - active: boolean | null; + /** + * User name + */ + userName?: string | null; + /** + * Is user active + */ + active?: boolean | null; + /** + * Schemas for the user + */ schemas: Array; + /** + * Name of user + */ name: Name; + /** + * List of emails for user + */ emails: Array; + /** + * External ID for the user + */ externalId: string; }; export type backend__schemas__scim__UpdateUser = { - userName: string | null; - active: boolean | null; + /** + * User name + */ + userName?: string | null; + /** + * Is user active + */ + active?: boolean | null; + /** + * Schemas for the user + */ schemas: Array; - emails: Array; + /** + * Name of user + */ name: Name; + /** + * List of emails for user + */ + emails: Array; }; export type backend__schemas__scim__User = { - userName: string | null; - active: boolean | null; + /** + * User name + */ + userName?: string | null; + /** + * Is user active + */ + active?: boolean | null; + /** + * Schemas for the user + */ schemas: Array; + /** + * Unique identifier for the user + */ id: string; + /** + * External ID for the user + */ externalId: string; + /** + * Metadata for the user + */ meta: Meta; }; +/** + * Request to create a user + */ export type backend__schemas__user__CreateUser = { + /** + * Password for the user + */ password?: string | null; + /** + * The user's password hashed + */ hashed_password?: (Blob | File) | null; + /** + * User's Full Name + */ fullname: string; + /** + * User's email address + */ email?: string | null; }; +/** + * Request to update a user + */ export type backend__schemas__user__UpdateUser = { + /** + * Password for the user + */ password?: string | null; + /** + * The user's password hashed + */ hashed_password?: (Blob | File) | null; + /** + * User's Full Name + */ fullname?: string | null; + /** + * User's email address + */ email?: string | null; }; +/** + * User schema + */ export type backend__schemas__user__User = { + /** + * User's Full Name + */ fullname: string; + /** + * User's email address + */ email?: string | null; id: string; + /** + * When the user was created + */ created_at: string; + /** + * When the user was updated + */ updated_at: string; }; -export type GetStrategiesV1AuthStrategiesGetResponse = Array; +export type GetStrategiesV1AuthStrategiesGetResponse = Array; export type LoginV1LoginPostData = { requestBody: Login; @@ -990,7 +2130,13 @@ export type LoginV1LoginPostData = { export type LoginV1LoginPostResponse = JWTResponse | null; export type AuthorizeV1StrategyAuthPostData = { - code?: string; + /** + * OAuth Code + */ + code?: string | null; + /** + * Name of strategy in question + */ strategy: string; }; @@ -1001,6 +2147,9 @@ export type LogoutV1LogoutGetResponse = Logout; export type ToolAuthV1ToolAuthGetResponse = unknown; export type DeleteToolAuthV1ToolAuthToolIdDeleteData = { + /** + * Tool ID for tool in question + */ toolId: string; }; @@ -1031,13 +2180,22 @@ export type CreateUserV1UsersPostData = { export type CreateUserV1UsersPostResponse = backend__schemas__user__User; export type ListUsersV1UsersGetData = { + /** + * Maximum number of records to return per request + */ limit?: number; + /** + * Offset for where request should start returning records from + */ offset?: number; }; export type ListUsersV1UsersGetResponse = Array; export type GetUserV1UsersUserIdGetData = { + /** + * User ID for the user in question + */ userId: string; }; @@ -1045,24 +2203,36 @@ export type GetUserV1UsersUserIdGetResponse = backend__schemas__user__User; export type UpdateUserV1UsersUserIdPutData = { requestBody: backend__schemas__user__UpdateUser; + /** + * User ID for the user in question + */ userId: string; }; export type UpdateUserV1UsersUserIdPutResponse = backend__schemas__user__User; export type DeleteUserV1UsersUserIdDeleteData = { + /** + * User ID for the user in question + */ userId: string; }; export type DeleteUserV1UsersUserIdDeleteResponse = DeleteUser; export type GetConversationV1ConversationsConversationIdGetData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; }; export type GetConversationV1ConversationsConversationIdGetResponse = ConversationPublic; export type UpdateConversationV1ConversationsConversationIdPutData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; requestBody: UpdateConversationRequest; }; @@ -1070,6 +2240,9 @@ export type UpdateConversationV1ConversationsConversationIdPutData = { export type UpdateConversationV1ConversationsConversationIdPutResponse = ConversationPublic; export type DeleteConversationV1ConversationsConversationIdDeleteData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; }; @@ -1077,15 +2250,30 @@ export type DeleteConversationV1ConversationsConversationIdDeleteResponse = DeleteConversationResponse; export type ListConversationsV1ConversationsGetData = { - agentId?: string; + /** + * Agent ID to filter results by + */ + agentId?: string | null; + /** + * Maximum number of records to return per request + */ limit?: number; + /** + * Offset for where request should start returning records from + */ offset?: number; - orderBy?: string; + /** + * Field to sorts results by + */ + orderBy?: string | null; }; export type ListConversationsV1ConversationsGetResponse = Array; export type ToggleConversationPinV1ConversationsConversationIdTogglePinPutData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; requestBody: ToggleConversationPinRequest; }; @@ -1094,9 +2282,25 @@ export type ToggleConversationPinV1ConversationsConversationIdTogglePinPutRespon ConversationWithoutMessages; export type SearchConversationsV1ConversationsSearchGetData = { - agentId?: string; + /** + * Agent ID to filter results by + */ + agentId?: string | null; + /** + * Maximum number of records to return per request + */ limit?: number; + /** + * Offset for where request should start returning records from + */ offset?: number; + /** + * Field to sorts results by + */ + orderBy?: string | null; + /** + * Query string to search for in a conversation title + */ query: string; }; @@ -1111,20 +2315,35 @@ export type BatchUploadFileV1ConversationsBatchUploadFilePostResponse = Array; export type ListFilesV1ConversationsConversationIdFilesGetData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; }; export type ListFilesV1ConversationsConversationIdFilesGetResponse = Array; export type GetFileV1ConversationsConversationIdFilesFileIdGetData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; + /** + * File ID for file in question + */ fileId: string; }; export type GetFileV1ConversationsConversationIdFilesFileIdGetResponse = FileMetadata; export type DeleteFileV1ConversationsConversationIdFilesFileIdDeleteData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; + /** + * File ID for file in question + */ fileId: string; }; @@ -1132,7 +2351,13 @@ export type DeleteFileV1ConversationsConversationIdFilesFileIdDeleteResponse = DeleteConversationFileResponse; export type GenerateTitleV1ConversationsConversationIdGenerateTitlePostData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; + /** + * Model to filter results by + */ model?: string | null; }; @@ -1140,13 +2365,22 @@ export type GenerateTitleV1ConversationsConversationIdGenerateTitlePostResponse GenerateTitleResponse; export type SynthesizeMessageV1ConversationsConversationIdSynthesizeMessageIdGetData = { + /** + * Conversation ID for conversation in question + */ conversationId: string; + /** + * Message ID for message in question + */ messageId: string; }; export type SynthesizeMessageV1ConversationsConversationIdSynthesizeMessageIdGetResponse = unknown; export type ListToolsV1ToolsGetData = { + /** + * Agent ID to filter results by + */ agentId?: string | null; }; @@ -1159,12 +2393,18 @@ export type CreateDeploymentV1DeploymentsPostData = { export type CreateDeploymentV1DeploymentsPostResponse = Deployment; export type ListDeploymentsV1DeploymentsGetData = { - all?: boolean; + /** + * Include all deployments, regardless of availability. + */ + all?: boolean | null; }; export type ListDeploymentsV1DeploymentsGetResponse = Array; export type UpdateDeploymentV1DeploymentsDeploymentIdPutData = { + /** + * Deployment ID for deployment in question + */ deploymentId: string; requestBody: DeploymentUpdate; }; @@ -1172,23 +2412,32 @@ export type UpdateDeploymentV1DeploymentsDeploymentIdPutData = { export type UpdateDeploymentV1DeploymentsDeploymentIdPutResponse = Deployment; export type GetDeploymentV1DeploymentsDeploymentIdGetData = { + /** + * Deployment ID for deployment in question + */ deploymentId: string; }; export type GetDeploymentV1DeploymentsDeploymentIdGetResponse = Deployment; export type DeleteDeploymentV1DeploymentsDeploymentIdDeleteData = { + /** + * Deployment ID for deployment in question + */ deploymentId: string; }; export type DeleteDeploymentV1DeploymentsDeploymentIdDeleteResponse = DeleteDeployment; -export type SetEnvVarsV1DeploymentsNameSetEnvVarsPostData = { - name: string; +export type SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostData = { + /** + * Deployment Name for deployment in question + */ + deploymentName: string; requestBody: UpdateDeploymentEnv; }; -export type SetEnvVarsV1DeploymentsNameSetEnvVarsPostResponse = unknown; +export type SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostResponse = unknown; export type ListExperimentalFeaturesV1ExperimentalFeaturesGetResponse = { [key: string]: boolean; @@ -1210,7 +2459,7 @@ export type ListAgentsV1AgentsGetData = { */ offset?: number; /** - * Organization ID of the agent + * Organization ID to filter results by */ organizationId?: string | null; /** @@ -1349,18 +2598,27 @@ export type CreateSnapshotV1SnapshotsPostData = { export type CreateSnapshotV1SnapshotsPostResponse = CreateSnapshotResponse; export type GetSnapshotV1SnapshotsLinkLinkIdGetData = { + /** + * Link ID for the snapshot link in question + */ linkId: string; }; export type GetSnapshotV1SnapshotsLinkLinkIdGetResponse = SnapshotPublic; export type DeleteSnapshotLinkV1SnapshotsLinkLinkIdDeleteData = { + /** + * Link ID for the snapshot link in question + */ linkId: string; }; export type DeleteSnapshotLinkV1SnapshotsLinkLinkIdDeleteResponse = DeleteSnapshotLinkResponse; export type DeleteSnapshotV1SnapshotsSnapshotIdDeleteData = { + /** + * Snapshot ID for the snapshot in question + */ snapshotId: string; }; @@ -1375,6 +2633,9 @@ export type CreateOrganizationV1OrganizationsPostData = { export type CreateOrganizationV1OrganizationsPostResponse = Organization; export type UpdateOrganizationV1OrganizationsOrganizationIdPutData = { + /** + * Organization ID for the organization in question + */ organizationId: string; requestBody: UpdateOrganization; }; @@ -1382,18 +2643,27 @@ export type UpdateOrganizationV1OrganizationsOrganizationIdPutData = { export type UpdateOrganizationV1OrganizationsOrganizationIdPutResponse = Organization; export type GetOrganizationV1OrganizationsOrganizationIdGetData = { + /** + * Organization ID for the organization in question + */ organizationId: string; }; export type GetOrganizationV1OrganizationsOrganizationIdGetResponse = Organization; export type DeleteOrganizationV1OrganizationsOrganizationIdDeleteData = { + /** + * Organization ID for the organization in question + */ organizationId: string; }; export type DeleteOrganizationV1OrganizationsOrganizationIdDeleteResponse = DeleteOrganization; export type GetOrganizationUsersV1OrganizationsOrganizationIdUsersGetData = { + /** + * Organization ID for the organization in question + */ organizationId: string; }; @@ -1407,13 +2677,22 @@ export type CreateModelV1ModelsPostData = { export type CreateModelV1ModelsPostResponse = Model; export type ListModelsV1ModelsGetData = { + /** + * Maximum number of records to return per request + */ limit?: number; + /** + * Offset for where request should start returning records from + */ offset?: number; }; export type ListModelsV1ModelsGetResponse = Array; export type UpdateModelV1ModelsModelIdPutData = { + /** + * Model ID for the model in question + */ modelId: string; requestBody: ModelUpdate; }; @@ -1421,20 +2700,35 @@ export type UpdateModelV1ModelsModelIdPutData = { export type UpdateModelV1ModelsModelIdPutResponse = Model; export type GetModelV1ModelsModelIdGetData = { + /** + * Model ID for the model in question + */ modelId: string; }; export type GetModelV1ModelsModelIdGetResponse = Model; export type DeleteModelV1ModelsModelIdDeleteData = { + /** + * Model ID for the model in question + */ modelId: string; }; export type DeleteModelV1ModelsModelIdDeleteResponse = DeleteModel; export type GetUsersScimV2UsersGetData = { + /** + * Maximum number of records to return per request + */ count?: number; + /** + * Filter to use when filtering response + */ filter?: string | null; + /** + * Start Index for request + */ startIndex?: number; }; @@ -1447,6 +2741,9 @@ export type CreateUserScimV2UsersPostData = { export type CreateUserScimV2UsersPostResponse = unknown; export type GetUserScimV2UsersUserIdGetData = { + /** + * User ID for the user in question + */ userId: string; }; @@ -1454,6 +2751,9 @@ export type GetUserScimV2UsersUserIdGetResponse = unknown; export type UpdateUserScimV2UsersUserIdPutData = { requestBody: backend__schemas__scim__UpdateUser; + /** + * User ID for the user in question + */ userId: string; }; @@ -1461,14 +2761,26 @@ export type UpdateUserScimV2UsersUserIdPutResponse = unknown; export type PatchUserScimV2UsersUserIdPatchData = { requestBody: PatchUser; + /** + * User ID for the user in question + */ userId: string; }; export type PatchUserScimV2UsersUserIdPatchResponse = unknown; export type GetGroupsScimV2GroupsGetData = { + /** + * Maximum number of records to return per request + */ count?: number; + /** + * Filter to use when filtering response + */ filter?: string | null; + /** + * Start Index for request + */ startIndex?: number; }; @@ -1481,12 +2793,18 @@ export type CreateGroupScimV2GroupsPostData = { export type CreateGroupScimV2GroupsPostResponse = unknown; export type GetGroupScimV2GroupsGroupIdGetData = { + /** + * Group ID for the group in question + */ groupId: string; }; export type GetGroupScimV2GroupsGroupIdGetResponse = unknown; export type PatchGroupScimV2GroupsGroupIdPatchData = { + /** + * Group ID for the group in question + */ groupId: string; requestBody: PatchGroup; }; @@ -1494,6 +2812,9 @@ export type PatchGroupScimV2GroupsGroupIdPatchData = { export type PatchGroupScimV2GroupsGroupIdPatchResponse = unknown; export type DeleteGroupScimV2GroupsGroupIdDeleteData = { + /** + * Group ID for the group in question + */ groupId: string; }; @@ -1508,7 +2829,7 @@ export type $OpenApiTs = { /** * Successful Response */ - 200: Array; + 200: Array; }; }; }; @@ -1949,9 +3270,9 @@ export type $OpenApiTs = { }; }; }; - '/v1/deployments/{name}/set_env_vars': { + '/v1/deployments/{deployment_name}/set_env_vars': { post: { - req: SetEnvVarsV1DeploymentsNameSetEnvVarsPostData; + req: SetEnvVarsV1DeploymentsDeploymentNameSetEnvVarsPostData; res: { /** * Successful Response