From 503c382f882b12eefcd5b73ea46cb964b0f88a90 Mon Sep 17 00:00:00 2001 From: Anton Danylchenko <138660264+Anton-Constructor@users.noreply.github.com> Date: Mon, 11 Sep 2023 21:47:12 +0300 Subject: [PATCH] Fix mypy error in openai.py for client (#10445) We use your library and we have a mypy error because you have not defined a default value for the optional class property. Please fix this issue to make it compatible with the mypy. Thank you. --- libs/langchain/langchain/embeddings/openai.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain/langchain/embeddings/openai.py b/libs/langchain/langchain/embeddings/openai.py index 88cb7c9332..6ca9ed5dcf 100644 --- a/libs/langchain/langchain/embeddings/openai.py +++ b/libs/langchain/langchain/embeddings/openai.py @@ -159,7 +159,7 @@ class OpenAIEmbeddings(BaseModel, Embeddings): """ - client: Any #: :meta private: + client: Any = None #: :meta private: model: str = "text-embedding-ada-002" deployment: str = model # to support Azure OpenAI Service custom deployment names openai_api_version: Optional[str] = None