Class: Telnyx::Resources::AI::Conversations::InsightGroups::Insights
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Conversations::InsightGroups::Insights
- Defined in:
- lib/telnyx/resources/ai/conversations/insight_groups/insights.rb,
sig/telnyx/resources/ai/conversations/insight_groups/insights.rbs
Overview
Manage historical AI assistant conversations
Instance Method Summary collapse
-
#assign(insight_id, group_id:, request_options: {}) ⇒ nil
Assigns the specified insight template to the specified insight template group.
-
#delete_unassign(insight_id, group_id:, request_options: {}) ⇒ nil
Removes the specified insight template from the specified group.
-
#initialize(client:) ⇒ Insights
constructor
private
A new instance of Insights.
Constructor Details
#initialize(client:) ⇒ Insights
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 Insights.
69 70 71 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups/insights.rb', line 69 def initialize(client:) @client = client end |
Instance Method Details
#assign(insight_id, group_id:, request_options: {}) ⇒ nil
Assigns the specified insight template to the specified insight template group.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups/insights.rb', line 23 def assign(insight_id, params) parsed, = Telnyx::AI::Conversations::InsightGroups::InsightAssignParams.dump_request(params) group_id = parsed.delete(:group_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/conversations/insight-groups/%1$s/insights/%2$s/assign", group_id, insight_id], model: NilClass, options: ) end |
#delete_unassign(insight_id, group_id:, request_options: {}) ⇒ nil
Removes the specified insight template from the specified group. The insight template itself is not deleted.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups/insights.rb', line 51 def delete_unassign(insight_id, params) parsed, = Telnyx::AI::Conversations::InsightGroups::InsightDeleteUnassignParams.dump_request(params) group_id = parsed.delete(:group_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["ai/conversations/insight-groups/%1$s/insights/%2$s/unassign", group_id, insight_id], model: NilClass, options: ) end |