Skip to content

Latest commit

 

History

History
207 lines (131 loc) · 10.6 KB

File metadata and controls

207 lines (131 loc) · 10.6 KB

HumanReviewSets

Overview

Available Operations

  • list - Get all human review sets
  • create - Create a human review set
  • get - Get a human review set by ID
  • update - Update a human review set
  • delete - Delete a human review set

list

Get all human review sets

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.human_review_sets.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
project_id Optional[str] ➖ Optional project ID to filter human review sets by project
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

List[models.GetV2HumanEvalSetsResponseBody]

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*

create

Create a human review set

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.human_review_sets.create()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request models.PostV2HumanEvalSetsRequestBody ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PostV2HumanEvalSetsResponseBody

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*

get

Get a human review set by ID

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.human_review_sets.get(id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ The ID of the human review set to retrieve
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.GetV2HumanEvalSetsIDResponseBody

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*

update

Update a human review set

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    res = orq.human_review_sets.update(id="<id>")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id str ✔️ The ID of the human review set to retrieve
request_body Optional[models.PatchV2HumanEvalSetsIDRequestBody] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.PatchV2HumanEvalSetsIDResponseBody

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*

delete

Delete a human review set

Example Usage

from orq_ai_sdk import Orq
import os


with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    orq.human_review_sets.delete(id="<id>")

    # Use the SDK ...

Parameters

Parameter Type Required Description
id str ✔️ The ID of the human review set to retrieve
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Errors

Error Type Status Code Content Type
models.APIDefaultError 4XX, 5XX */*