Skip to content

Commit

Permalink
docs: Add langchain over time (langchain-ai#21434)
Browse files Browse the repository at this point in the history
Co-authored-by: Erick Friis <erick@langchain.dev>
  • Loading branch information
eyurtsev and efriis committed May 10, 2024
1 parent 3db85cb commit 39e9b64
Show file tree
Hide file tree
Showing 13 changed files with 498 additions and 147 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OUTPUT_NEW_DOCS_DIR = $(OUTPUT_NEW_DIR)/docs

PYTHON = .venv/bin/python

PARTNER_DEPS_LIST := $(shell ls -1 ../libs/partners | grep -vE "airbyte|ibm" | xargs -I {} echo "../libs/partners/{}" | tr '\n' ' ')
PARTNER_DEPS_LIST := $(shell find ../libs/partners -mindepth 1 -maxdepth 1 -type d -exec test -e "{}/pyproject.toml" \; -print | grep -vE "airbyte|ibm" | tr '\n' ' ')

PORT ?= 3001

Expand Down
36 changes: 0 additions & 36 deletions docs/docs/changelog/langchain.mdx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
# langchain-core

## 0.1.7 (Jan 5, 2024)

#### Deleted

No deletions.
## 0.1.x

#### Deprecated

- `BaseChatModel` methods `__call__`, `call_as_llm`, `predict`, `predict_messages`. Will be removed in 0.2.0. Use `BaseChatModel.invoke` instead.
- `BaseChatModel` methods `apredict`, `apredict_messages`. Will be removed in 0.2.0. Use `BaseChatModel.ainvoke` instead.
- `BaseLLM` methods `__call__, `predict`, `predict_messages`. Will be removed in 0.2.0. Use `BaseLLM.invoke` instead.
- `BaseLLM` methods `apredict`, `apredict_messages`. Will be removed in 0.2.0. Use `BaseLLM.ainvoke` instead.

#### Fixed

- Restrict recursive URL scraping: [#15559](https://github.com/langchain-ai/langchain/pull/15559)

#### Added

No additions.

#### Beta

- Marked `langchain_core.load.load` and `langchain_core.load.loads` as beta.
- Marked `langchain_core.beta.runnables.context.ContextGet` and `langchain_core.beta.runnables.context.ContextSet` as beta.
- `BaseLLM` methods `apredict`, `apredict_messages`. Will be removed in 0.2.0. Use `BaseLLM.ainvoke` instead.
93 changes: 93 additions & 0 deletions docs/docs/changes/changelog/langchain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# langchain

## 0.2.0

### Deleted

As of release 0.2.0, `langchain` is required to be integration-agnostic. This means that code in `langchain` should not by default instantiate any specific chat models, llms, embedding models, vectorstores etc; instead, the user will be required to specify those explicitly.

The following functions and classes require an explicit LLM to be passed as an argument:

- `langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreToolkit`
- `langchain.agents.agent_toolkits.vectorstore.toolkit.VectorStoreRouterToolkit`
- `langchain.chains.openai_functions.get_openapi_chain`
- `langchain.chains.router.MultiRetrievalQAChain.from_retrievers`
- `langchain.indexes.VectorStoreIndexWrapper.query`
- `langchain.indexes.VectorStoreIndexWrapper.query_with_sources`
- `langchain.indexes.VectorStoreIndexWrapper.aquery_with_sources`
- `langchain.chains.flare.FlareChain`

The following classes now require passing an explicit Embedding model as an argument:

- `langchain.indexes.VectostoreIndexCreator`

The following code has been removed:

- `langchain.natbot.NatBotChain.from_default` removed in favor of the `from_llm` class method.

### Deprecated

We have two main types of deprecations:

1. Code that was moved from `langchain` into another package (e.g, `langchain-community`)

If you try to import it from `langchain`, the import will keep on working, but will raise a deprecation warning. The warning will provide a replacement import statement.

```python
python -c "from langchain.document_loaders.markdown import UnstructuredMarkdownLoader"

```

```python
LangChainDeprecationWarning: Importing UnstructuredMarkdownLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:

>> from langchain.document_loaders import UnstructuredMarkdownLoader

with new imports of:

>> from langchain_community.document_loaders import UnstructuredMarkdownLoader
```

We will continue supporting the imports in `langchain` until release 0.4 as long as the relevant package where the code lives is installed. (e.g., as long as `langchain_community` is installed.)

However, we advise for users to not rely on these imports and instead migrate to the new imports. To help with this process, we’re releasing a migration script via the LangChain CLI. See further instructions in migration guide.

1. Code that has better alternatives available and will eventually be removed, so there’s only a single way to do things. (e.g., `predict_messages` method in ChatModels has been deprecated in favor of `invoke`).

Many of these were marked for removal in 0.2. We have bumped the removal to 0.3.


## 0.1.0 (Jan 5, 2024)

### Deleted

No deletions.

### Deprecated

Deprecated classes and methods will be removed in 0.2.0

| Deprecated | Alternative | Reason |
|---------------------------------|-----------------------------------|------------------------------------------------|
| ChatVectorDBChain | ConversationalRetrievalChain | More general to all retrievers |
| create_ernie_fn_chain | create_ernie_fn_runnable | Use LCEL under the hood |
| created_structured_output_chain | create_structured_output_runnable | Use LCEL under the hood |
| NatBotChain | | Not used |
| create_openai_fn_chain | create_openai_fn_runnable | Use LCEL under the hood |
| create_structured_output_chain | create_structured_output_runnable | Use LCEL under the hood |
| load_query_constructor_chain | load_query_constructor_runnable | Use LCEL under the hood |
| VectorDBQA | RetrievalQA | More general to all retrievers |
| Sequential Chain | LCEL | Obviated by LCEL |
| SimpleSequentialChain | LCEL | Obviated by LCEL |
| TransformChain | LCEL/RunnableLambda | Obviated by LCEL |
| create_tagging_chain | create_structured_output_runnable | Use LCEL under the hood |
| ChatAgent | create_react_agent | Use LCEL builder over a class |
| ConversationalAgent | create_react_agent | Use LCEL builder over a class |
| ConversationalChatAgent | create_json_chat_agent | Use LCEL builder over a class |
| initialize_agent | Individual create agent methods | Individual create agent methods are more clear |
| ZeroShotAgent | create_react_agent | Use LCEL builder over a class |
| OpenAIFunctionsAgent | create_openai_functions_agent | Use LCEL builder over a class |
| OpenAIMultiFunctionsAgent | create_openai_tools_agent | Use LCEL builder over a class |
| SelfAskWithSearchAgent | create_self_ask_with_search | Use LCEL builder over a class |
| StructuredChatAgent | create_structured_chat_agent | Use LCEL builder over a class |
| XMLAgent | create_xml_agent | Use LCEL builder over a class |
45 changes: 0 additions & 45 deletions docs/docs/langchain_over_time.mdx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@
"tags": []
},
"source": [
"# 🦜🛠️ LangSmith\n",
"\n",
"[LangSmith](https://smith.langchain.com) helps you trace and evaluate your language model applications and intelligent agents to help you\n",
"move from prototype to production.\n",
"\n",
"Check out the [interactive walkthrough](/docs/langsmith/walkthrough) to get started.\n",
"\n",
"For more information, please refer to the [LangSmith documentation](https://docs.smith.langchain.com/).\n",
"\n",
"For tutorials and other end-to-end examples demonstrating ways to integrate LangSmith in your workflow,\n",
"check out the [LangSmith Cookbook](https://github.com/langchain-ai/langsmith-cookbook). Some of the guides therein include:\n",
"\n",
"- Leveraging user feedback in your JS application ([link](https://github.com/langchain-ai/langsmith-cookbook/blob/main/feedback-examples/nextjs/README.md)).\n",
"- Building an automated feedback pipeline ([link](https://github.com/langchain-ai/langsmith-cookbook/blob/main/feedback-examples/algorithmic-feedback/algorithmic_feedback.ipynb)).\n",
"- How to evaluate and audit your RAG workflows ([link](https://github.com/langchain-ai/langsmith-cookbook/tree/main/testing-examples/qa-correctness)).\n",
"- How to fine-tune an LLM on real usage data ([link](https://github.com/langchain-ai/langsmith-cookbook/blob/main/fine-tuning-examples/export-to-openai/fine-tuning-on-chat-runs.ipynb)).\n",
"- How to use the [LangChain Hub](https://smith.langchain.com/hub) to version your prompts ([link](https://github.com/langchain-ai/langsmith-cookbook/blob/main/hub-examples/retrieval-qa-chain/retrieval-qa.ipynb))\n",
"\n",
"\n",
"# LangSmith Walkthrough\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/langsmith/walkthrough.ipynb)\n",
"\n",
Expand Down
22 changes: 0 additions & 22 deletions docs/docs/langsmith/index.md

This file was deleted.

Loading

0 comments on commit 39e9b64

Please sign in to comment.