An extension for using the Groq client wrapper with AIConfig.
Project description
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 underModelParserRegistry
class for more info - In your AIConfig file, add a field
model_parsers
with 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.
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
Built Distribution
File details
Details for the file aiconfig_extension_groq-0.0.1.tar.gz
.
File metadata
- Download URL: aiconfig_extension_groq-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 896a9c3269c5c06eebe09f447d265e7786a62b8abdb7a5ae904a56089a411970 |
|
MD5 | bd1c096dfcb1749b41f45b72cd118a6d |
|
BLAKE2b-256 | 6af0c2482cd464d8ecbf2fcb604175f17ae4b2b50265ad4847f6d1d8df4b1289 |
File details
Details for the file aiconfig_extension_groq-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: aiconfig_extension_groq-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac9b2a297936bb0183d1951a760e1506c5bf1133c44fe1ed346b401122206c5 |
|
MD5 | 960bf01a64db5f78e7234b2e9db488c4 |
|
BLAKE2b-256 | 971399a6ba0bf0b9ef9fa19309a28e3469a57d6de790fa2639198a28c4129265 |