A Python client for Monster API v2
Project description
Monsterapi v2 - Beta Phase
A Python client for interacting with Monster API v2 in .
Installation
pip install monsterapi
Has support to following MonsterAPI services:
Available models:
LLMs:
1. falcon-7b-instruct
2. mpt-7b-instruct
3. llama2-7b-chat
4. falcon-40b-instruct
5. mpt-30b-instruct
Others models are accessible through client but are not activated yet. Will be updated shortly.
Text to Image:
1. stable-diffusion v1.5
2. stable-diffusion XL V1.0
Usage
set MONSTER_API_KEY
env variable to your API key.
from monsterapi import client
# Initialize client
client = client()
# Fetching a response
response = client.get_response(model='falcon-7b-instruct', data={
"prompt": "Your prompt here",
# ... other parameters
})
print(response)
# Checking status
status = client.get_status("your_process_id")
print(status)
# Waiting for result
result = client.wait_and_get_result("your_process_id")
print(result)
Run tests
Install test dependencies
pip install monsterapi[tests]
Run functional tests involving actual API key
export MONSTER_API_KEY=<your_api_key>
python3 -m pytest tests/ # Run all tests includes functional tests using actual API key
Run unit tests
export MONSTER_API_KEY="dummy"
python3 -m pytest tests/ -m "not slow" # Run only unit tests
PIP package push Instructions
pip install --upgrade setuptools wheel
python setup.py sdist bdist_wheel
pip install twine
twine upload dist/*
About us
Check us out at monsterapi.com
Check out new no-code finetuning service here
Checkout our Monster-SD Stable Diffusion v1.5 vs XL Comparison space here
Checkout our Monster API LLM comparison space here
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
monsterapi-0.1.2.dev0.tar.gz
(10.0 kB
view hashes)
Built Distribution
Close
Hashes for monsterapi-0.1.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54962350d7cbbb05d4e9136c3f0bedd7b6a3f52716bd8ebbafe5b8623ed10cd8 |
|
MD5 | 366dd76e1a3b84d92677c96751a9c62a |
|
BLAKE2b-256 | 8870bd7abd7f858d657883e46794d56b72eef154c800233059288b9c236a0ce6 |