Skip to content

orca_sdk.client#

ColumnType module-attribute #

ColumnType = Literal[
    "STRING",
    "FLOAT",
    "INT",
    "BOOL",
    "ENUM",
    "IMAGE",
    "OTHER",
]

The type of a column in a datasource

JobStatus module-attribute #

JobStatus = Literal[
    "INITIALIZED",
    "DISPATCHED",
    "WAITING",
    "PROCESSING",
    "COMPLETED",
    "FAILED",
    "ABORTING",
    "ABORTED",
]

Status of job in the job queue

PretrainedEmbeddingModelName module-attribute #

PretrainedEmbeddingModelName = Literal[
    "CLIP_BASE",
    "GTE_BASE",
    "CDE_SMALL",
    "DISTILBERT",
    "GTE_SMALL",
    "MXBAI_LARGE",
    "E5_LARGE",
    "BGE_BASE",
    "GIST_LARGE",
]

Names of pretrained embedding models that are supported by OrcaCloud

WorkerStatus module-attribute #

WorkerStatus = Literal[
    "IDLE", "BUSY", "DRAINING", "SHUTDOWN", "CRASHED"
]

Status of worker in the worker pool

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

GetTelemetryPredictionByPredictionIdParams #

Bases: TypedDict

calc_neighborhood_density instance-attribute #

calc_neighborhood_density

Calculate neighborhood density

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

OrcaClient #

Bases: Client

__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 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 client into any OrcaSDK methods