From 21de128d5b32ce871ad020f9a0ce1d419dc13070 Mon Sep 17 00:00:00 2001 From: awtkns <32209255+awtkns@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:13:12 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20azure=20with=20custom=20ke?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform/reworkd_platform/web/api/agent/model_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/reworkd_platform/web/api/agent/model_factory.py b/platform/reworkd_platform/web/api/agent/model_factory.py index 275ab214e0..7e49a7d126 100644 --- a/platform/reworkd_platform/web/api/agent/model_factory.py +++ b/platform/reworkd_platform/web/api/agent/model_factory.py @@ -40,7 +40,7 @@ def create_model( base, headers, use_helicone = get_base_and_headers(settings, model_settings, user) kwargs = { "openai_api_base": base, - "openai_api_key": settings.openai_api_key, + "openai_api_key": model_settings.custom_api_key or settings.openai_api_key, "temperature": model_settings.temperature, "model": model_settings.model, "max_tokens": model_settings.max_tokens,