azure-openai-proxy
azure-openai-proxy copied to clipboard
Config behavior changed since v1.3.6?
I only get this error since v1.3.6, v1.3.5 works fine with the same configuration from the environment variable:
azure-openai | 2024/05/12 06:35:30 Init from config file
azure-openai | 2024/05/12 06:35:30 executable path: /app/azure-openai-proxy
azure-openai | 2024/05/12 06:35:30 read config file error: open /app/config.yaml: no such file or directory
azure-openai | panic: open /app/config.yaml: no such file or directory
azure-openai |
azure-openai | goroutine 1 [running]:
azure-openai | main.main()
azure-openai | github.com/stulzq/azure-openai-proxy/cmd/main.go:31 +0xfa
azure-openai exited with code 2
Checking https://github.com/stulzq/azure-openai-proxy/releases/tag/v1.3.6, maybe this is related?
feat: optimize read config file
https://github.com/stulzq/azure-openai-proxy/commit/e3cd10288d3da2e464ecb8c547321d83d135d10e
My docker-compose.yml:
azure-openai:
image: stulzq/azure-openai-proxy:v1.3.5
ports:
- 8080:8080
environment:
AZURE_OPENAI_ENDPOINT: https://<aoai-deployment>.openai.azure.com/
After tracing the code, it seems AZURE_OPENAI_MODEL_MAPPER can't be empty, but the behavior doesn't change here, just the error handling in new versions:
err := azure.Init()
if err != nil {
panic(err)
}
As AZURE_OPENAI_MODEL_MAPPER doesn't seem to be required, maybe we can change the logic of this line?
if endpoint != "" && openaiModelMapper != "" {
https://github.com/stulzq/azure-openai-proxy/blob/v1.3.8/azure/init.go#L34-L43