Class: Telnyx::Resources::AI::Assistants::Tests::TestSuites::Runs

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb

Overview

Configure AI assistant specifications

Instance Method Summary collapse

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.

Parameters:



75
76
77
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 75

def initialize(client:)
  @client = client
end

Instance Method Details

#list(suite_name, page_number: nil, page_size: nil, status: nil, test_suite_run_id: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultFlatPagination<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>

Retrieves paginated history of test runs for a specific test suite with filtering options

Parameters:

  • suite_name (String)
  • page_number (Integer)
  • page_size (Integer)
  • status (String)

    Filter runs by execution status (pending, running, completed, failed, timeout)

  • test_suite_run_id (String)

    Filter runs by specific suite execution batch ID

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 31

def list(suite_name, params = {})
  parsed, options = Telnyx::AI::Assistants::Tests::TestSuites::RunListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["ai/assistants/tests/test-suites/%1$s/runs", suite_name],
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    page: Telnyx::Internal::DefaultFlatPagination,
    model: Telnyx::AI::Assistants::Tests::TestRunResponse,
    options: options
  )
end

#trigger(suite_name, destination_version_id: nil, request_options: {}) ⇒ Array<Telnyx::Models::AI::Assistants::Tests::TestRunResponse>

Some parameter documentations has been truncated, see Models::AI::Assistants::Tests::TestSuites::RunTriggerParams for more details.

Executes all tests within a specific test suite as a batch operation

Parameters:

  • suite_name (String)
  • destination_version_id (String)

    Optional assistant version ID to use for all test runs in this suite. If provide

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



61
62
63
64
65
66
67
68
69
70
# File 'lib/telnyx/resources/ai/assistants/tests/test_suites/runs.rb', line 61

def trigger(suite_name, params = {})
  parsed, options = Telnyx::AI::Assistants::Tests::TestSuites::RunTriggerParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["ai/assistants/tests/test-suites/%1$s/runs", suite_name],
    body: parsed,
    model: Telnyx::Internal::Type::ArrayOf[Telnyx::AI::Assistants::Tests::TestRunResponse],
    options: options
  )
end