From 3fb9cfb4ae6929dae55c92587594fa119cbcd97e Mon Sep 17 00:00:00 2001 From: Bagatur <22008038+baskaryan@users.noreply.github.com> Date: Fri, 15 Sep 2023 12:46:30 -0700 Subject: [PATCH] openai docs nit (#10656) --- docs/extras/integrations/platforms/openai.mdx | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/docs/extras/integrations/platforms/openai.mdx b/docs/extras/integrations/platforms/openai.mdx index 63463fc478..781d9e0d0a 100644 --- a/docs/extras/integrations/platforms/openai.mdx +++ b/docs/extras/integrations/platforms/openai.mdx @@ -24,6 +24,8 @@ pip install tiktoken ## LLM +See a [usage example](/docs/integrations/llms/openai). + ```python from langchain.llms import OpenAI ``` @@ -32,16 +34,31 @@ If you are using a model hosted on `Azure`, you should use different wrapper for ```python from langchain.llms import AzureOpenAI ``` -For a more detailed walkthrough of the `Azure` wrapper, see [this notebook](/docs/integrations/llms/azure_openai_example.html) +For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/llms/azure_openai_example) + + +## Chat model + +See a [usage example](/docs/integrations/chat_models/openai). + +```python +from langchain.chat_models import ChatOpenAI +``` +If you are using a model hosted on `Azure`, you should use different wrapper for that: +```python +from langchain.llms import AzureChatOpenAI +``` +For a more detailed walkthrough of the `Azure` wrapper, see [here](/docs/integrations/chat_models/azure_openai) ## Text Embedding Model +See a [usage example](/docs/integrations/text_embedding/openai) + ```python from langchain.embeddings import OpenAIEmbeddings ``` -For a more detailed walkthrough of this, see [this notebook](/docs/integrations/text_embedding/openai.html) ## Tokenizer @@ -54,15 +71,7 @@ You can also use it to count tokens when splitting documents with from langchain.text_splitter import CharacterTextSplitter CharacterTextSplitter.from_tiktoken_encoder(...) ``` -For a more detailed walkthrough of this, see [this notebook](/docs/modules/data_connection/document_transformers/text_splitters/tiktoken.html) - -## Chain - -See a [usage example](/docs/guides/safety/moderation). - -```python -from langchain.chains import OpenAIModerationChain -``` +For a more detailed walkthrough of this, see [this notebook](/docs/modules/data_connection/document_transformers/text_splitters/tiktoken) ## Document Loader @@ -79,3 +88,12 @@ See a [usage example](/docs/integrations/retrievers/chatgpt-plugin). ```python from langchain.retrievers import ChatGPTPluginRetriever ``` + +## Chain + +See a [usage example](/docs/guides/safety/moderation). + +```python +from langchain.chains import OpenAIModerationChain +``` +