Skip to main content

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",
    prompt="Hello, my name is",
    max_new_tokens=10,
    temperature=0.2,
)
print(response.outputs[0].text)

Documentation

Documentation is available at https://scaleapi.github.io/spellbook-serve/.

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

spellbook_serve_client-0.0.0a1.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

spellbook_serve_client-0.0.0a1-py3-none-any.whl (14.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page