Minimal Python client for the TogoLM API
Project description
togolm
Minimal Python client for the TogoLM API.
Install
pip install togolm
Usage
from togolm import TogoLM
client = TogoLM(api_key="your_api_key")
result = client.query("Comment créer une entreprise au Togo ?")
print(result["answer"], result["sources"])
Streaming
for event in client.query_stream("Comment créer une entreprise au Togo ?"):
if event["type"] == "chunk":
print(event["text"], end="")
if event["type"] == "sources":
print("Sources:", event["sources"])
Omit api_key for public, rate-limited access. See the API reference for rate limits and full endpoint documentation.
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 Distribution
togolm-0.1.0.tar.gz
(2.5 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 togolm-0.1.0.tar.gz.
File metadata
- Download URL: togolm-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8ddd1e960fa78188b263bf84aa3a81a562166f23a64900b62a223ea1eff2d99
|
|
| MD5 |
54f9b2c7ca5cebcea5cae2af4bd2650f
|
|
| BLAKE2b-256 |
538a4802a8c17587f76c7dcbc0af2a2c09ba50877ff34bffd679e97f316273c7
|
File details
Details for the file togolm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: togolm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50af85ad9bf06066ccb6ebf7ea975cb6b8d917ae7ec03e4cbc1cfa7271b4158d
|
|
| MD5 |
2e1bf2053185fbfef7c203b9a259c948
|
|
| BLAKE2b-256 |
dc0bfa31af60e0e7c1fddf8651bb52ae704ed6fa75455eeb11ce427c6e5c5b49
|