Skip to main content

Azure plugin for LLM using the AzureOpenAI class

Project description

llm-azure

PyPI Changelog License

LLM access to the Azure OpenAI SDK

Installation

Install this plugin in the same environment as LLM.

llm install llm-azure

Usage

First, set an API key for Azure OpenAI:

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:

- 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:

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.

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

llm_azure-1.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_azure-1.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_azure-1.2.tar.gz.

File metadata

  • Download URL: llm_azure-1.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_azure-1.2.tar.gz
Algorithm Hash digest
SHA256 3174f931df3b546cea510172550a25db04a35b250ad741033e5f09f65f767a12
MD5 02e48b5b07a53545d01a0302b4240f5a
BLAKE2b-256 6897ecabe692890d3814174a0575c4639ce5e904b457445e84fe6fbca76c5f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_azure-1.2.tar.gz:

Publisher: publish.yml on fabge/llm-azure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_azure-1.2-py3-none-any.whl.

File metadata

  • Download URL: llm_azure-1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for llm_azure-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb4ad6b6124fce1dd134af6de1041c579f6530bef3e34c827c383307a836bc07
MD5 415a681742d9bb0fdf7602e1903100f2
BLAKE2b-256 14257fda42b667bd8e069928aab0c62ac3304e731dd4b9622f788d40ba7808ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_azure-1.2-py3-none-any.whl:

Publisher: publish.yml on fabge/llm-azure

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page