Class: Telnyx::Resources::AI::Conversations::InsightGroups
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Conversations::InsightGroups
- Defined in:
- lib/telnyx/resources/ai/conversations/insight_groups.rb,
lib/telnyx/resources/ai/conversations/insight_groups/insights.rb,
sig/telnyx/resources/ai/conversations/insight_groups.rbs,
sig/telnyx/resources/ai/conversations/insight_groups/insights.rbs
Overview
Manage historical AI assistant conversations
Defined Under Namespace
Classes: Insights
Instance Attribute Summary collapse
-
#insights ⇒ Telnyx::Resources::AI::Conversations::InsightGroups::Insights
readonly
Manage historical AI assistant conversations.
Instance Method Summary collapse
-
#delete(group_id, request_options: {}) ⇒ nil
Permanently deletes the specified insight template group by its ID.
-
#initialize(client:) ⇒ InsightGroups
constructor
private
A new instance of InsightGroups.
-
#insight_groups(name:, description: nil, webhook: nil, idempotency_key: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Some parameter documentations has been truncated, see Models::AI::Conversations::InsightGroupInsightGroupsParams for more details.
-
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Returns the details of a single insight template group, including the insight templates assigned to it.
-
#retrieve_insight_groups(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::InsightTemplateGroup>
Returns a paginated list of your insight template groups.
-
#update(group_id, description: nil, name: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Updates the specified insight template group and returns the updated group.
Constructor Details
#initialize(client:) ⇒ InsightGroups
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 InsightGroups.
146 147 148 149 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 146 def initialize(client:) @client = client @insights = Telnyx::Resources::AI::Conversations::InsightGroups::Insights.new(client: client) end |
Instance Attribute Details
#insights ⇒ Telnyx::Resources::AI::Conversations::InsightGroups::Insights (readonly)
Manage historical AI assistant conversations
11 12 13 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 11 def insights @insights end |
Instance Method Details
#delete(group_id, request_options: {}) ⇒ nil
Permanently deletes the specified insight template group by its ID.
73 74 75 76 77 78 79 80 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 73 def delete(group_id, params = {}) @client.request( method: :delete, path: ["ai/conversations/insight-groups/%1$s", group_id], model: NilClass, options: params[:request_options] ) end |
#insight_groups(name:, description: nil, webhook: nil, idempotency_key: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Some parameter documentations has been truncated, see Models::AI::Conversations::InsightGroupInsightGroupsParams for more details.
Creates a new insight template group for organizing related insight templates, and returns the created group.
104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 104 def insight_groups(params) parsed, = Telnyx::AI::Conversations::InsightGroupInsightGroupsParams.dump_request(params) header_params = {idempotency_key: "idempotency-key"} @client.request( method: :post, path: "ai/conversations/insight-groups", headers: parsed.slice(*header_params.keys).transform_keys(header_params), body: parsed.except(*header_params.keys), model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: ) end |
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Returns the details of a single insight template group, including the insight templates assigned to it.
25 26 27 28 29 30 31 32 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 25 def retrieve(group_id, params = {}) @client.request( method: :get, path: ["ai/conversations/insight-groups/%1$s", group_id], model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: params[:request_options] ) end |
#retrieve_insight_groups(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::InsightTemplateGroup>
Returns a paginated list of your insight template groups. Groups organize related insight templates that are applied together when analyzing conversations.
130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 130 def retrieve_insight_groups(params = {}) parsed, = Telnyx::AI::Conversations::InsightGroupRetrieveInsightGroupsParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "ai/conversations/insight-groups", query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::AI::Conversations::InsightTemplateGroup, options: ) end |
#update(group_id, description: nil, name: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Updates the specified insight template group and returns the updated group.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 51 def update(group_id, params = {}) parsed, = Telnyx::AI::Conversations::InsightGroupUpdateParams.dump_request(params) @client.request( method: :put, path: ["ai/conversations/insight-groups/%1$s", group_id], body: parsed, model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: ) end |