From 737b75d278a0eef8b3b9002feadba69ffe50e1b1 Mon Sep 17 00:00:00 2001 From: Rajesh Kumar Date: Tue, 12 Sep 2023 02:52:53 +0530 Subject: [PATCH] Latest version of HazyResearch/manifest doesn't support accessing "client" directly (#10389) **Description:** The latest version of HazyResearch/manifest doesn't support accessing the "client" directly. The latest version supports connection pools and a client has to be requested from the client pool. **Issue:** No matching issue was found **Dependencies:** The manifest.ipynb file in docs/extras/integrations/llms need to be updated **Twitter handle:** @hrk_cbe --- docs/extras/integrations/llms/manifest.ipynb | 2 +- libs/langchain/langchain/llms/manifest.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/extras/integrations/llms/manifest.ipynb b/docs/extras/integrations/llms/manifest.ipynb index 7b4de3e687a..3664b203962 100644 --- a/docs/extras/integrations/llms/manifest.ipynb +++ b/docs/extras/integrations/llms/manifest.ipynb @@ -57,7 +57,7 @@ "manifest = Manifest(\n", " client_name=\"huggingface\", client_connection=\"http://127.0.0.1:5000\"\n", ")\n", - "print(manifest.client.get_model_params())" + "print(manifest.client_pool.get_current_client().get_model_params())" ] }, { diff --git a/libs/langchain/langchain/llms/manifest.py b/libs/langchain/langchain/llms/manifest.py index aaaf3a24f76..5e2416ab412 100644 --- a/libs/langchain/langchain/llms/manifest.py +++ b/libs/langchain/langchain/llms/manifest.py @@ -34,7 +34,10 @@ class ManifestWrapper(LLM): @property def _identifying_params(self) -> Mapping[str, Any]: kwargs = self.llm_kwargs or {} - return {**self.client.client.get_model_params(), **kwargs} + return { + **self.client.client_pool.get_current_client().get_model_params(), + **kwargs, + } @property def _llm_type(self) -> str: