From c3b78ee11873f70863d6e4a98c4784bf7696b90d Mon Sep 17 00:00:00 2001 From: Peter Dave Hello Date: Sun, 12 May 2024 17:03:09 +0800 Subject: [PATCH] Make openaiModelMapper optional in the init process Modify the initialization condition in `azure/init.go` to allow the `openaiModelMapper` environment variable to be optional. This change facilitates configurations where the model mapper is not needed, and improving flexibility. Resolves: #95 --- azure/init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/init.go b/azure/init.go index b128ee4..d8242a7 100644 --- a/azure/init.go +++ b/azure/init.go @@ -31,7 +31,7 @@ func Init() error { apiVersion = viper.GetString(constant.ENV_AZURE_OPENAI_API_VER) endpoint = viper.GetString(constant.ENV_AZURE_OPENAI_ENDPOINT) openaiModelMapper = viper.GetString(constant.ENV_AZURE_OPENAI_MODEL_MAPPER) - if endpoint != "" && openaiModelMapper != "" { + if endpoint != "" { if apiVersion == "" { apiVersion = "2023-07-01-preview" }