Skip to content

Commit 7a8ff2c

Browse files
Make openaiModelMapper optional in the init process (#97)
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
1 parent e85eed3 commit 7a8ff2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

azure/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func Init() error {
3131
apiVersion = viper.GetString(constant.ENV_AZURE_OPENAI_API_VER)
3232
endpoint = viper.GetString(constant.ENV_AZURE_OPENAI_ENDPOINT)
3333
openaiModelMapper = viper.GetString(constant.ENV_AZURE_OPENAI_MODEL_MAPPER)
34-
if endpoint != "" && openaiModelMapper != "" {
34+
if endpoint != "" {
3535
if apiVersion == "" {
3636
apiVersion = "2023-07-01-preview"
3737
}

0 commit comments

Comments
 (0)