Skip to content

Commit

Permalink
Make openaiModelMapper optional in the init process (#97)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
PeterDaveHello authored May 23, 2024
1 parent e85eed3 commit 7a8ff2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azure/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down

0 comments on commit 7a8ff2c

Please sign in to comment.