azure

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package azure provides helpful types and functions for use with Azure OpenAI.

Index

Constants

View Source
const (
	AzureTenantIDKey         string = "AZURE_TENANT_ID"
	AzureOpenAIAPIKey        string = "AZURE_OPENAI_API_KEY"
	AzureOpenAIEndpointKey   string = "AZURE_OPENAI_ENDPOINT"
	AzureOpenAIAPIVersionKey string = "OPENAI_API_VERSION"
)
View Source
const (
	AzureOpenAIAPIVersionDefault string = "2024-07-01-preview" //"2024-06-01"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TenantID         string
	OpenAIEndpoint   string
	OpenAIAPIKey     string
	OpenAIAPIVersion string
}

Config represents the configuration needed for Azure OpenAI.

func LoadConfig

func LoadConfig() *Config

LoadConfig reads the environment variables and returns a new AzureConfig. This function assumes that the environment variables (for example, from and .env file) are already loaded.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL