diff --git a/docs/openapi/jan.yaml b/docs/openapi/jan.yaml index dbda21ac0..36e2adf5b 100644 --- a/docs/openapi/jan.yaml +++ b/docs/openapi/jan.yaml @@ -505,7 +505,10 @@ paths: tags: - Messages summary: List messages - description: Retrieves all messages from the given thread. + description: | + + + Retrieves all messages from the given thread. parameters: - in: path name: thread_id @@ -513,7 +516,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread from which to retrieve messages. + description: | + The ID of the thread from which to retrieve messages. + + OpenAI compatible responses: "200": description: List of messages retrieved successfully @@ -531,7 +537,10 @@ paths: tags: - Messages summary: Create message - description: Create a message + description: | + + + Create a message parameters: - in: path name: thread_id @@ -539,7 +548,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread to which the message will be posted. + description: | + The ID of the thread to which the message will be posted. + + OpenAI compatible requestBody: required: true content: @@ -549,12 +561,18 @@ paths: properties: role: type: string - description: "Role of the sender, either 'user' or 'assistant'." + description: | + "Role of the sender, either 'user' or 'assistant'." + + OpenAI compatible example: "user" enum: ["user", "assistant"] content: type: string - description: "Text content of the message." + description: | + "Text content of the message." + + OpenAI compatible example: "How does AI work? Explain it in simple terms." required: - role @@ -581,8 +599,11 @@ paths: operationId: retrieveMessage tags: - Messages - summary: Retrieve Message - description: Retrieve a specific message from a thread using its thread_id and message_id. + summary: Retrieve message + description: | + + + Retrieve a specific message from a thread using its thread_id and message_id. parameters: - in: path name: thread_id @@ -590,14 +611,20 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread containing the message. + description: | + The ID of the thread containing the message. + + OpenAI compatible - in: path name: message_id required: true schema: type: string example: msg_abc123 - description: The ID of the message to retrieve. + description: | + The ID of the message to retrieve. + + OpenAI compatible responses: "200": description: OK @@ -617,27 +644,10 @@ paths: tags: - Messages summary: List message files - securitySchemes: - petstore_auth: - description: | - Get access to data while protecting your account credentials. - OAuth2 is also a safer and more secure way to give you access. - type: oauth2 - flows: - implicit: - authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' - scopes: - 'write:pets': modify pets in your account - 'read:pets': read your pets description: | - - + Returns a list of message files. - - - - parameters: - in: path name: thread_id @@ -645,7 +655,10 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread containing the message. + description: | + The ID of the thread containing the message. + + OpenAI compatible - in: path name: message_id required: true @@ -675,7 +688,10 @@ paths: tags: - Messages summary: Retrieve message file - description: Retrieves a file associated with a specific message in a thread. + description: | + + + Retrieves a file associated with a specific message in a thread. parameters: - in: path name: thread_id @@ -683,21 +699,30 @@ paths: schema: type: string example: thread_abc123 - description: The ID of the thread containing the message. + description: | + The ID of the thread containing the message. + + OpenAI compatible - in: path name: message_id required: true schema: type: string example: msg_abc123 - description: The ID of the message associated with the file. + description: | + The ID of the message associated with the file. + + OpenAI compatible - in: path name: file_id required: true schema: type: string example: file-abc123 - description: The ID of the file to retrieve. + description: | + The ID of the file to retrieve. + + OpenAI compatible responses: "200": description: File retrieved successfully @@ -733,7 +758,10 @@ x-webhooks: MessageObject: post: summary: The message object - description: Information about a message in the thread + description: | + + + Information about a message in the thread operationId: MessageObject tags: - Messages diff --git a/docs/openapi/specs/messages.yaml b/docs/openapi/specs/messages.yaml index daa998767..97ff9ae4e 100644 --- a/docs/openapi/specs/messages.yaml +++ b/docs/openapi/specs/messages.yaml @@ -5,28 +5,46 @@ components: properties: id: type: string - description: "Sequential or UUID identifier of the message." + description: | + "Sequential or UUID identifier of the message." + + OpenAI compatible example: 0 object: type: string - description: "Type of the object, defaults to 'thread.message'." + description: | + "Type of the object, defaults to 'thread.message'." + + OpenAI compatible example: thread.message created_at: type: integer format: int64 - description: "Unix timestamp representing the creation time of the message." + description: | + "Unix timestamp representing the creation time of the message." + + OpenAI compatible thread_id: type: string - description: "Identifier of the thread to which this message belongs. Defaults to parent thread." + description: | + "Identifier of the thread to which this message belongs. Defaults to parent thread." + + OpenAI compatible example: "thread_asdf" assistant_id: type: string - description: "Identifier of the assistant involved in the message. Defaults to parent thread." + description: | + "Identifier of the assistant involved in the message. Defaults to parent thread." + + OpenAI compatible example: jan role: type: string enum: ["user", "assistant"] - description: "Role of the sender, either 'user' or 'assistant'." + description: | + "Role of the sender, either 'user' or 'assistant'." + + OpenAI compatible content: type: array items: @@ -34,23 +52,35 @@ components: properties: type: type: string - description: "Type of content, e.g., 'text'." + description: | + "Type of content, e.g., 'text'." + + OpenAI compatible text: type: object properties: value: type: string - description: "Text content of the message." + description: | + "Text content of the message." + + OpenAI compatible example: "Hi!?" annotations: type: array items: type: string - description: "Annotations for the text content, if any." + description: | + "Annotations for the text content, if any." + + OpenAI compatible example: [] metadata: type: object - description: "Metadata associated with the message, defaults to an empty object." + description: | + "Metadata associated with the message, defaults to an empty object." + + OpenAI compatible example: {} GetMessageResponse: