Class: Telnyx::Resources::AI::Conversations::Messages

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/ai/conversations/messages.rb

Overview

Manage historical AI assistant conversations

Instance Method Summary collapse

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.

Parameters:



32
33
34
# File 'lib/telnyx/resources/ai/conversations/messages.rb', line 32

def initialize(client:)
  @client = client
end

Instance Method Details

#list(conversation_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::MessageListResponse

Retrieve messages for a specific conversation, including tool calls made by the assistant.

Parameters:

Returns:

See Also:



20
21
22
23
24
25
26
27
# File 'lib/telnyx/resources/ai/conversations/messages.rb', line 20

def list(conversation_id, params = {})
  @client.request(
    method: :get,
    path: ["ai/conversations/%1$s/messages", conversation_id],
    model: Telnyx::Models::AI::Conversations::MessageListResponse,
    options: params[:request_options]
  )
end