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 hashes)
Built Distribution
groq-0.2.0-py3-none-any.whl
(50.0 kB
view hashes)