318 lines
10 KiB
YAML
318 lines
10 KiB
YAML
components:
|
|
schemas:
|
|
MessageObject:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: |
|
|
"Sequential or UUID identifier of the message."
|
|
example: 0
|
|
object:
|
|
type: string
|
|
description: |
|
|
"Type of the object, defaults to 'thread.message'."
|
|
example: thread.message
|
|
created_at:
|
|
type: integer
|
|
format: int64
|
|
description: |
|
|
"Unix timestamp representing the creation time of the message."
|
|
thread_id:
|
|
type: string
|
|
description: |
|
|
"Identifier of the thread to which this message belongs. Defaults to parent thread."
|
|
example: "thread_asdf"
|
|
assistant_id:
|
|
type: string
|
|
description: |
|
|
"Identifier of the assistant involved in the message. Defaults to parent thread."
|
|
example: jan
|
|
role:
|
|
type: string
|
|
enum: ["user", "assistant"]
|
|
description: |
|
|
"Role of the sender, either 'user' or 'assistant'."
|
|
|
|
content:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
description: |
|
|
"Type of content, e.g., 'text'."
|
|
|
|
text:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
description: |
|
|
"Text content of the message."
|
|
example: "Hi!?"
|
|
annotations:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: |
|
|
"Annotations for the text content, if any."
|
|
example: []
|
|
metadata:
|
|
type: object
|
|
description: |
|
|
"Metadata associated with the message, defaults to an empty object."
|
|
|
|
example: {}
|
|
|
|
GetMessageResponse:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: "The identifier of the message."
|
|
example: msg_abc123
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a thread message."
|
|
default: thread.message
|
|
created_at:
|
|
type: integer
|
|
format: int64
|
|
description: "Unix timestamp representing the creation time of the message."
|
|
example: 1699017614
|
|
thread_id:
|
|
type: string
|
|
description: "Identifier of the thread to which this message belongs."
|
|
example: thread_abc123
|
|
role:
|
|
type: string
|
|
description: "Role of the sender, either 'user' or 'assistant'."
|
|
example: user
|
|
content:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
description: "Type of content, e.g., 'text'."
|
|
example: text
|
|
text:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
description: "Text content of the message."
|
|
example: "How does AI work? Explain it in simple terms."
|
|
annotations:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Annotations for the text content, if any."
|
|
example: []
|
|
file_ids:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Array of file IDs associated with the message, if any."
|
|
example: []
|
|
assistant_id:
|
|
type: string
|
|
description: "Identifier of the assistant involved in the message, if applicable."
|
|
example: null
|
|
run_id:
|
|
type: string
|
|
description: "Run ID associated with the message, if applicable."
|
|
example: null
|
|
metadata:
|
|
type: object
|
|
description: "Metadata associated with the message."
|
|
example: {}
|
|
|
|
CreateMessageResponse:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: "The identifier of the created message."
|
|
example: msg_abc123
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a thread message."
|
|
example: thread.message
|
|
created_at:
|
|
type: integer
|
|
format: int64
|
|
description: "Unix timestamp representing the creation time of the message."
|
|
example: 1699017614
|
|
thread_id:
|
|
type: string
|
|
description: "Identifier of the thread to which this message belongs."
|
|
example: thread_abc123
|
|
role:
|
|
type: string
|
|
description: "Role of the sender, either 'user' or 'assistant'."
|
|
example: user
|
|
content:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
description: "Type of content, e.g., 'text'."
|
|
example: text
|
|
text:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
description: "Text content of the message."
|
|
example: "How does AI work? Explain it in simple terms."
|
|
annotations:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Annotations for the text content, if any."
|
|
example: []
|
|
file_ids:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Array of file IDs associated with the message, if any."
|
|
example: []
|
|
assistant_id:
|
|
type: string
|
|
description: "Identifier of the assistant involved in the message, if applicable."
|
|
example: null
|
|
run_id:
|
|
type: string
|
|
description: "Run ID associated with the message, if applicable."
|
|
example: null
|
|
metadata:
|
|
type: object
|
|
description: "Metadata associated with the message."
|
|
example: {}
|
|
|
|
ListMessagesResponse:
|
|
type: object
|
|
properties:
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a list."
|
|
default: "list"
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/ListMessageObject"
|
|
first_id:
|
|
type: string
|
|
description: "Identifier of the first message in the list."
|
|
example: "msg_abc123"
|
|
last_id:
|
|
type: string
|
|
description: "Identifier of the last message in the list."
|
|
example: "msg_abc456"
|
|
has_more:
|
|
type: boolean
|
|
description: "Indicates whether there are more messages to retrieve."
|
|
example: false
|
|
|
|
ListMessageObject:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: "The identifier of the message."
|
|
example: msg_abc123
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a thread message."
|
|
example: thread.message
|
|
created_at:
|
|
type: integer
|
|
format: int64
|
|
description: "Unix timestamp representing the creation time of the message."
|
|
example: 1699017614
|
|
thread_id:
|
|
type: string
|
|
description: "Identifier of the thread to which this message belongs."
|
|
example: thread_abc123
|
|
role:
|
|
type: string
|
|
description: "Role of the sender, either 'user' or 'assistant'."
|
|
example: user
|
|
content:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
type:
|
|
type: string
|
|
description: "Type of content, e.g., 'text'."
|
|
text:
|
|
type: object
|
|
properties:
|
|
value:
|
|
type: string
|
|
description: "Text content of the message."
|
|
example: "How does AI work? Explain it in simple terms."
|
|
annotations:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Annotations for the text content, if any."
|
|
file_ids:
|
|
type: array
|
|
items:
|
|
type: string
|
|
description: "Array of file IDs associated with the message, if any."
|
|
example: []
|
|
assistant_id:
|
|
type: string
|
|
description: "Identifier of the assistant involved in the message, if applicable."
|
|
example: null
|
|
run_id:
|
|
type: string
|
|
description: "Run ID associated with the message, if applicable."
|
|
example: null
|
|
metadata:
|
|
type: object
|
|
description: "Metadata associated with the message."
|
|
example: {}
|
|
|
|
MessageFileObject:
|
|
type: object
|
|
properties:
|
|
id:
|
|
type: string
|
|
description: "The identifier of the file."
|
|
example: file-abc123
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a thread message file."
|
|
example: thread.message.file
|
|
created_at:
|
|
type: integer
|
|
format: int64
|
|
description: "Unix timestamp representing the creation time of the file."
|
|
example: 1699061776
|
|
message_id:
|
|
type: string
|
|
description: "Identifier of the message to which this file is associated."
|
|
example: msg_abc123
|
|
|
|
ListMessageFilesResponse:
|
|
type: object
|
|
properties:
|
|
object:
|
|
type: string
|
|
description: "Type of the object, indicating it's a list."
|
|
default: "list"
|
|
data:
|
|
type: array
|
|
items:
|
|
$ref: "#/components/schemas/MessageFileObject"
|