| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A robust Python SDK for seamless integration with the Genstack AI platform. This SDK enables developers to interact with Genstack's AI generation APIs, providing a simple and efficient interface for sending requests and handling responses.
Install via pip (recommended):
pip install genstackOr clone this repository and install dependencies:
git clone <repo-url>
cd Python-SDK
pip install -r requirements.txtfrom genstack import Genstack
client = Genstack(api_key="gen-<your-api-key>")
response = client.generate(
input="Generate a short poem about the sea.",
track="default-track", # Required
model="gpt-4-1-nano-oai" # Optional, defaults to 'auto'
)
if "output" in response:
print(response["output"][0]["output"]["text"])
else:
print("Error:", response.get("error", "Unknown error"))generate(input, model="auto", track=None)Returns: dict — The API response as a dictionary.
Tests are provided using pytest:
pytest tests/Python-SDK/
genstack/
__init__.py
genstack.py
tests/
test_generate.py
call_test.py
x_test.py
pyproject.toml
requirements.txt
README.md
MIT License. See LICENSE for details.
For more information, visit the Genstack documentation or contact the maintainer at shreyk.dev@gmail.com.
| Back | FazBrowse Home | New Git URL |