Skip to main content

SDK for interacting with Orca Services

Project description

OrcaSDK

OrcaSDK is a Python library for building and using retrieval-augmented models with OrcaCloud. It enables you to create, deploy, and maintain models that can adapt to changing circumstances without retraining by accessing external data called "memories."

Documentation

You can find the documentation for all things Orca at docs.orcadb.ai. This includes tutorials, how-to guides, and the full interface reference for OrcaSDK.

Features

  • Labeled Memorysets: Store and manage labeled examples that your models can use to guide predictions
  • Classification Models: Build retrieval-augmented classification models that adapt to new data without retraining
  • Embedding Models: Use pre-trained or finetuned embedding models to represent your data
  • Telemetry: Collect feedback and monitor memory usage to optimize model performance
  • Datasources: Easily ingest data from various sources into your memorysets

Installation

OrcaSDK is compatible with Python 3.10 or higher and is available on PyPI. You can install it with your favorite python package manager:

  • Pip: pip install orca_sdk
  • Conda: conda install orca_sdk
  • Poetry: poetry add orca_sdk

Quick Start

from dotenv import load_dotenv
from orca_sdk import OrcaCredentials, LabeledMemoryset, ClassificationModel

# Load your API key from environment variables
load_dotenv()
assert OrcaCredentials.is_authenticated()

# Create a labeled memoryset
memoryset = LabeledMemoryset.from_disk("my_memoryset", "./data.jsonl")

# Create a classification model using the memoryset
model = ClassificationModel("my_model", memoryset)

# Make predictions
prediction = model.predict("my input")

# Get Action Recommendation
action, rationale = prediction.recommend_action()
print(f"Recommended action: {action}")
print(f"Rationale: {rationale}")

# Generate and add synthetic memory suggestions
if action == "add_memories":
    suggestions = prediction.generate_memory_suggestions(num_memories=3)

    # Review suggestions
    for suggestion in suggestions:
        print(f"Suggested: '{suggestion['value']}' -> {suggestion['label']}")

    # Add suggestions to memoryset
    model.memoryset.insert(suggestions)
    print(f"Added {len(suggestions)} new memories to improve model performance!")

For a more detailed walkthrough, check out our Quick Start Guide.

Support

If you have any questions, please reach out to us at support@orcadb.ai.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orca_sdk-0.1.22.tar.gz (160.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orca_sdk-0.1.22-py3-none-any.whl (174.2 kB view details)

Uploaded Python 3

File details

Details for the file orca_sdk-0.1.22.tar.gz.

File metadata

  • Download URL: orca_sdk-0.1.22.tar.gz
  • Upload date:
  • Size: 160.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orca_sdk-0.1.22.tar.gz
Algorithm Hash digest
SHA256 e9856d6e7a33d8c4f40bc3701db89c06e03d43927e0bab0d87e0e5813b3ee2dd
MD5 7c35d93b7034887370daaed76079328c
BLAKE2b-256 832793e6ebef3a3f0ad750f36b38f2f6645bc8d472ab6fc08894064b01a23677

See more details on using hashes here.

Provenance

The following attestation bundles were made for orca_sdk-0.1.22.tar.gz:

Publisher: orca-sdk-release.yml on OrcaDB/orca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orca_sdk-0.1.22-py3-none-any.whl.

File metadata

  • Download URL: orca_sdk-0.1.22-py3-none-any.whl
  • Upload date:
  • Size: 174.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for orca_sdk-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 9450d538ac8b044d591ea3fcb5e8193f9d43d90e417e02e00c93ba4bcb30ec1e
MD5 d14ad9fd60afbcb7b1e1b9a321db7b5c
BLAKE2b-256 94d0ca1e852526cd63122acafbc329d5d9f70e70dfd63ae049c25b3794d9332b

See more details on using hashes here.

Provenance

The following attestation bundles were made for orca_sdk-0.1.22-py3-none-any.whl:

Publisher: orca-sdk-release.yml on OrcaDB/orca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page