Azure OpenAI 객체 구조
Azure OpenAI Service를 애플리케이션에 통합하면 Azure OpenAI에서 호스팅하는 여러 배포 및 리전 모델을 원활하게 활용할 수 있습니다. 이 섹션에서는 필요에 따라 Azure OpenAI endpoint를 구성하는 방법을 자세히 설명합니다.
Azure OpenAI 구성을 설정하는 방법에 대한 자세한 가이드는 여기를 클릭하세요
예시 구성
endpoints:
azureOpenAI:
titleModel: "gpt-4-turbo"
groups:
- group: "my-westus" # arbitrary name
apiKey: "${WESTUS_API_KEY}"
instanceName: "actual-instance-name" # name of the resource group or instance
version: "2023-12-01-preview"
# baseURL: https://prod.example.com
# additionalHeaders:
# X-Custom-Header: value
models:
gpt-4-vision-preview:
deploymentName: gpt-4-vision-preview
version: "2024-02-15-preview"
gpt-3.5-turbo:
deploymentName: gpt-35-turbo
gpt-3.5-turbo-1106:
deploymentName: gpt-35-turbo-1106
gpt-4:
deploymentName: gpt-4
gpt-4-1106-preview:
deploymentName: gpt-4-1106-preview
- group: "my-eastus"
apiKey: "${EASTUS_API_KEY}"
instanceName: "actual-eastus-instance-name"
deploymentName: gpt-4-turbo
version: "2024-02-15-preview"
baseURL: "https://gateway.ai.cloudflare.com/v1/cloudflareId/azure/azure-openai/${INSTANCE_NAME}/${DEPLOYMENT_NAME}" # uses env variables
additionalHeaders:
X-Custom-Header: value
models:
gpt-4-turbo: true참고: Azure OpenAI endpoint는
streamRate,titleModel,titleMethod,titlePrompt,titlePromptTemplate,titleEndpoint를 포함한 모든 Shared Endpoint Settings을 지원합니다.
assistants
키:
| Key | Type | Description | Example |
|---|---|---|---|
| assistants | Boolean | Azure OpenAI endpoint에 대한 어시스턴트를 활성화하거나 비활성화합니다. `true`로 설정하면 이 endpoint와 연결된 어시스턴트가 활성화됩니다. | Choose one, either the official OpenAI API or Azure OpenAI API for assistants, not both. |
기본값: 지정되지 않음
예시:
assistants: truegroups
키:
| Key | Type | Description | Example |
|---|---|---|---|
| groups | Array | 지리적 위치나 목적에 따른 모델 그룹 구성입니다. `groups` 배열의 각 항목은 특정 그룹화(주로 지리적 지역이나 별도의 구성) 하에 있는 모델 세트를 설정합니다. |
기본값: 지정되지 않음
참고: 위의 예시를 참조하세요.
Group 객체 구조
groups 아래의 각 항목은 레코드 목록의 일부이며, 각 항목은 다음 필드를 포함합니다:
group
키:
| Key | Type | Description | Example |
|---|---|---|---|
| group | String | 모델 그룹 식별자. |
필수: 예
예시:
"group": "my-westus"apiKey
키:
| Key | Type | Description | Example |
|---|---|---|---|
| apiKey | String | Azure OpenAI Service에 액세스하기 위한 API 키입니다. | It's highly recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
필수: 예
예시:
apiKey: "${WESTUS_API_KEY}"instanceName
키:
| Key | Type | Description | Example |
|---|---|---|---|
| instanceName | String | Azure 인스턴스의 이름입니다. **두 가지 도메인 형식을 모두 지원합니다**: `.openai.azure.com`(레거시) 및 `.cognitiveservices.azure.com`(신규). 전체 도메인(예: `my-instance.cognitiveservices.azure.com`)을 지정하거나, 레거시 `.openai.azure.com` 형식과의 하위 호환성을 위해 인스턴스 이름(예: `my-instance`)만 지정할 수 있습니다. | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
필수: 예
예시:
# Using just the instance name (legacy format applied)
instanceName: "my-westus"
# OR using the full domain (new format)
instanceName: "my-westus.cognitiveservices.azure.com"version
키:
| Key | Type | Description | Example |
|---|---|---|---|
| version | String | API 버전 | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
기본값: 지정되지 않음
예시:
version: "2023-12-01-preview"baseURL
키:
| Key | Type | Description | Example |
|---|---|---|---|
| baseURL | String | Azure OpenAI Service의 기본 URL입니다. | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
기본값: 지정되지 않음
예시:
baseURL: "https://prod.example.com"additionalHeaders
키:
| Key | Type | Description | Example |
|---|---|---|---|
| additionalHeaders | Dictionary | API 요청을 위한 추가 헤더입니다. 모든 헤더 값은 문자열이어야 합니다. | It's recommended to use a custom env. variable reference for the values of field, as shown in the example. `api-key` header value is sent on every request. |
기본값: 지정되지 않음
예시:
additionalHeaders:
X-Custom-Header: ${YOUR_SECRET_CUSTOM_VARIABLE}serverless
키:
| Key | Type | Description | Example |
|---|---|---|---|
| serverless | Boolean | Azure OpenAI 채팅 완료를 위한 서버리스 추론 endpoint 사용을 나타냅니다. `true`로 설정하면 해당 그룹이 Azure "Models as a Service" 모델로서 서버리스 추론 endpoint를 사용하도록 구성되었음을 지정합니다. | More info [here](../ai_endpoints/azure.mdx#serverless-inference-endpoints) |
기본값: 지정되지 않음
예시:
serverless: trueaddParams
키:
| Key | Type | Description | Example |
|---|---|---|---|
| addParams | Object/Dictionary | 요청에 추가 매개변수를 추가합니다. API별 옵션을 지정할 때 유용합니다. |
기본값: 지정되지 않음
예시:
addParams:
safe_prompt: truedropParams
키:
| Key | Type | Description | Example |
|---|---|---|---|
| dropParams | Array/List of Strings | 요청에서 기본 매개변수를 제거합니다. 지정된 기본 매개변수를 제외합니다. | Default parameters are the standard request parameters LibreChat sends to the Azure OpenAI API. |
기본값: 지정되지 않음
예시:
dropParams: ["stop", "user", "frequency_penalty", "presence_penalty"]models
키:
| Key | Type | Description | Example |
|---|---|---|---|
| models | 그룹 내 개별 모델에 대한 구성입니다. 배포 이름 및 버전을 포함하여 각 모델에 대한 설정을 구성합니다. | Model configurations can adopt the group's deployment name and/or version when configured as a boolean (set to `true`) or an object for detailed settings of either of those fields. |
기본값: 지정되지 않음
예시:
models:
gpt-4-vision-preview:
deploymentName: "arbitrary-deployment-name"
version: "2024-02-15-preview"이 가이드는 어떤가요?