Class: Telnyx::Resources::AI::Conversations::ConversationInsights

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/ai/conversations/conversation_insights.rb,
sig/telnyx/resources/ai/conversations/conversation_insights.rbs

Overview

Manage historical AI assistant conversations

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ ConversationInsights

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 ConversationInsights.

Parameters:



48
49
50
# File 'lib/telnyx/resources/ai/conversations/conversation_insights.rb', line 48

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve_aggregates(created_at: nil, group_by: nil, insight_id: nil, metadata: nil, show: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse

Some parameter documentations has been truncated, see Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams for more details.

Aggregate conversation insights by specified fields

Parameters:

  • created_at (String)

    Filter by creation datetime to scope the aggregation window. Supports range oper

  • group_by (Array<String>)

    Fields to group by (can be comma-separated or multiple parameters). Prefix a fie

  • insight_id (String)

    Optional insight ID to filter conversation insights. Only insights matching this

  • metadata (Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesParams::Metadata)
  • show (Array<String>)

    Fields to include in the result (can be comma-separated or multiple parameters).

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/telnyx/resources/ai/conversations/conversation_insights.rb', line 32

def retrieve_aggregates(params = {})
  parsed, options =
    Telnyx::AI::Conversations::ConversationInsightRetrieveAggregatesParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "ai/conversations/conversation-insights/aggregates",
    query: query,
    model: Telnyx::Models::AI::Conversations::ConversationInsightRetrieveAggregatesResponse,
    options: options
  )
end