Skip to content

Commit

Permalink
Latest version of HazyResearch/manifest doesn't support accessing "cl…
Browse files Browse the repository at this point in the history
…ient" directly (langchain-ai#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
  • Loading branch information
hrajeshkumar authored Sep 11, 2023
1 parent 3173957 commit 737b75d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/extras/integrations/llms/manifest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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())"
]
},
{
Expand Down
5 changes: 4 additions & 1 deletion libs/langchain/langchain/llms/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ def validate_environment(cls, values: Dict) -> Dict:
@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:
Expand Down

0 comments on commit 737b75d

Please sign in to comment.