Message
Insert Message
POST https://rebyte.ai/api/sdk/threads/{threadId}/messages
Create a new message in a thread.
Path parameters
thread_id(required): A string with the ID of the thread to create a message for.
Request body
role(required): A string, containing the role of the entity that is creating the message. Currently only user is supported.
content(required):A string with the content of the message.
file_ids: A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like retrieval and code_interpreter that can access and use files.
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
Example Request
Return
A message object.
Example
List Messages
GET https://rebyte.ai/api/sdk/threads/{threadId}/messages
Get list of messages in a thread.
Path parameters
thread_id(required): A string with the ID of the thread to create a message for.
Query parameters
limit: An integer, defaults to 20.A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
order: A string, defaults to desc. Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.
after: A string, with a cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
before: A string, with a cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
Example Request
Return
Returns a lit of messages.
Example
Get message
GET https://rebyte.ai/api/sdk/threads/{threadId}/messages/{messageId}
Get a message by id.
Path parameters
thread_id(required): A string, with the ID of the thread to which this message belongs.
message_id(required): A string, with the ID of the message to retrieve.
Example Request
Return
Returns a message object.
Example
Update message
POST https://rebyte.ai/api/sdk/threads/{threadId}/messages/{messageId}
Update a message by id.
Path parameters
thread_id(required): A string, with the ID of the thread to which this message belongs.
message_id(required): A string, with the ID of the message to retrieve.
Request body
metadata: A map. Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
Example Request
Return
Returns the modified message object.
Example
Last updated