Skip to main content

Public unified Mubit SDK with one Client facade

Project description

mubit-sdk

Public unified SDK for Mubit.

Install

pip install mubit-sdk

Quickstart

import os

from mubit import Client

client = Client(
    run_id="demo_run",
    api_key=os.environ["MUBIT_API_KEY"],
)

accepted = client.control.ingest({
    "run_id": "demo_run",
    "agent_id": "sdk-quickstart",
    "idempotency_key": "quickstart-1",
    "parallel": False,
    "items": [
        {
            "item_id": "item-1",
            "content_type": "text",
            "text": "hello mubit from control ingest",
            "payload_json": "",
            "hints_json": "",
            "metadata_json": "{\"source\":\"quickstart\"}",
        }
    ],
})

job = client.control.get_ingest_job({"run_id": "demo_run", "job_id": accepted["job_id"]})
while not job.get("done", False):
    import time

    time.sleep(0.3)
    job = client.control.get_ingest_job({"run_id": "demo_run", "job_id": accepted["job_id"]})

answer = client.control.query(
    {
        "run_id": "demo_run",
        "query": "what was ingested?",
        "mode": "agent_routed",
        "direct_lane": "semantic_search",
        "include_linked_runs": False,
        "limit": 5,
        "embedding": [],
    }
)
print(answer.get("final_answer"))

Environment Variables

  • Required: MUBIT_API_KEY

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

mubit_sdk-0.1.2.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

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

mubit_sdk-0.1.2-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file mubit_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: mubit_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mubit_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b5ff246bcdd53c58c2c27c80560113a7ebeaa695184a0993dc88939ba47eeb08
MD5 0cfc005e52431b886ca09cea9144508a
BLAKE2b-256 c691a62238c1bfc00853f62949d22c459ad5fefa6f93d1c1c31e397e73932349

See more details on using hashes here.

File details

Details for the file mubit_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mubit_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mubit_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 991f6d7c89925a1d8589502d1e664da61f6af5f4c12a0083b503a223ff9cd91d
MD5 732eeadcd9e311aecefa682f881e5275
BLAKE2b-256 5b29f14520e9cbc853a84c9155215c56649a994919e04cbbaf40055404534230

See more details on using hashes here.

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