Skip to content

orca_sdk.async_client#

ActionRecommendation #

Bases: TypedDict

action instance-attribute #

action

The recommended action to take

rationale instance-attribute #

rationale

Explanation for why this action was recommended

PredictionFeedbackRequest #

Bases: TypedDict

value instance-attribute #

value

The feedback value. For updates, UNSET means keep existing value. None means delete the feedback.

comment instance-attribute #

comment

Optional comment. For updates, UNSET means keep existing comment. None means remove the comment.

GetMemorysetByNameOrIdMemoryByMemoryIdParams #

Bases: TypedDict

memory_id instance-attribute #

memory_id

ID of the memory

DeleteMemorysetByNameOrIdMemoryByMemoryIdParams #

Bases: TypedDict

memory_id instance-attribute #

memory_id

ID of the memory

PostDatasourceUploadRequest #

Bases: TypedDict

name instance-attribute #

name

Name for the datasource

description instance-attribute #

description

Optional description for the datasource

GetDatasourceByNameOrIdDownloadParams #

Bases: TypedDict

file_type instance-attribute #

file_type

File type to download: * hf_dataset: Zipped HuggingFace dataset (default) * json: Row-oriented JSON array * csv: CSV file

GetTelemetryPredictionByPredictionIdMemorySuggestionsParams #

Bases: TypedDict

prediction_id instance-attribute #

prediction_id

ID of the prediction to generate suggestions for

num_memories instance-attribute #

num_memories

Number of memory suggestions to generate

refresh instance-attribute #

refresh

Force the explanation agent to re-run even if a cached explanation exists

OrcaAsyncClient #

Bases: AsyncClient

__init__ #

__init__(
    *,
    api_key=None,
    base_url="",
    headers=None,
    transport=None,
    timeout=None,
    limits=None,
    max_redirects=20,
    event_hooks=None,
    http1=True,
    http2=False,
    proxy=None,
    log_level=logging.WARNING
)

Initialize an OrcaAPI async httpx client

Parameters:

  • api_key (str | None, default: None ) –

    API key to use for authentication, will default to ORCA_API_KEY if not set.

  • base_url (URL | str, default: '' ) –

    URL of the OrcaAPI, will default to ORCA_API_URL or the cloud API URL if not set.

use #

use()

Context manager to inject this async client into OrcaSDK async methods