docs: label message
This commit is contained in:
parent
5d1b953eaf
commit
31f16503c7
@ -505,7 +505,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: List messages
|
summary: List messages
|
||||||
description: Retrieves all messages from the given thread.
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Retrieves all messages from the given thread.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -513,7 +516,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
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.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: List of messages retrieved successfully
|
description: List of messages retrieved successfully
|
||||||
@ -531,7 +537,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Create message
|
summary: Create message
|
||||||
description: Create a message
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/messages/createMessage"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Create a message
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -539,7 +548,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
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.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
requestBody:
|
requestBody:
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
@ -549,12 +561,18 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
description: "Role of the sender, either 'user' or 'assistant'."
|
description: |
|
||||||
|
"Role of the sender, either 'user' or 'assistant'."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: "user"
|
example: "user"
|
||||||
enum: ["user", "assistant"]
|
enum: ["user", "assistant"]
|
||||||
content:
|
content:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: |
|
||||||
|
"Text content of the message."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: "How does AI work? Explain it in simple terms."
|
example: "How does AI work? Explain it in simple terms."
|
||||||
required:
|
required:
|
||||||
- role
|
- role
|
||||||
@ -581,8 +599,11 @@ paths:
|
|||||||
operationId: retrieveMessage
|
operationId: retrieveMessage
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Retrieve Message
|
summary: Retrieve message
|
||||||
description: Retrieve a specific message from a thread using its thread_id and message_id.
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/messages/getMessage"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Retrieve a specific message from a thread using its thread_id and message_id.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -590,14 +611,20 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread containing the message.
|
description: |
|
||||||
|
The ID of the thread containing the message.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
- in: path
|
- in: path
|
||||||
name: message_id
|
name: message_id
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
description: The ID of the message to retrieve.
|
description: |
|
||||||
|
The ID of the message to retrieve.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
@ -617,27 +644,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: List message files
|
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: |
|
description: |
|
||||||
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessageFiles"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #fec928"> Jan </button></a>
|
|
||||||
|
|
||||||
Returns a list of message files.
|
Returns a list of message files.
|
||||||
|
|
||||||
<a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> <button style = "color: #388434">OpenAI compatible </button></a>
|
|
||||||
|
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -645,7 +655,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread containing the message.
|
description: |
|
||||||
|
The ID of the thread containing the message.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
- in: path
|
- in: path
|
||||||
name: message_id
|
name: message_id
|
||||||
required: true
|
required: true
|
||||||
@ -675,7 +688,10 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
summary: Retrieve message file
|
summary: Retrieve message file
|
||||||
description: Retrieves a file associated with a specific message in a thread.
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/messages/getMessageFile"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Retrieves a file associated with a specific message in a thread.
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: thread_id
|
name: thread_id
|
||||||
@ -683,21 +699,30 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: thread_abc123
|
example: thread_abc123
|
||||||
description: The ID of the thread containing the message.
|
description: |
|
||||||
|
The ID of the thread containing the message.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
- in: path
|
- in: path
|
||||||
name: message_id
|
name: message_id
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: msg_abc123
|
example: msg_abc123
|
||||||
description: The ID of the message associated with the file.
|
description: |
|
||||||
|
The ID of the message associated with the file.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
- in: path
|
- in: path
|
||||||
name: file_id
|
name: file_id
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: file-abc123
|
example: file-abc123
|
||||||
description: The ID of the file to retrieve.
|
description: |
|
||||||
|
The ID of the file to retrieve.
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: File retrieved successfully
|
description: File retrieved successfully
|
||||||
@ -733,7 +758,10 @@ x-webhooks:
|
|||||||
MessageObject:
|
MessageObject:
|
||||||
post:
|
post:
|
||||||
summary: The message object
|
summary: The message object
|
||||||
description: Information about a message in the thread
|
description: |
|
||||||
|
<a href = "https://platform.openai.com/docs/api-reference/messages/object"> <button style = "color: #388434"> OpenAI compatible </button></a>
|
||||||
|
|
||||||
|
Information about a message in the thread
|
||||||
operationId: MessageObject
|
operationId: MessageObject
|
||||||
tags:
|
tags:
|
||||||
- Messages
|
- Messages
|
||||||
|
|||||||
@ -5,28 +5,46 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
description: "Sequential or UUID identifier of the message."
|
description: |
|
||||||
|
"Sequential or UUID identifier of the message."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: 0
|
example: 0
|
||||||
object:
|
object:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of the object, defaults to 'thread.message'."
|
description: |
|
||||||
|
"Type of the object, defaults to 'thread.message'."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: thread.message
|
example: thread.message
|
||||||
created_at:
|
created_at:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "Unix timestamp representing the creation time of the message."
|
description: |
|
||||||
|
"Unix timestamp representing the creation time of the message."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
thread_id:
|
thread_id:
|
||||||
type: string
|
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."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: "thread_asdf"
|
example: "thread_asdf"
|
||||||
assistant_id:
|
assistant_id:
|
||||||
type: string
|
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."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: jan
|
example: jan
|
||||||
role:
|
role:
|
||||||
type: string
|
type: string
|
||||||
enum: ["user", "assistant"]
|
enum: ["user", "assistant"]
|
||||||
description: "Role of the sender, either 'user' or 'assistant'."
|
description: |
|
||||||
|
"Role of the sender, either 'user' or 'assistant'."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
content:
|
content:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -34,23 +52,35 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: "Type of content, e.g., 'text'."
|
description: |
|
||||||
|
"Type of content, e.g., 'text'."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
text:
|
text:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
value:
|
value:
|
||||||
type: string
|
type: string
|
||||||
description: "Text content of the message."
|
description: |
|
||||||
|
"Text content of the message."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: "Hi!?"
|
example: "Hi!?"
|
||||||
annotations:
|
annotations:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: "Annotations for the text content, if any."
|
description: |
|
||||||
|
"Annotations for the text content, if any."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: []
|
example: []
|
||||||
metadata:
|
metadata:
|
||||||
type: object
|
type: object
|
||||||
description: "Metadata associated with the message, defaults to an empty object."
|
description: |
|
||||||
|
"Metadata associated with the message, defaults to an empty object."
|
||||||
|
|
||||||
|
<span style="color:#388434">OpenAI compatible</span>
|
||||||
example: {}
|
example: {}
|
||||||
|
|
||||||
GetMessageResponse:
|
GetMessageResponse:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user