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)
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")
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"},
],
)
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.4.tar.gz
(2.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.4.tar.gz.
File metadata
- Download URL: analogai_sdk-0.1.4.tar.gz
- Upload date:
- Size: 2.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 |
cf0da102c650d2d7c88c8fc5994c0fc5c775b6699e9dede03848586ea3bc1040
|
|
| MD5 |
48855413b13b3257f876b169a7c5afe1
|
|
| BLAKE2b-256 |
32bc22825e470297c012a3ebd53313b0e332068e97170f7ff8d5e307849b0d7f
|
File details
Details for the file analogai_sdk-0.1.4-py3-none-any.whl.
File metadata
- Download URL: analogai_sdk-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.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 |
102b6904da0c726f5f4cbeb7d9d7e9384c6a95734a7c74fdbba6c8a171750d40
|
|
| MD5 |
546971721e865561e28339b5bd3086eb
|
|
| BLAKE2b-256 |
38c51e5599c7e33b78416c062debed371508f60095b4f2f67220adf89265e7e0
|