The GroqAPI Python SDK
Project description
GroqAPI for Python
Installation
To install the GroqAPI Python Library, you can just use pip
:
pip install groq
Usage
Make sure to export your access key to the GROQ_SECRET_ACCESS_KEY
environment variable.
from groq.cloud.core import ChatCompletion
with ChatCompletion("llama2-70b-4096") as chat:
prompt = "Is AI fun or what?"
response, _, _ = chat.send_chat(prompt)
print(response)
Look at our /examples
folder for more examples.
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
groq-0.2.0.tar.gz
(36.1 kB
view details)
Built Distribution
groq-0.2.0-py3-none-any.whl
(50.0 kB
view details)
File details
Details for the file groq-0.2.0.tar.gz
.
File metadata
- Download URL: groq-0.2.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1016-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e655f137a791ae79e9272705bf1a2a6200f282da42927f6a3595280ff57d7bb |
|
MD5 | ee8c4f8b1e31f9382574cc0d1c3e19e0 |
|
BLAKE2b-256 | 3a6466660628cb6644e3ab72ec72cb80157a14b5ec887285114d9aac019f1915 |
File details
Details for the file groq-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: groq-0.2.0-py3-none-any.whl
- Upload date:
- Size: 50.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1016-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0cadc90caa4a7861087b8269725b70c334fbe31c80a1ec8319e8bfbdd5b2d80 |
|
MD5 | b92f16ca4555eeb01609ff6e7822c75d |
|
BLAKE2b-256 | f6af83e10df39d12c2c2867498205ae2cbad74ee299389eb40890a1889cb4210 |