Skip to main content

The GroqAPI Python SDK

Project description

GroqAPI for Python

PyPI version

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


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)

Uploaded Source

Built Distribution

groq-0.2.0-py3-none-any.whl (50.0 kB view hashes)

Uploaded Python 3

Supported by

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