Class: Telnyx::Resources::AI::Conversations::Messages
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Conversations::Messages
- Defined in:
- lib/telnyx/resources/ai/conversations/messages.rb
Overview
Manage historical AI assistant conversations
Instance Method Summary collapse
-
#initialize(client:) ⇒ Messages
constructor
private
A new instance of Messages.
-
#list(conversation_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::MessageListResponse>
Retrieve messages for a specific conversation, including tool calls made by the assistant.
Constructor Details
#initialize(client:) ⇒ Messages
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Messages.
41 42 43 |
# File 'lib/telnyx/resources/ai/conversations/messages.rb', line 41 def initialize(client:) @client = client end |
Instance Method Details
#list(conversation_id, page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::MessageListResponse>
Retrieve messages for a specific conversation, including tool calls made by the assistant.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/telnyx/resources/ai/conversations/messages.rb', line 25 def list(conversation_id, params = {}) parsed, = Telnyx::AI::Conversations::MessageListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["ai/conversations/%1$s/messages", conversation_id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::Models::AI::Conversations::MessageListResponse, options: ) end |