AZOPENAI Library

AZOPENAI Library

Overview

The AZOPENAI Library is an importable library containing functions to connect, authenticate, and interact with Microsoft’s Foundry. This library is used in the Azure OpenAI Adapter.

Import the AZOPENAI library into your project. Typically only the AZOPENAIclient module needs to be required in order to create the client and access the API methods.

require "AZOPENAI.AZOPENAIclient"

How it works:

Use the Translator’s built in help to review how to use each function:

Creates the AZOPENAI adapter framework, adding the various method modules to a metatable and storing the configurations added to the custom fields.

-- Create Azure OpenAI client local AzureClient = AZOPENAIclient{ model_uri = Configs["Model URI"], auth_mode = Configs["Authentication Mode"], api_key = Configs["API Key"], azure_tenant_id = Configs["Azure Tenant ID"], azure_client_id = Configs["Azure Client ID"], azure_client_secret = Configs["Azure Client Secret"], http_timeout = Configs["Request Timeout"] } -- Check endpoint mode local EndpointMode = AzureClient.parsed_endpoint.mode

Create a chat using Azure OpenAI chat completions.

Create a chat using Azure OpenAI responses.