The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Fix OpenAI LLM docstring (#2910)
dev2049634358db5e9d
diff --git a/langchain/llms/openai.py b/langchain/llms/openai.pyindex ff99ee48bf..8a54c5d370 100644--- a/langchain/llms/openai.py+++ b/langchain/llms/openai.py@@ -114,20 +114,7 @@ async def acompletion_with_retry(class BaseOpenAI(BaseLLM):- """Wrapper around 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.-- 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.-- Example:- .. code-block:: python-- from langchain.llms import OpenAI- openai = OpenAI(model_name="text-davinci-003")- """+ """Wrapper around OpenAI large language models."""client: Any #: :meta private:model_name: str = "text-davinci-003"@@ -541,7 +528,20 @@ class BaseOpenAI(BaseLLM):class OpenAI(BaseOpenAI):- """Generic OpenAI class that uses model name."""+ """Wrapper around 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.++ 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.++ Example:+ .. code-block:: python++ from langchain.llms import OpenAI+ openai = OpenAI(model_name="text-davinci-003")+ """@propertydef _invocation_params(self) -> Dict[str, Any]:@@ -549,7 +549,20 @@ class OpenAI(BaseOpenAI):class AzureOpenAI(BaseOpenAI):- """Azure specific OpenAI class that uses deployment name."""+ """Wrapper around Azure-specific 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.++ 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.++ Example:+ .. code-block:: python++ from langchain.llms import AzureOpenAI+ openai = AzureOpenAI(model_name="text-davinci-003")+ """deployment_name: str = """""Deployment name to use."""