llm-azure


Namellm-azure JSON
Version 1.0 PyPI version JSON
download
home_pageNone
SummaryAzure plugin for LLM using the AzureOpenAI class
upload_time2025-02-07 12:23:41
maintainerNone
docs_urlNone
authorFabian Geiger
requires_pythonNone
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llm-azure

[![PyPI](https://img.shields.io/pypi/v/llm-azure.svg)](https://pypi.org/project/llm-azure/)
[![Changelog](https://img.shields.io/github/v/release/fabge/llm-azure?include_prereleases&label=changelog)](https://github.com/fabge/llm-azure/releases)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/fabge/llm-azure/blob/main/LICENSE)

LLM access to the Azure OpenAI SDK

## Installation

Install this plugin in the same environment as [LLM](https://llm.datasette.io/).

```bash
llm install llm-azure
```

## Usage

First, set an API key for Azure OpenAI:

```bash
llm keys set azure
# Paste key here
```

To add the `gpt-4-32k` chat model, and embedding model `text-embedding-3-small` deployed in your Azure Subscription, add this to your `azure/config.yaml` file:

```yaml
- model_id: gpt-4-32k
  model_name: gpt-4-32k
  api_base: https://your_deployment.openai.azure.com/
  api_version: '2023-05-15'

- model_id: text-embedding-3-small
  embedding_model: true
  model_name: text-embedding-3-small
  api_base: https://your_deployment.openai.azure.com/
  api_version: '2023-05-14'
```

the configuration file should be in the `azure` directory in the config of your `llm` installation.
Run this command to find the directory in which this file should be created:

```bash
dirname "$(llm logs path)"
```

The `model_id` is the name LLM will use for the model. The `model_name` is the name which needs to be passed to the API - this might differ from the `model_id`, especially if `model_id` could potentially clash with other installed models.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llm-azure",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Fabian Geiger",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/3d/43/0fd749c58fbe7cfc8e28ee6489018464d717dc89895faa19382b758a28e0/llm_azure-1.0.tar.gz",
    "platform": null,
    "description": "# llm-azure\n\n[![PyPI](https://img.shields.io/pypi/v/llm-azure.svg)](https://pypi.org/project/llm-azure/)\n[![Changelog](https://img.shields.io/github/v/release/fabge/llm-azure?include_prereleases&label=changelog)](https://github.com/fabge/llm-azure/releases)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/fabge/llm-azure/blob/main/LICENSE)\n\nLLM access to the Azure OpenAI SDK\n\n## Installation\n\nInstall this plugin in the same environment as [LLM](https://llm.datasette.io/).\n\n```bash\nllm install llm-azure\n```\n\n## Usage\n\nFirst, set an API key for Azure OpenAI:\n\n```bash\nllm keys set azure\n# Paste key here\n```\n\nTo add the `gpt-4-32k` chat model, and embedding model `text-embedding-3-small` deployed in your Azure Subscription, add this to your `azure/config.yaml` file:\n\n```yaml\n- model_id: gpt-4-32k\n  model_name: gpt-4-32k\n  api_base: https://your_deployment.openai.azure.com/\n  api_version: '2023-05-15'\n\n- model_id: text-embedding-3-small\n  embedding_model: true\n  model_name: text-embedding-3-small\n  api_base: https://your_deployment.openai.azure.com/\n  api_version: '2023-05-14'\n```\n\nthe configuration file should be in the `azure` directory in the config of your `llm` installation.\nRun this command to find the directory in which this file should be created:\n\n```bash\ndirname \"$(llm logs path)\"\n```\n\nThe `model_id` is the name LLM will use for the model. The `model_name` is the name which needs to be passed to the API - this might differ from the `model_id`, especially if `model_id` could potentially clash with other installed models.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Azure plugin for LLM using the AzureOpenAI class",
    "version": "1.0",
    "project_urls": {
        "CI": "https://github.com/fabge/llm-azure/actions",
        "Changelog": "https://github.com/fabge/llm-azure/releases",
        "Homepage": "https://github.com/fabge/llm-azure",
        "Issues": "https://github.com/fabge/llm-azure/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9145d360b38775036220ea6dcb96c5d76e9480e26dc89ac7b4681b9821f0c64b",
                "md5": "429c20ab66daaf471b696c2cf566f12a",
                "sha256": "ade507add326b76cb6b777cc4c9fb2602a35271d4bd23304ecd6482375828578"
            },
            "downloads": -1,
            "filename": "llm_azure-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "429c20ab66daaf471b696c2cf566f12a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7426,
            "upload_time": "2025-02-07T12:23:36",
            "upload_time_iso_8601": "2025-02-07T12:23:36.588475Z",
            "url": "https://files.pythonhosted.org/packages/91/45/d360b38775036220ea6dcb96c5d76e9480e26dc89ac7b4681b9821f0c64b/llm_azure-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3d430fd749c58fbe7cfc8e28ee6489018464d717dc89895faa19382b758a28e0",
                "md5": "9953954fa527e8a81e8793147516f68d",
                "sha256": "a57ff3a256924bb1ee64b4a01189456791fdbc2566d59b67ea750b3324e9d516"
            },
            "downloads": -1,
            "filename": "llm_azure-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9953954fa527e8a81e8793147516f68d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6925,
            "upload_time": "2025-02-07T12:23:41",
            "upload_time_iso_8601": "2025-02-07T12:23:41.554163Z",
            "url": "https://files.pythonhosted.org/packages/3d/43/0fd749c58fbe7cfc8e28ee6489018464d717dc89895faa19382b758a28e0/llm_azure-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-07 12:23:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fabge",
    "github_project": "llm-azure",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "llm-azure"
}
        
Elapsed time: 1.16931s