aiconfig-extension-groq


Nameaiconfig-extension-groq JSON
Version 0.0.2 PyPI version JSON
download
home_page
SummaryAn extension for using the Groq client wrapper with AIConfig.
upload_time2024-03-06 01:29:06
maintainer
docs_urlNone
authorLastMile AI
requires_python>=3.10
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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](https://console.groq.com/keys) 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:

```bash
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](https://github.com/lastmile-ai/aiconfig/blob/b9a9e59dfd6251ab91580c0b8a4ef37906e8b9d4/cookbooks/Groq/aiconfig_model_registry.py) and associated [AIConfig file](https://github.com/lastmile-ai/aiconfig/blob/b9a9e59dfd6251ab91580c0b8a4ef37906e8b9d4/cookbooks/Groq/groq.aiconfig.json) for a reference example.

1. Import the library to your code: `from aiconfig_extension_groq import GroqParser`.
2. Import the AIConfig model registery: `from aiconfig import ModelRegistryParser`
3. 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 under `ModelParserRegistry` class for more info
4. 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
5. 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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "aiconfig-extension-groq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "LastMile AI",
    "author_email": "Rossdan Craig <rossdan@lastmileai.dev>, Ankush Pala <ankush@lastmileai.dev>",
    "download_url": "https://files.pythonhosted.org/packages/e0/18/73dc9c8dbed08d14ff5bfc20c6297181acc82c5af48ad4a13ec268f87a58/aiconfig_extension_groq-0.0.2.tar.gz",
    "platform": null,
    "description": "This extension contains the Groq client wrapper to use with AIConfig:\n\n# Part 1: Register your API key\n\nCreate an API key from the Groq [website](https://console.groq.com/keys) 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:\n\n```bash\nGROQ_API_KEY=<your-api-key-here>\n```\n\n# Part 2: Import and use this extension\n\n`pip3 install aiconfig-extension-groq`\n\nFor the following steps below, see the [Groq cookbook](https://github.com/lastmile-ai/aiconfig/blob/b9a9e59dfd6251ab91580c0b8a4ef37906e8b9d4/cookbooks/Groq/aiconfig_model_registry.py) and associated [AIConfig file](https://github.com/lastmile-ai/aiconfig/blob/b9a9e59dfd6251ab91580c0b8a4ef37906e8b9d4/cookbooks/Groq/groq.aiconfig.json) for a reference example.\n\n1. Import the library to your code: `from aiconfig_extension_groq import GroqParser`.\n2. Import the AIConfig model registery: `from aiconfig import ModelRegistryParser`\n3. 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 under `ModelParserRegistry` class for more info\n4. 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\n5. Now whenever you call `aiconfig.run()` these model parsers will be loaded and available!\n\nYou 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.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An extension for using the Groq client wrapper with AIConfig.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/lastmile-ai/aiconfig/",
        "Issues": "https://github.com/lastmile-ai/aiconfig/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8743603b640b48fe8436bd05b2db62216d8ddf60d9f43e2004733b27385a8ae6",
                "md5": "593c4a087686412f4d415b1de727b16c",
                "sha256": "262a82a02141a2b4cc04a1b20dcafc84cad1cce051cdf03395b28504015ae050"
            },
            "downloads": -1,
            "filename": "aiconfig_extension_groq-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "593c4a087686412f4d415b1de727b16c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4041,
            "upload_time": "2024-03-06T01:29:05",
            "upload_time_iso_8601": "2024-03-06T01:29:05.479134Z",
            "url": "https://files.pythonhosted.org/packages/87/43/603b640b48fe8436bd05b2db62216d8ddf60d9f43e2004733b27385a8ae6/aiconfig_extension_groq-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e01873dc9c8dbed08d14ff5bfc20c6297181acc82c5af48ad4a13ec268f87a58",
                "md5": "0a5d931cf411e61932624ab9d15da24d",
                "sha256": "786374600187a6a5309236bed4a7d0728de740f886a010248f3d8316d3790149"
            },
            "downloads": -1,
            "filename": "aiconfig_extension_groq-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0a5d931cf411e61932624ab9d15da24d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3766,
            "upload_time": "2024-03-06T01:29:06",
            "upload_time_iso_8601": "2024-03-06T01:29:06.356524Z",
            "url": "https://files.pythonhosted.org/packages/e0/18/73dc9c8dbed08d14ff5bfc20c6297181acc82c5af48ad4a13ec268f87a58/aiconfig_extension_groq-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-06 01:29:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lastmile-ai",
    "github_project": "aiconfig",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aiconfig-extension-groq"
}
        
Elapsed time: 0.18726s