mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Fix OpenAI LLM docstring (#2910)
This commit is contained in:
parent
30573b2e30
commit
634358db5e
@ -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")
|
||||
"""
|
||||
|
||||
@property
|
||||
def _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."""
|
||||
|
Loading…
Reference in New Issue
Block a user