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
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
Delete insight group by ID.
-
#initialize(client:) ⇒ InsightGroups
constructor
private
A new instance of InsightGroups.
-
#insight_groups(name:, description: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Create a new insight group.
-
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Get insight group by ID.
-
#retrieve_insight_groups(page_number: nil, page_size: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Conversations::InsightTemplateGroup>
Get all insight groups.
-
#update(group_id, description: nil, name: nil, webhook: nil, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Update an insight template 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.
131 132 133 134 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 131 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
Delete insight group by ID
72 73 74 75 76 77 78 79 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 72 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, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Create a new insight group
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 93 def insight_groups(params) parsed, = Telnyx::AI::Conversations::InsightGroupInsightGroupsParams.dump_request(params) @client.request( method: :post, path: "ai/conversations/insight-groups", body: parsed, model: Telnyx::AI::Conversations::InsightTemplateGroupDetail, options: ) end |
#retrieve(group_id, request_options: {}) ⇒ Telnyx::Models::AI::Conversations::InsightTemplateGroupDetail
Get insight group by ID
24 25 26 27 28 29 30 31 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 24 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>
Get all insight groups
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 115 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
Update an insight template group
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups.rb', line 50 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 |