Skip to content

An AI-powered search engine with a generative UI

Make Azure deployment name configurable through environment vars

Yoshiki Miura2455b9ab61e9
diff --git a/.env.local.example b/.env.local.example
index 7ea10738..ce0b399d 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -54,6 +54,9 @@ SEARXNG_SAFESEARCH=0 # Safe search setting: 0 (off), 1 (moderate), 2 (strict)
# AZURE_API_KEY=
# The resource name is used in the assembled URL: https://{resourceName}.openai.azure.com/openai/deployments/{modelId}{path}.
# AZURE_RESOURCE_NAME=
+# The deployment name is the name of the Azure OpenAI deployment you want to use.
+# NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME=
+
# OpenAI Compatible Model
# Note: Only models with tool-use capabilities can be used
diff --git a/lib/types/models.ts b/lib/types/models.ts
index d6ef3cfa..1fd52ab7 100644
--- a/lib/types/models.ts
+++ b/lib/types/models.ts
@@ -49,8 +49,8 @@ export const models: Model[] = [
providerId: 'ollama'
},
{
- id: 'gpt-4o',
- name: 'GPT-4o',
+ id: process.env.NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME || 'undefined',
+ name: process.env.NEXT_PUBLIC_AZURE_DEPLOYMENT_NAME || 'Undefined',
provider: 'Azure',
providerId: 'azure'
},