SquareandCompass / groqapi-py-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About


Languages

Language:Python 100.0%