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.
Release files for groq 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| groq-0.2.0.tar.gz | 36.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| groq-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.1 kB
Release files / groq-0.2.0.tar.gz
| Download URL | groq-0.2.0.tar.gz |
|---|---|
| Size | 36.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e655f137a791ae79e9272705bf1a2a6200f282da42927f6a3595280ff57d7bb
|
|
BLAKE2b-256 checksum How to use checksums |
3a6466660628cb6644e3ab72ec72cb80157a14b5ec887285114d9aac019f1915
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1016-gcp
|
Release files / groq-0.2.0-py3-none-any.whl
| Download URL | groq-0.2.0-py3-none-any.whl |
|---|---|
| Size | 50.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0cadc90caa4a7861087b8269725b70c334fbe31c80a1ec8319e8bfbdd5b2d80
|
|
BLAKE2b-256 checksum How to use checksums |
f6af83e10df39d12c2c2867498205ae2cbad74ee299389eb40890a1889cb4210
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1016-gcp
|