openapi: 3.2.0 info: title: CallidusAI Chat API description: Callidus AI backend API version: 0.1.0 tags: - name: Chat paths: /task/{task_id}/chat: get: tags: - Chat summary: List Chats description: List all chats for a task. operationId: list_chats_task__task_id__chat_get parameters: - name: task_id in: path required: true schema: type: string title: Task Id responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ChatListResponse' title: Response List Chats Task Task Id Chat Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - Chat summary: Ask Question description: Ask a question against the task's documents. Pass chat_id=0 to start a new chat. operationId: ask_question_task__task_id__chat_post parameters: - name: task_id in: path required: true schema: type: string title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatEntryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Chat summary: Rename Chat description: Rename a chat. operationId: rename_chat_task__task_id__chat_patch parameters: - name: task_id in: path required: true schema: type: string title: Task Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatRenameRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatListResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /task/{task_id}/chat/{chat_id}: delete: tags: - Chat summary: Delete Chat description: Delete a chat and all its entries. operationId: delete_chat_task__task_id__chat__chat_id__delete parameters: - name: task_id in: path required: true schema: type: string title: Task Id - name: chat_id in: path required: true schema: type: integer title: Chat Id responses: '200': description: Successful Response content: application/json: schema: type: object additionalProperties: true title: Response Delete Chat Task Task Id Chat Chat Id Delete '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - Chat summary: List Chat Entries description: List all entries for a chat. operationId: list_chat_entries_task__task_id__chat__chat_id__get parameters: - name: task_id in: path required: true schema: type: string title: Task Id - name: chat_id in: path required: true schema: type: integer title: Chat Id responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/ChatEntryResponse' title: Response List Chat Entries Task Task Id Chat Chat Id Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - Chat summary: Update Chat Entry description: Update a chat entry (e.g. thumbs up/down rating). operationId: update_chat_entry_task__task_id__chat__chat_id__patch parameters: - name: task_id in: path required: true schema: type: string title: Task Id - name: chat_id in: path required: true schema: type: integer title: Chat Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatEntryUpdateRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ChatEntryResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /task/{conversation_id}/matter_file_suggestions: post: tags: - Chat summary: Conversation Matter File Suggestions description: Return candidate matter-level files for a deposition conversation. operationId: conversation_matter_file_suggestions_task__conversation_id__matter_file_suggestions_post parameters: - name: conversation_id in: path required: true schema: type: string title: Conversation Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DepositionSuggestionsContext' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/MatterFileSuggestionsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: DepositionSuggestionsContext: properties: witness_name: anyOf: - type: string - type: 'null' title: Witness Name witness_background: anyOf: - type: string - type: 'null' title: Witness Background lines_of_inquiry: items: type: string type: array title: Lines Of Inquiry case_background: anyOf: - type: string - type: 'null' title: Case Background transcript_doc_id: anyOf: - type: string - type: 'null' title: Transcript Doc Id type: object title: DepositionSuggestionsContext description: POST body fields forwarded from the FE deposition prep form. ChatSource: properties: name: type: string title: Name text: type: string title: Text default: '' page: type: integer title: Page score: type: number title: Score path: type: string title: Path mime_type: type: string title: Mime Type type: object required: - name - page - score - path - mime_type title: ChatSource description: Describe the document in which a search/query result was found. ChatEntryResponse: properties: id: type: integer title: Id started_at: type: string format: date-time title: Started At question: type: string title: Question answer: type: string title: Answer confidence: type: integer title: Confidence rating: type: integer title: Rating chat_id: type: integer title: Chat Id sources: anyOf: - items: $ref: '#/components/schemas/ChatSource' type: array - type: 'null' title: Sources type: object required: - id - started_at - question - answer - confidence - rating - chat_id title: ChatEntryResponse MatterFileSuggestionDoc: properties: id: type: string title: Id name: type: string title: Name date_added: anyOf: - type: string format: date-time - type: 'null' title: Date Added size: anyOf: - type: integer - type: 'null' title: Size kind: anyOf: - type: string - type: 'null' title: Kind category: anyOf: - type: string - type: 'null' title: Category is_relevant: anyOf: - type: boolean - type: 'null' title: Is Relevant description: LLM relevance verdict for this matter document w.r.t. the task. True = recommended preselect; False = scored but not relevant; None = relevance was not computed (gate off, no candidates, LLM timeout/error). FE preselects only is_relevant=True. type: object required: - id - name title: MatterFileSuggestionDoc description: One candidate matter-level document surfaced in the suggestion modal. ChatEntryUpdateRequest: properties: chat_entry_id: type: integer title: Chat Entry Id rating: type: integer title: Rating type: object required: - chat_entry_id - rating title: ChatEntryUpdateRequest ChatRequest: properties: chat_id: type: integer title: Chat Id default: 0 question: type: string title: Question type: object required: - question title: ChatRequest description: Ask a question; chat_id=0 creates a new chat. ChatListResponse: properties: id: type: integer title: Id started_at: type: string format: date-time title: Started At name: type: string title: Name type: object required: - id - started_at - name title: ChatListResponse MatterFileSuggestionsResponse: properties: matter_intelligence_enabled: type: boolean title: Matter Intelligence Enabled default: false mode: type: string enum: - initial - incremental title: Mode default: initial cutoff_at: anyOf: - type: string format: date-time - type: 'null' title: Cutoff At documents: items: $ref: '#/components/schemas/MatterFileSuggestionDoc' type: array title: Documents type: object title: MatterFileSuggestionsResponse description: Candidate matter-level files to suggest after the Add Files step. ChatRenameRequest: properties: chat_id: type: integer title: Chat Id name: type: string title: Name type: object required: - chat_id - name title: ChatRenameRequest ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError