Skip to main content

A package for ShardAI

Project description

ShardAI PKG

Installation

pip install shardai

Usage

from shardai import ShardClient

client = ShardClient("your-api-key") # Replace with your API key

# Get all the available chat models
models = client.chat.models()

# Get the response from the chat model
response = client.chat.completions("Hello, how are you?", "llama_2_7b")

print(response.choices[0].message.content) # This will be a response from the model

# Get all the available image generation options

options = client.image.options()

# Get the response from the image generation model
response = client.image.completions("A picture of a cat")

print(response.image) # This will be an image as https://shard-ai.xyz/static/...

# Get all the available tts voices
voices = client.tts.voices()

# Get the response from the tts model
response = client.tts.completions("Hello, how are you?")

print(response.audio) # This will be an audio encoded in base64

License

MIT

Author

ShardAI

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

shardai-0.0.2.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shardai-0.0.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file shardai-0.0.2.tar.gz.

File metadata

  • Download URL: shardai-0.0.2.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for shardai-0.0.2.tar.gz
Algorithm Hash digest
SHA256 30030cda51ee002b20ae52d33c97486f0f7cddfdaa6153c3bfd0bc7941e668a0
MD5 49b22aa6d1dcbc4849a6f4147270f87a
BLAKE2b-256 7832ed78c63c47ba72a84f47db3a50e8c5d463e4fc4e9421cfda123bd6960a87

See more details on using hashes here.

File details

Details for the file shardai-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: shardai-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for shardai-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2772a250bd8d8f09e39c690333a071a58ea918e6268738c10d2113a1b3ef935d
MD5 908ab10d93e4d687f4b58f92c243501c
BLAKE2b-256 3a6205a4ee43785ceec93adf407d86278be2a65f9eeae52f8fb6ed8462b84bfc

See more details on using hashes here.

Supported by

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