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
Overview
Manage historical AI assistant conversations
Instance Method Summary collapse
-
#assign(insight_id, group_id:, request_options: {}) ⇒ nil
Assign an insight to a group.
-
#delete_unassign(insight_id, group_id:, request_options: {}) ⇒ nil
Remove an insight from a 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.
68 69 70 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups/insights.rb', line 68 def initialize(client:) @client = client end |
Instance Method Details
#assign(insight_id, group_id:, request_options: {}) ⇒ nil
Assign an insight to a 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
Remove an insight from a group
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/telnyx/resources/ai/conversations/insight_groups/insights.rb', line 50 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 |