Class: Telnyx::Resources::AI::Assistants::Tests::Runs
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Assistants::Tests::Runs
- Defined in:
- lib/telnyx/resources/ai/assistants/tests/runs.rb
Overview
Configure AI assistant specifications
Instance Method Summary collapse
-
#initialize(client:) ⇒ Runs
constructor
private
A new instance of Runs.
-
#list(test_id, page_number: nil, page_size: nil, status: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Retrieves paginated execution history for a specific assistant test with filtering options.
-
#retrieve(run_id, test_id:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::Tests::TestRunResponse
Retrieves detailed information about a specific test run execution.
-
#trigger(test_id, destination_version_id: nil, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::Tests::TestRunResponse
Some parameter documentations has been truncated, see Models::AI::Assistants::Tests::RunTriggerParams for more details.
Constructor Details
#initialize(client:) ⇒ Runs
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 Runs.
96 97 98 |
# File 'lib/telnyx/resources/ai/assistants/tests/runs.rb', line 96 def initialize(client:) @client = client end |
Instance Method Details
#list(test_id, page_number: nil, page_size: nil, status: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>
Retrieves paginated execution history for a specific assistant test with filtering options
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/telnyx/resources/ai/assistants/tests/runs.rb', line 53 def list(test_id, params = {}) parsed, = Telnyx::AI::Assistants::Tests::RunListParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["ai/assistants/tests/%1$s/runs", test_id], query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"), page: Telnyx::Internal::DefaultFlatPagination, model: Telnyx::AI::Assistants::Tests::TestRunResponse, options: ) end |
#retrieve(run_id, test_id:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::Tests::TestRunResponse
Retrieves detailed information about a specific test run execution
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/telnyx/resources/ai/assistants/tests/runs.rb', line 21 def retrieve(run_id, params) parsed, = Telnyx::AI::Assistants::Tests::RunRetrieveParams.dump_request(params) test_id = parsed.delete(:test_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["ai/assistants/tests/%1$s/runs/%2$s", test_id, run_id], model: Telnyx::AI::Assistants::Tests::TestRunResponse, options: ) end |
#trigger(test_id, destination_version_id: nil, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::Tests::TestRunResponse
Some parameter documentations has been truncated, see Models::AI::Assistants::Tests::RunTriggerParams for more details.
Initiates immediate execution of a specific assistant test
82 83 84 85 86 87 88 89 90 91 |
# File 'lib/telnyx/resources/ai/assistants/tests/runs.rb', line 82 def trigger(test_id, params = {}) parsed, = Telnyx::AI::Assistants::Tests::RunTriggerParams.dump_request(params) @client.request( method: :post, path: ["ai/assistants/tests/%1$s/runs", test_id], body: parsed, model: Telnyx::AI::Assistants::Tests::TestRunResponse, options: ) end |