mirror of
https://github.com/stulzq/azure-openai-proxy.git
synced 2025-12-19 15:24:24 +01:00
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
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user