Class: Telnyx::Resources::AI::Assistants::Tools
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Assistants::Tools
- Defined in:
- lib/telnyx/resources/ai/assistants/tools.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Tools
constructor
private
A new instance of Tools.
-
#test_(tool_id, assistant_id:, arguments: nil, dynamic_variables: nil, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::ToolTestResponse
Test a webhook tool for an assistant.
Constructor Details
#initialize(client:) ⇒ Tools
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 Tools.
43 44 45 |
# File 'lib/telnyx/resources/ai/assistants/tools.rb', line 43 def initialize(client:) @client = client end |
Instance Method Details
#test_(tool_id, assistant_id:, arguments: nil, dynamic_variables: nil, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::ToolTestResponse
Test a webhook tool for an assistant
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/ai/assistants/tools.rb', line 25 def test_(tool_id, params) parsed, = Telnyx::AI::Assistants::ToolTestParams.dump_request(params) assistant_id = parsed.delete(:assistant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/assistants/%1$s/tools/%2$s/test", assistant_id, tool_id], body: parsed, model: Telnyx::Models::AI::Assistants::ToolTestResponse, options: ) end |