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.3.0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

groq-0.3.0-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file groq-0.3.0.tar.gz.

File metadata

  • Download URL: groq-0.3.0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.2.0-1019-gcp

File hashes

Hashes for groq-0.3.0.tar.gz
Algorithm Hash digest
SHA256 8a4a626c03b1c181dcaacc4e3fd3b36fc054335b4be31d77efac641e81096272
MD5 fe5c2f13e8af48cc578ae91ca2671e99
BLAKE2b-256 fa8beba92e5fba5a07a93fa0b2dbadf46815a02947e1930a12d65265efb542a1

See more details on using hashes here.

File details

Details for the file groq-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: groq-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.5 Linux/6.2.0-1019-gcp

File hashes

Hashes for groq-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e714f0f1359dc90c6bd6d03ddb3a45f66cc0077715c57d777244fa4cd3bf051c
MD5 9de2d38d124a1151f83284e1475b7998
BLAKE2b-256 43ef5e244337bc399786e9cfca3c5423f0a0646e0c1cbd50645c535d86b77e2f

See more details on using hashes here.

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