Skip to content

Commit

Permalink
Make openaiModelMapper optional in the init process
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 committed May 12, 2024
1 parent e85eed3 commit c3b78ee
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 c3b78ee

Please sign in to comment.