mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 15:03:21 +00:00
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:
@@ -603,8 +603,8 @@ class BaseOpenAI(BaseLLM):
|
||||
class OpenAI(BaseOpenAI):
|
||||
"""OpenAI large language models.
|
||||
|
||||
To use, you should have the ``openai`` python package installed, and the
|
||||
environment variable ``OPENAI_API_KEY`` set with your API key.
|
||||
To use, you should have the environment variable ``OPENAI_API_KEY``
|
||||
set with your API key, or pass it as a named parameter to the constructor.
|
||||
|
||||
Any parameters that are valid to be passed to the openai.create call can be passed
|
||||
in, even if not explicitly saved on this class.
|
||||
@@ -612,8 +612,9 @@ class OpenAI(BaseOpenAI):
|
||||
Example:
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_community.llms import OpenAI
|
||||
openai = OpenAI(model_name="gpt-3.5-turbo-instruct")
|
||||
from langchain_openai import OpenAI
|
||||
|
||||
model = OpenAI(model_name="gpt-3.5-turbo-instruct")
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user