From 9a39f92abae334341104b534d9830401d8c46af0 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Fri, 17 May 2024 16:45:51 -0700 Subject: [PATCH] docs: v0.2 version sidebar (#21844) ![image](https://github.com/langchain-ai/langchain/assets/9557659/189f2e04-0c08-4395-b729-f48982c6f53b) --- docs/docs/versions/{v_02 => }/overview.mdx | 0 .../versions/{v_02 => v0_2}/deprecations.mdx | 4 ++-- .../{v_02/migration.mdx => v0_2/index.mdx} | 16 ++++++++++++---- .../{v_02 => v0_2}/migrating_astream_events.mdx | 6 ++++++ docs/sidebars.js | 17 ++++++++++------- 5 files changed, 30 insertions(+), 13 deletions(-) rename docs/docs/versions/{v_02 => }/overview.mdx (100%) rename docs/docs/versions/{v_02 => v0_2}/deprecations.mdx (98%) rename docs/docs/versions/{v_02/migration.mdx => v0_2/index.mdx} (93%) rename docs/docs/versions/{v_02 => v0_2}/migrating_astream_events.mdx (96%) diff --git a/docs/docs/versions/v_02/overview.mdx b/docs/docs/versions/overview.mdx similarity index 100% rename from docs/docs/versions/v_02/overview.mdx rename to docs/docs/versions/overview.mdx diff --git a/docs/docs/versions/v_02/deprecations.mdx b/docs/docs/versions/v0_2/deprecations.mdx similarity index 98% rename from docs/docs/versions/v_02/deprecations.mdx rename to docs/docs/versions/v0_2/deprecations.mdx index 7e0fd27a69..42025f9b5e 100644 --- a/docs/docs/versions/v_02/deprecations.mdx +++ b/docs/docs/versions/v0_2/deprecations.mdx @@ -7,7 +7,7 @@ sidebar_label: Changes This code contains a list of deprecations and removals in the `langchain` and `langchain-core` packages. -New features and improvements are not listed here. See the [overview](/docs/versions/v_02/overview) for a summary of what's new in this release. +New features and improvements are not listed here. See the [overview](/docs/versions/overview/) for a summary of what's new in this release. ## Breaking changes @@ -88,7 +88,7 @@ Code that has better alternatives available and will eventually be removed, so t ### astream events V1 -If you are using `astream_events`, please review how to [migrate to astream events v2](/docs/versions/v_02/migrating_astream_events). +If you are using `astream_events`, please review how to [migrate to astream events v2](/docs/versions/v0_2/migrating_astream_events). ### langchain_core diff --git a/docs/docs/versions/v_02/migration.mdx b/docs/docs/versions/v0_2/index.mdx similarity index 93% rename from docs/docs/versions/v_02/migration.mdx rename to docs/docs/versions/v0_2/index.mdx index ecca228ef1..90d0bc7c2d 100644 --- a/docs/docs/versions/v_02/migration.mdx +++ b/docs/docs/versions/v0_2/index.mdx @@ -1,11 +1,20 @@ --- sidebar_position: 1 -sidebar_label: Migration --- -# Migration +# LangChain v0.2 + + + +LangChain v0.2 was released in May 2024. This release includes a number of [breaking changes and deprecations](/docs/versions/v0_2/deprecations). This document contains a guide on upgrading to 0.2.x. -LangChain v0.2 was released in May 2024. This release includes a number of [breaking changes and deprecations](/docs/versions/v_02/deprecations). This document contains a guide on upgrading to 0.2.x. +:::note Reference + +- [Breaking Changes & Deprecations](/docs/versions/v0_2/deprecations) + +::: + +# Migration This documentation will help you upgrade your code to LangChain `0.2.x.`. To prepare for migration, we first recommend you take the following steps: @@ -14,7 +23,6 @@ This documentation will help you upgrade your code to LangChain `0.2.x.`. To pre 3. Install a recent version of `langchain-cli` , and use the tool to replace old imports used by your code with the new imports. (See instructions below.) 4. Manually resolve any remaining deprecation warnings. 5. Re-run unit tests. -6. If you are using `astream_events`, please review how to [migrate to astream events v2](/docs/versions/v_02/migrating_astream_events). ## Upgrade to new imports diff --git a/docs/docs/versions/v_02/migrating_astream_events.mdx b/docs/docs/versions/v0_2/migrating_astream_events.mdx similarity index 96% rename from docs/docs/versions/v_02/migrating_astream_events.mdx rename to docs/docs/versions/v0_2/migrating_astream_events.mdx index b14d8c5184..730e08c286 100644 --- a/docs/docs/versions/v_02/migrating_astream_events.mdx +++ b/docs/docs/versions/v0_2/migrating_astream_events.mdx @@ -5,6 +5,12 @@ sidebar_label: astream_events v2 # Migrating to Astream Events v2 +:::danger + +This migration guide is a work in progress and is not complete. Please wait to migrate astream_events. + +::: + We've added a `v2` of the astream_events API with the release of `0.2.0`. You can see this [PR](https://github.com/langchain-ai/langchain/pull/21638) for more details. The `v2` version is a re-write of the `v1` version, and should be more efficient, with more consistent output for the events. The `v1` version of the API will be deprecated in favor of the `v2` version and will be removed in `0.4.0`. diff --git a/docs/sidebars.js b/docs/sidebars.js index 003a6f4504..8dcefdd65b 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -69,18 +69,21 @@ module.exports = { collapsed: false, collapsible: false, items: [ + "versions/overview", "versions/release_policy", "versions/packages", { type: "category", label: "v0.2", - items: [ - { - type: "autogenerated", - dirName: "versions/v_02", - } - ] - } + link: {type: 'doc', id: 'versions/v0_2/index'}, + collapsible: false, + collapsed: false, + items: [{ + type: 'autogenerated', + dirName: 'versions/v0_2', + className: 'hidden', + }], + }, ], }, "security"