This extension contains the Groq client wrapper to use with AIConfig:
Part 1: Register your API key
Create an API key from the Groq website and save it in your environment under the name GROQ_API_KEY. We recommend saving it into your home ~/.env file, or one of your home hidden files like ~/.bashrc or ~/.zshrc so that you don't need to redefine it every session whenever you open a new terminal:
GROQ_API_KEY=<your-api-key-here>
Part 2: Import and use this extension
pip3 install aiconfig-extension-groq
For the following steps below, see the Groq cookbook and associated AIConfig file for a reference example.
- Import the library to your code:
from aiconfig_extension_groq import GroqParser. - Import the AIConfig model registery:
from aiconfig import ModelRegistryParser - In code, add all the relevant model parser objects that you want to use from this extension to the registry. Ex:
ModelParserRegistry.register_model_parser(GroqParser("mixtral-8x7b-32768")). You can read the docstrings underModelParserRegistryclass for more info - In your AIConfig file, add a field
model_parserswith the model name you want to use and map it to the id of model parser you want to use. Ex (here both the model name and model id for this model parser are the same): https://github.com/lastmile-ai/aiconfig/blob/cddf72bba2bd011355d88f98bdd1d7385de53883/cookbooks/Groq/groq.aiconfig.json#L7-L9 - Now whenever you call
aiconfig.run()these model parsers will be loaded and available!
You can now use either the AIConfig SDK, VS Code extension, or local editor to use the Groq client to play around with models, modify prompts, change parameters, etc.
Release files for aiconfig-extension-groq 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiconfig_extension_groq-0.0.2.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aiconfig_extension_groq-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / aiconfig_extension_groq-0.0.2.tar.gz
| Download URL | aiconfig_extension_groq-0.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
786374600187a6a5309236bed4a7d0728de740f886a010248f3d8316d3790149
|
|
BLAKE2b-256 checksum How to use checksums |
e01873dc9c8dbed08d14ff5bfc20c6297181acc82c5af48ad4a13ec268f87a58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / aiconfig_extension_groq-0.0.2-py3-none-any.whl
| Download URL | aiconfig_extension_groq-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
262a82a02141a2b4cc04a1b20dcafc84cad1cce051cdf03395b28504015ae050
|
|
BLAKE2b-256 checksum How to use checksums |
8743603b640b48fe8436bd05b2db62216d8ddf60d9f43e2004733b27385a8ae6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|