From 8d24df410dd821c382f6431d520550d6a8639966 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Mon, 10 Jun 2024 13:35:38 -0700 Subject: [PATCH] docs[patch]: Point OpenAI LLM docs at chat models (#5718) * Point OpenAI LLM docs at chat models * Use caution * Remove deprecated package link --- .../docs/integrations/llms/azure.mdx | 6 +++++ .../docs/integrations/llms/openai.mdx | 6 +++++ .../docs/integrations/platforms/index.mdx | 1 - .../docs/integrations/platforms/microsoft.mdx | 24 +++++++++---------- .../docs/integrations/platforms/openai.mdx | 16 ++++++------- 5 files changed, 32 insertions(+), 21 deletions(-) diff --git a/docs/core_docs/docs/integrations/llms/azure.mdx b/docs/core_docs/docs/integrations/llms/azure.mdx index ccd40b94d601..36ed1b3b65ad 100644 --- a/docs/core_docs/docs/integrations/llms/azure.mdx +++ b/docs/core_docs/docs/integrations/llms/azure.mdx @@ -2,6 +2,12 @@ import CodeBlock from "@theme/CodeBlock"; # Azure OpenAI +:::caution +You are currently on a page documenting the use of Azure OpenAI [text completion models](/docs/concepts/#llms). The latest and most popular Azure OpenAI models are [chat completion models](/docs/concepts/#chat-models). + +Unless you are specifically using `gpt-3.5-turbo-instruct`, you are probably looking for [this page instead](/docs/integrations/chat/azure/). +::: + [Azure OpenAI](https://azure.microsoft.com/products/ai-services/openai-service/) is a cloud service to help you quickly develop generative AI experiences with a diverse set of prebuilt and curated models from OpenAI, Meta and beyond. LangChain.js supports integration with [Azure OpenAI](https://azure.microsoft.com/products/ai-services/openai-service/) using the new Azure integration in the [OpenAI SDK](https://github.com/openai/openai-node). diff --git a/docs/core_docs/docs/integrations/llms/openai.mdx b/docs/core_docs/docs/integrations/llms/openai.mdx index 50d53b234b5e..e8ba5cd1e8a9 100644 --- a/docs/core_docs/docs/integrations/llms/openai.mdx +++ b/docs/core_docs/docs/integrations/llms/openai.mdx @@ -1,5 +1,11 @@ # OpenAI +:::caution +You are currently on a page documenting the use of OpenAI [text completion models](/docs/concepts/#llms). The latest and most popular OpenAI models are [chat completion models](/docs/concepts/#chat-models). + +Unless you are specifically using `gpt-3.5-turbo-instruct`, you are probably looking for [this page instead](/docs/integrations/chat/openai/). +::: + Here's how you can initialize an `OpenAI` LLM instance: import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx"; diff --git a/docs/core_docs/docs/integrations/platforms/index.mdx b/docs/core_docs/docs/integrations/platforms/index.mdx index 4cbe0f02a2db..f44f4d666c8b 100644 --- a/docs/core_docs/docs/integrations/platforms/index.mdx +++ b/docs/core_docs/docs/integrations/platforms/index.mdx @@ -12,7 +12,6 @@ LangChain integrates with many providers. These providers have standalone `@langchain/{provider}` packages for improved versioning, dependency management and testing. - [Anthropic](https://www.npmjs.com/package/@langchain/anthropic) -- [Azure OpenAI](https://www.npmjs.com/package/@langchain/azure-openai) - [Cloudflare](https://www.npmjs.com/package/@langchain/cloudflare) - [Cohere](https://www.npmjs.com/package/@langchain/cohere) - [Exa](https://www.npmjs.com/package/@langchain/exa) diff --git a/docs/core_docs/docs/integrations/platforms/microsoft.mdx b/docs/core_docs/docs/integrations/platforms/microsoft.mdx index 02e32eaa4eee..be89b6e67b71 100644 --- a/docs/core_docs/docs/integrations/platforms/microsoft.mdx +++ b/docs/core_docs/docs/integrations/platforms/microsoft.mdx @@ -8,6 +8,18 @@ import CodeBlock from "@theme/CodeBlock"; All functionality related to `Microsoft Azure` and other `Microsoft` products. +## Chat Models + +### Azure OpenAI + +See a [usage example](/docs/integrations/chat/azure) + +import AzureChatOpenAI from "@examples/models/chat/integration_azure_openai.ts"; + + + +{AzureChatOpenAI} + ## LLM ### Azure OpenAI @@ -70,18 +82,6 @@ import AzureOpenAIEmbeddings from "@examples/models/embeddings/azure_openai.ts"; {AzureOpenAIEmbeddings} -## Chat Models - -### Azure OpenAI - -See a [usage example](/docs/integrations/chat/azure) - -import AzureChatOpenAI from "@examples/models/chat/integration_azure_openai.ts"; - - - -{AzureChatOpenAI} - ## Vector stores ### Azure AI Search diff --git a/docs/core_docs/docs/integrations/platforms/openai.mdx b/docs/core_docs/docs/integrations/platforms/openai.mdx index 127ad4929c9f..152e7f04b753 100644 --- a/docs/core_docs/docs/integrations/platforms/openai.mdx +++ b/docs/core_docs/docs/integrations/platforms/openai.mdx @@ -20,6 +20,14 @@ All functionality related to OpenAI - Get an OpenAI api key and set it as an environment variable (`OPENAI_API_KEY`) +## Chat model + +See a [usage example](/docs/integrations/chat/openai). + +```typescript +import { ChatOpenAI } from "@langchain/openai"; +``` + ## LLM See a [usage example](/docs/integrations/llms/openai). @@ -36,14 +44,6 @@ npm install @langchain/openai import { OpenAI } from "@langchain/openai"; ``` -## Chat model - -See a [usage example](/docs/integrations/chat/openai). - -```typescript -import { ChatOpenAI } from "@langchain/openai"; -``` - ## Text Embedding Model See a [usage example](/docs/integrations/text_embedding/openai)