feat: add proxysettings for azureopenai and openai (#987)

Signed-off-by: tanujd11 <dwiveditanuj41@gmail.com>
Co-authored-by: Aris Boutselis <arisboutselis08@gmail.com>
Co-authored-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Tanuj Dwivedi
2024-02-28 21:40:42 +05:30
committed by GitHub
parent aab8d77feb
commit 307710eddc
4 changed files with 43 additions and 0 deletions

View File

@@ -73,6 +73,7 @@ var ServeCmd = &cobra.Command{
model := os.Getenv("K8SGPT_MODEL")
baseURL := os.Getenv("K8SGPT_BASEURL")
engine := os.Getenv("K8SGPT_ENGINE")
proxyEndpoint := os.Getenv("K8SGPT_PROXY_ENDPOINT")
// If the envs are set, allocate in place to the aiProvider
// else exit with error
envIsSet := backend != "" || password != "" || model != ""
@@ -83,6 +84,7 @@ var ServeCmd = &cobra.Command{
Model: model,
BaseURL: baseURL,
Engine: engine,
ProxyEndpoint: proxyEndpoint,
Temperature: temperature(),
}