MCPcopy Create free account
hub / github.com/AsyncFuncAI/deepwiki-open / init_sync_client

Method init_sync_client

api/openai_client.py:190–196  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

188 self._api_kwargs = {} # add api kwargs when the OpenAI Client is called
189
190 def init_sync_client(self):
191 api_key = self._api_key or os.getenv(self._env_api_key_name)
192 if not api_key:
193 raise ValueError(
194 f"Environment variable {self._env_api_key_name} must be set"
195 )
196 return OpenAI(api_key=api_key, base_url=self.base_url)
197
198 def init_async_client(self):
199 api_key = self._api_key or os.getenv(self._env_api_key_name)

Callers 2

__init__Method · 0.95
from_dictMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected