The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Add support for http clients in config (#1355)
Abdur Rahman Nawazebc5e25f9825
diff --git a/embedchain/config/llm/base.py b/embedchain/config/llm/base.pyindex 26b094c9e..cdb158c5b 100644--- a/embedchain/config/llm/base.py+++ b/embedchain/config/llm/base.py@@ -98,6 +98,8 @@ class BaseLlmConfig(BaseConfig):base_url: Optional[str] = None,endpoint: Optional[str] = None,model_kwargs: Optional[dict[str, Any]] = None,+ http_client: Optional[Any] = None,+ http_async_client: Optional[Any] = None,local: Optional[bool] = False,default_headers: Optional[Mapping[str, str]] = None,):@@ -175,6 +177,8 @@ class BaseLlmConfig(BaseConfig):self.base_url = base_urlself.endpoint = endpointself.model_kwargs = model_kwargs+ self.http_client = http_client+ self.http_async_client = http_async_clientself.local = localself.default_headers = default_headersdiff --git a/embedchain/llm/openai.py b/embedchain/llm/openai.pyindex c1b2d0afd..aec91b2a0 100644--- a/embedchain/llm/openai.py+++ b/embedchain/llm/openai.py@@ -52,6 +52,8 @@ class OpenAILlm(BaseLlm):callbacks=callbacks,api_key=api_key,base_url=base_url,+ http_client=config.http_client,+ http_async_client=config.http_async_client,)else:chat = ChatOpenAI(**kwargs, api_key=api_key, base_url=base_url)