Spellbok Serve Python Client
Project description
Spellbook Serve
The Spellbook Serve Python library provides a convenient way of interfacing with a
spellbook-serve
endpoint running on
Scale Spellbook Serve or on your own infrastructure.
Get Started
Install
pip install spellbook-serve-client
Usage
If you are using Scale Spellbook Serve, you can get your API key from
https://spellbook.scale.com/settings.
Set the SCALE_API_KEY
environment variable to your API key.
If you are using your own infrastructure, you can set the
SPELLBOOK_SERVE_BASE_PATH
environment variable to the base URL of your
self-hosted spellbook-serve
endpoint.
from spellbook_serve_client import Completion
response = Completion.create(
model_name="llama-7b-text-generation-inference",
prompt="Hello, my name is",
max_new_tokens=10,
temperature=0.2,
)
print(response.outputs[0].text)
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
Built Distribution
Close
Hashes for spellbook_serve_client-0.0.0a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d8b134fae7214b2b1171d02ddeb44882a9e7235a30b2c7aee2f7ca7098e88d |
|
MD5 | 68cb3a733249aa368d4066cce410b860 |
|
BLAKE2b-256 | 0ce3608df2b4752eed52dce18f81deed27246bd72238445c1c9d57a2fe793893 |
Close
Hashes for spellbook_serve_client-0.0.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e157afd4c776c8867b053025045b0b3f649dc22bd758af078802e7cfc83ad5 |
|
MD5 | 5d73e6e19bdb6b3f743859c02c1cd483 |
|
BLAKE2b-256 | 144da5efd9ab6e32c6683fc038e285f29652e1ce795d4e23e1970468165d3884 |