Minimal Python SDK for AnalogAI completion endpoints
Project description
AnalogAI SDK (minimal)
This workspace contains a tiny Python helper for calling AnalogAI chat endpoints.
Setup
- Install dependencies with Poetry.
- Set environment variables in
.env(already created with placeholders):ANALOGAI_API_KEY(optional, if your server requires auth)ANALOGAI_AGENT_ID(required)ANALOGAI_BASE_URL(required)
Install (Poetry)
poetry install
Local install (editable)
poetry run pip install -e .
Global install (Poetry)
poetry build
pip install dist/analogai-0.1.0-py3-none-any.whl
PyPI name
Once published, the package will be available on PyPI as analogai.
Usage
from analogai_sdk import AnalogAIClient
client = AnalogAIClient()
response = client.generate_completion("your text here", mode="auto")
print(response)
for chunk in client.generate_streaming_completion("your text here"):
print(chunk)
Using explicit messages
from analogai_sdk import AnalogAIClient
client = AnalogAIClient()
response = client.generate_completion(
message_text="",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Say hello"},
],
mode="auto",
)
print(response)
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
analogai_sdk-0.1.5.tar.gz
(3.2 kB
view details)
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 analogai_sdk-0.1.5.tar.gz.
File metadata
- Download URL: analogai_sdk-0.1.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712e54027ad895474806f73d6d3c6b07586d4e65639680210aa9b031d68c7b6a
|
|
| MD5 |
dc22ac2df817acf63880b78d47679b1f
|
|
| BLAKE2b-256 |
b5a487be1858796fa7bcf8e4d833afb46371ab62841df90657ed3064c1b33175
|
File details
Details for the file analogai_sdk-0.1.5-py3-none-any.whl.
File metadata
- Download URL: analogai_sdk-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.10 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35676667c240e0f8a4b54f5c18a61f152c41bfb50d95ba6579110e5f27938182
|
|
| MD5 |
55960614cccc9254b995c68b4ca2dcb4
|
|
| BLAKE2b-256 |
f841d9ed7c64bd4147783508f88857e812436377feb0c88d57721ee0b69bfc83
|