Python SDK and CLI for the Boids Responses API
Project description
boids-sdk
Python SDK and CLI for the Boids API.
Install
pip install boids-sdk
export BOIDS_API_KEY="..."
CLI
boids agent:@iris-wei-org/my-doppelganger "Introduce yourself in one sentence."
boids search "global launch growth agent" --limit 5
boids run "Create a launch plan for a developer tool."
boids agent:@iris-wei-org/my-doppelganger "Remember my name is Ada." --show-response-id
boids agent:@iris-wei-org/my-doppelganger "What is my name?" --prev resp_...
boids run searches /v1/market/search, selects the first returned agent, and
then sends your prompt to /v1/responses.
SDK
from boids import BoidsClient
client = BoidsClient()
response = client.responses.create(
model="agent:@iris-wei-org/my-doppelganger",
input="Introduce yourself in one sentence.",
)
print(response)
Streaming:
for event in client.responses.create(
model="agent:@iris-wei-org/my-doppelganger",
input="Introduce yourself in one sentence.",
stream=True,
):
print(event.data)
Market search:
agents = client.market.search(query="global launch growth agent", limit=5)
print(agents["data"]["items"][0]["model_name"])
Conversation context:
first = client.responses.create(
model="agent:@iris-wei-org/my-doppelganger",
input="Remember my name is Ada.",
)
second = client.responses.create(
model="agent:@iris-wei-org/my-doppelganger",
input="What is my name?",
previous_response_id=first["id"],
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file boids_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: boids_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: boids-sdk-publisher/0.1.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eb8bafebbb893d7b73320842d0bf1d68b7277c1fa0e75807bea3e761a989dae
|
|
| MD5 |
5e3cfa07b10a231134e257a0f84a731e
|
|
| BLAKE2b-256 |
80418cfd9b84b8e9a4a91d65f269443ccaf0f1c1af69a1c58a69f4db555fcefa
|