diff --git a/docs/openapi/jan.yaml b/docs/openapi/jan.yaml index 36e2adf5b..cfaa06847 100644 --- a/docs/openapi/jan.yaml +++ b/docs/openapi/jan.yaml @@ -263,7 +263,10 @@ paths: tags: - Threads summary: Create thread - description: Create a thread + description: | + + + Create a thread requestBody: required: false content: @@ -303,7 +306,10 @@ paths: tags: - Threads summary: List threads - description: Retrieves a list of all threads available in the system. + description: | + Jan + + Retrieves a list of all threads available in the system. responses: "200": description: List of threads retrieved successfully @@ -336,8 +342,11 @@ paths: operationId: getThread tags: - Threads - summary: Get thread - description: Retrieves detailed information about a specific thread using its thread_id. + summary: Retrieve thread + description: | + + + Retrieves detailed information about a specific thread using its thread_id. parameters: - in: path name: thread_id @@ -345,7 +354,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread to retrieve. + description: | + The ID of the thread to retrieve. + + OpenAI compatible responses: "200": description: Thread details retrieved successfully @@ -362,7 +374,10 @@ paths: tags: - Threads summary: Modify thread - description: Modifies a thread + description: | + + + Modifies a thread parameters: - in: path name: thread_id @@ -370,7 +385,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread to be modified. + description: | + The ID of the thread to be modified. + + OpenAI compatible requestBody: required: false content: @@ -411,7 +429,10 @@ paths: tags: - Threads summary: Delete thread - description: Delete a thread + description: | + + + Delete a thread parameters: - in: path name: thread_id @@ -419,7 +440,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread to be deleted. + description: | + The ID of the thread to be deleted. + + OpenAI compatible responses: "200": description: Thread deleted successfully @@ -439,8 +463,10 @@ paths: tags: - Threads summary: Get Thread.Assistants - description: - - Can achieve this goal by calling Get thread API + description: | + Jan + + Can achieve this goal by calling Get thread API parameters: - in: path name: thread_id @@ -467,8 +493,10 @@ paths: tags: - Threads summary: Modify Thread.Assistants - description: - - Can achieve this goal by calling Modify Assistant API with thread.assistant[] + description: | + Jan + + Can achieve this goal by calling Modify Assistant API with thread.assistant[] /threads/{thread_id}/: get: @@ -476,8 +504,10 @@ paths: tags: - Threads summary: List Thread.Messages - description: - - Can achieve this goal by calling Get Thread API + description: | + Jan + + Can achieve this goal by calling Get Thread API parameters: - in: path name: thread_id @@ -775,9 +805,13 @@ x-webhooks: post: summary: The thread object description: | - - Each `thread` folder contains a `thread.json` file, which is a representation of a thread. - - `thread.json` contains metadata and model parameter overrides. - - There are no required fields. + and Jan + + Each `thread` folder contains a `thread.json` file, which is a representation of a thread. + + `thread.json` contains metadata and model parameter overrides. + + There are no required fields. operationId: ThreadObject tags: diff --git a/docs/openapi/specs/threads.yaml b/docs/openapi/specs/threads.yaml index 317447f90..f071d14a6 100644 --- a/docs/openapi/specs/threads.yaml +++ b/docs/openapi/specs/threads.yaml @@ -5,47 +5,73 @@ components: properties: id: type: string - description: "The identifier of the thread, defaults to foldername." + description: | + "The identifier of the thread, defaults to foldername." + + OpenAI compatible example: thread_.... object: type: string - description: "Type of the object, defaults to thread." + description: | + "Type of the object, defaults to thread." + + OpenAI compatible example: thread - summary: + title: type: string - description: "A brief summary or description of the thread, defaults to an empty string." + description: | + "A brief summary or description of the thread, defaults to an empty string." + + Jan example: "funny physics joke" assistants: type: array + description: | + Jan items: - type: string - description: "List of assistants involved in the thread, defaults to [\"jan\"]." - example: ["jan"] + properties: + assistant_id: + type: string + description: | + The identifier of assistant, defaults to "jan" + + Jan + example: jan + model: + type: object + properties: + id: + type: string + description: | + Jan + example: ... + settings: + type: object + description: | + Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings") + + Jan + parameters: + type: object + description: | + Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters") + + Jan created: type: integer format: int64 - description: "Unix timestamp representing the creation time of the thread, defaults to file creation time." + description: | + "Unix timestamp representing the creation time of the thread, defaults to file creation time." + + OpenAI compatible example: 1231231 metadata: type: object - description: "Metadata associated with the thread, defaults to an empty object." + description: | + "Metadata associated with the thread, defaults to an empty object." + + OpenAI compatible example: {} - messages: - type: array - description: "List of messages within the thread." - items: - type: string - example: [] - model_id: - type: string - description: "Model identifier associated with the thread, defaults to assistant.model." - example: "..." - settings: - type: object - description: "Settings for the thread, defaults to and overrides assistant.settings." - parameters: - type: object - description: "Parameters for the thread, defaults to and overrides assistant.settings." GetThreadResponse: type: object @@ -106,23 +132,33 @@ components: properties: role: type: string - description: "Role of the sender, either 'user' or 'assistant'." + description: | + "Role of the sender, either 'user' or 'assistant'." + + OpenAI compatible enum: ["user", "assistant"] content: type: string - description: "Text content of the message." + description: | + "Text content of the message." + + OpenAI compatible file_ids: type: array items: type: string - description: "Array of file IDs associated with the message, if any." + description: | + "Array of file IDs associated with the message, if any." + + OpenAI compatible ModifyThreadResponse: type: object properties: id: type: string - description: "The identifier of the modified thread." + description: | + "The identifier of the modified thread." example: thread_abc123 object: type: string