Class: ElevenlabsClient::Endpoints::AgentsPlatform::TestInvocations

Inherits:
Object
  • Object
show all
Defined in:
lib/elevenlabs_client/endpoints/agents_platform/test_invocations.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TestInvocations

Returns a new instance of TestInvocations.



7
8
9
# File 'lib/elevenlabs_client/endpoints/agents_platform/test_invocations.rb', line 7

def initialize(client)
  @client = client
end

Instance Method Details

#get(test_invocation_id) ⇒ Hash

GET /v1/convai/test-invocations/test_invocation_id Gets a test invocation by ID Documentation: https://elevenlabs.io/docs/api-reference/convai/test-invocations/get

Parameters:

  • test_invocation_id (String)

    The id of a test invocation

Returns:

  • (Hash)

    Test invocation details including test runs and status



17
18
19
20
# File 'lib/elevenlabs_client/endpoints/agents_platform/test_invocations.rb', line 17

def get(test_invocation_id)
  endpoint = "/v1/convai/test-invocations/#{test_invocation_id}"
  @client.get(endpoint)
end

#resubmit(test_invocation_id, test_run_ids:, agent_id:, **options) ⇒ Hash

POST /v1/convai/test-invocations/test_invocation_id/resubmit Resubmits specific test runs from a test invocation Documentation: https://elevenlabs.io/docs/api-reference/convai/test-invocations/resubmit

Parameters:

  • test_invocation_id (String)

    The id of a test invocation

  • test_run_ids (Array<String>)

    List of test run IDs to resubmit

  • agent_id (String)

    Agent ID to resubmit tests for

  • options (Hash)

    Optional parameters

Options Hash (**options):

  • :agent_config_override (Hash)

    Configuration overrides to use for testing

Returns:

  • (Hash)

    Resubmission response



32
33
34
35
36
37
38
39
40
# File 'lib/elevenlabs_client/endpoints/agents_platform/test_invocations.rb', line 32

def resubmit(test_invocation_id, test_run_ids:, agent_id:, **options)
  endpoint = "/v1/convai/test-invocations/#{test_invocation_id}/resubmit"
  request_body = {
    test_run_ids: test_run_ids,
    agent_id: agent_id
  }.merge(options)
  
  @client.post(endpoint, request_body)
end