From 000c877e16a2b9e35ec7806ea9ee4d3a8a036203 Mon Sep 17 00:00:00 2001 From: Kye Date: Sat, 11 Nov 2023 18:14:57 -0500 Subject: [PATCH] openai.proxy Former-commit-id: ab708ab6be4abf47cf496b009c4d7a5086774af0 --- swarms/models/openai_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarms/models/openai_models.py b/swarms/models/openai_models.py index c1fdd2b1..1aea7b03 100644 --- a/swarms/models/openai_models.py +++ b/swarms/models/openai_models.py @@ -500,10 +500,10 @@ class BaseOpenAI(BaseLLM): if self.openai_proxy: import openai - raise Exception("The 'openai.proxy' option isn't read in the client API. You will need to pass it when you instantiate the client, e.g. 'OpenAI(proxy={ + openai.proxy = { "http": self.openai_proxy, "https": self.openai_proxy, - })'") # type: ignore[assignment] # noqa: E501 + } # type: ignore[assignment] # noqa: E501 return {**openai_creds, **self._default_params} @property