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/....png

response.image.download("cat.png") # This will download the image to the current directory

image_bytes = response.image.as_bytes() # This will return the image as bytes

# 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.5.tar.gz (7.0 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.5-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shardai-0.0.5.tar.gz
  • Upload date:
  • Size: 7.0 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.5.tar.gz
Algorithm Hash digest
SHA256 1c4da5a804701d5df3e21dc706d789244b35527b10cef0eafefaec561e4e9394
MD5 ce8b84e5605a6dec169a798252810fa7
BLAKE2b-256 3c72e81cdcad774b3487333202ba6adb43e2ed97da53f4e7394ea03d549b3089

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shardai-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9fe8c063d2a07ec88e8b628d9c51077bbeef820bd723fe9d58392e7ffe83e50c
MD5 b5e02bcd4fba62c14ba59906f9e9c29f
BLAKE2b-256 470f407a5e7b71a4e9aafef63155d1376b160bf64b9f23d9b2258c709e6341d7

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