partners[openai]: update the docstring of OpenAI, OpenAIEmbeddings and ChatOpenAI classes (#18908)

**Description:** Update the docstring of OpenAI, OpenAIEmbeddings and
ChatOpenAI classes
**Issue:** Update import module paths to the current LangChain API
**Dependencies:** None
**Lint and test**: `make format` and `make lint` were run

This incorporates the review comments from langchain-ai/langchain#18637
which I closed due to an issue I had in updating that pr branch

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
aditya thomas
2024-03-12 02:18:54 +05:30
committed by GitHub
parent 11195cfa42
commit 5c2f7e6b2b
3 changed files with 14 additions and 13 deletions

View File

@@ -44,16 +44,15 @@ class OpenAIEmbeddings(BaseModel, Embeddings):
environment variable ``OPENAI_API_KEY`` set with your API key or pass it
as a named parameter to the constructor.
In order to use the library with Microsoft Azure endpoints, use
AzureOpenAIEmbeddings.
Example:
.. code-block:: python
from langchain_openai import OpenAIEmbeddings
openai = OpenAIEmbeddings(model="text-embedding-3-large")
In order to use the library with Microsoft Azure endpoints, use
AzureOpenAIEmbeddings.
model = OpenAIEmbeddings(model="text-embedding-3-large")
"""
client: Any = Field(default=None, exclude=True) #: :meta private: