mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 07:35:18 +00:00
Harrison/docs smith serve (#12898)
Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
parent
53f453f01a
commit
1a92d2245d
@ -15,7 +15,7 @@ poetry run python scripts/model_feat_table.py
|
||||
poetry run nbdoc_build --srcdir docs
|
||||
cp ../cookbook/README.md src/pages/cookbook.mdx
|
||||
cp ../.github/CONTRIBUTING.md docs/contributing.md
|
||||
wget https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/guides/deployments/langserve.md
|
||||
wget https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md
|
||||
poetry run python scripts/generate_api_reference_links.py
|
||||
yarn install
|
||||
yarn start
|
||||
|
@ -8,11 +8,31 @@ sidebar_position: 0
|
||||
- **Are context-aware**: connect a language model to sources of context (prompt instructions, few shot examples, content to ground its response in, etc.)
|
||||
- **Reason**: rely on a language model to reason (about how to answer based on provided context, what actions to take, etc.)
|
||||
|
||||
The main value props of LangChain are:
|
||||
1. **Components**: abstractions for working with language models, along with a collection of implementations for each abstraction. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
|
||||
2. **Off-the-shelf chains**: a structured assembly of components for accomplishing specific higher-level tasks
|
||||
This framework consists of several parts.
|
||||
You can see how the parts interact with each other below:
|
||||
|
||||

|
||||
|
||||
These parts include:
|
||||
|
||||
- **[LangChain Packages]**: The Python and JavaScript packages. Contains interfaces and integrations for a myriad of components, a basic run time for combining these components into chains and agents, and off-the-shelf implementations of chains and agents.
|
||||
- **[LangChain Templates](https://github.com/langchain-ai/langchain/tree/master/templates)**: A collection of easily deployable reference architectures for a wide variety of tasks.
|
||||
- **[LangServe](https://github.com/langchain-ai/langserve)**: A library for deploying LangChain chains as a REST API.
|
||||
- **[LangSmith](https://smith.langchain.com/)**: A developer platform that lets you debug, test, evaluate, and monitor chains built on any LLM framework and seamlessly integrates with LangChain.
|
||||
|
||||
Together, these products simplify the entire application lifecycle:
|
||||
- **Develop**: Write your applications in LangChain/LangChain.js. Hit the ground running using Templates for reference.
|
||||
- **Productionize**: Use LangSmith to inspect, test and monitor your chains, so that you can constantly improve and deploy with confidence.
|
||||
- **Deploy**: Turn any chain into an API with LangServe.
|
||||
|
||||
## LangChain Packages
|
||||
|
||||
The main value props of the LangChain packages are:
|
||||
1. **Components**: composable tools and integrations for working with language models. Components are modular and easy-to-use, whether you are using the rest of the LangChain framework or not
|
||||
2. **Off-the-shelf chains**: built-in assemblages of components for accomplishing higher-level tasks
|
||||
|
||||
Off-the-shelf chains make it easy to get started. Components make it easy to customize existing chains and build new ones.
|
||||
|
||||
Off-the-shelf chains make it easy to get started. For complex applications, components make it easy to customize existing chains and build new ones.
|
||||
|
||||
## Get started
|
||||
|
||||
@ -20,11 +40,9 @@ Off-the-shelf chains make it easy to get started. For complex applications, comp
|
||||
|
||||
We recommend following our [Quickstart](/docs/get_started/quickstart) guide to familiarize yourself with the framework by building your first LangChain application.
|
||||
|
||||
_**Note**: These docs are for the LangChain [Python package](https://github.com/langchain-ai/langchain). For documentation on [LangChain.js](https://github.com/langchain-ai/langchainjs), the JS/TS version, [head here](https://js.langchain.com/docs)._
|
||||
|
||||
## Modules
|
||||
|
||||
LangChain provides standard, extendable interfaces and external integrations for the following modules, listed from least to most complex:
|
||||
LangChain provides standard, extendable interfaces and integrations for the following modules, listed from least to most complex:
|
||||
|
||||
#### [Model I/O](/docs/modules/model_io/)
|
||||
Interface with language models
|
||||
@ -41,21 +59,18 @@ Log and stream intermediate steps of any chain
|
||||
|
||||
## Examples, ecosystem, and resources
|
||||
### [Use cases](/docs/use_cases/question_answering/)
|
||||
Walkthroughs and best-practices for common end-to-end use cases, like:
|
||||
Walkthroughs and techniques for common end-to-end use cases, like:
|
||||
- [Document question answering](/docs/use_cases/question_answering/)
|
||||
- [Chatbots](/docs/use_cases/chatbots/)
|
||||
- [Analyzing structured data](/docs/use_cases/qa_structured/sql/)
|
||||
- and much more...
|
||||
|
||||
### [Guides](/docs/guides/)
|
||||
Learn best practices for developing with LangChain.
|
||||
Best practices for developing with LangChain.
|
||||
|
||||
### [Ecosystem](/docs/integrations/providers/)
|
||||
LangChain is part of a rich ecosystem of tools that integrate with our framework and build on top of it. Check out our growing list of [integrations](/docs/integrations/providers/) and [dependent repos](/docs/additional_resources/dependents).
|
||||
|
||||
### [Additional resources](/docs/additional_resources/)
|
||||
Our community is full of prolific developers, creative builders, and fantastic teachers. Check out [YouTube tutorials](/docs/additional_resources/youtube) for great tutorials from folks in the community, and [Gallery](https://github.com/kyrolabs/awesome-langchain) for a list of awesome LangChain projects, compiled by the folks at [KyroLabs](https://kyrolabs.com).
|
||||
|
||||
### [Community](/docs/community)
|
||||
Head to the [Community navigator](/docs/community) to find places to ask questions, share feedback, meet other developers, and dream about the future of LLM’s.
|
||||
|
||||
|
@ -44,6 +44,19 @@ from langchain.llms import OpenAI
|
||||
llm = OpenAI(openai_api_key="...")
|
||||
```
|
||||
|
||||
## LangSmith Setup
|
||||
|
||||
Many of the applications you build with LangChain will contain multiple steps with multiple invocations of LLM calls.
|
||||
As these applications get more and more complex, it becomes crucial to be able to inspect what exactly is going on inside your chain or agent.
|
||||
The best way to do this is with [LangSmith](smith.langchain.com).
|
||||
|
||||
Note that LangSmith is not needed, but it is helpful.
|
||||
If you do want to use LangSmith, after you sign up at the link above, make sure to set your environment variables to start logging traces:
|
||||
|
||||
```shell
|
||||
export LANGCHAIN_TRACING_V2="true"
|
||||
export LANGCHAIN_API_KEY=...
|
||||
```
|
||||
|
||||
## Building an application
|
||||
|
||||
|
Before Width: | Height: | Size: 766 KiB After Width: | Height: | Size: 766 KiB |
Before Width: | Height: | Size: 815 KiB After Width: | Height: | Size: 815 KiB |
@ -1,11 +1,13 @@
|
||||
# LangSmith
|
||||
---
|
||||
sidebar_class_name: hidden
|
||||
---
|
||||
|
||||
import DocCardList from "@theme/DocCardList";
|
||||
# LangSmith
|
||||
|
||||
[LangSmith](https://smith.langchain.com) helps you trace and evaluate your language model applications and intelligent agents to help you
|
||||
move from prototype to production.
|
||||
|
||||
Check out the [interactive walkthrough](/docs/guides/langsmith/walkthrough) below to get started.
|
||||
Check out the [interactive walkthrough](/docs/guides/langsmith/walkthrough) to get started.
|
||||
|
||||
For more information, please refer to the [LangSmith documentation](https://docs.smith.langchain.com/).
|
||||
|
||||
@ -18,5 +20,3 @@ check out the [LangSmith Cookbook](https://github.com/langchain-ai/langsmith-coo
|
||||
- How to fine-tune a 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)).
|
||||
- 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))
|
||||
|
||||
|
||||
<DocCardList />
|
@ -7,7 +7,7 @@
|
||||
"tags": []
|
||||
},
|
||||
"source": [
|
||||
"# LangSmith Walkthrough\n",
|
||||
"# Walkthrough\n",
|
||||
"[](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/guides/langsmith/walkthrough.ipynb)\n",
|
||||
"\n",
|
||||
"LangChain makes it easy to prototype LLM applications and Agents. However, delivering LLM applications to production can be deceptively difficult. You will likely have to heavily customize and iterate on your prompts, chains, and other components to create a high-quality product.\n",
|
||||
@ -790,7 +790,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.2"
|
||||
"version": "3.9.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
@ -159,6 +159,12 @@ const config = {
|
||||
sidebarId: "integrations",
|
||||
label: "Integrations",
|
||||
},
|
||||
{
|
||||
type: "docSidebar",
|
||||
position: "left",
|
||||
sidebarId: "guides",
|
||||
label: "Guides",
|
||||
},
|
||||
{
|
||||
href: "https://api.python.langchain.com",
|
||||
label: "API",
|
||||
@ -192,30 +198,31 @@ const config = {
|
||||
{ label: "Gallery", href: "https://github.com/kyrolabs/awesome-langchain" }
|
||||
]
|
||||
},
|
||||
{
|
||||
href: "https://chat.langchain.com",
|
||||
label: "Chat our docs",
|
||||
position: "right",
|
||||
},
|
||||
{
|
||||
type: "dropdown",
|
||||
label: "Also by LangChain",
|
||||
position: "right",
|
||||
items: [
|
||||
{
|
||||
href: "https://chat.langchain.com",
|
||||
label: "Chat our docs",
|
||||
},
|
||||
{
|
||||
href: "https://smith.langchain.com",
|
||||
label: "LangSmith",
|
||||
},
|
||||
{
|
||||
href: "https://github.com/langchain-ai/langserve",
|
||||
label: "LangServe GitHub",
|
||||
},
|
||||
{
|
||||
href: "https://smith.langchain.com/hub",
|
||||
label: "LangChain Hub",
|
||||
},
|
||||
{
|
||||
href: "https://github.com/langchain-ai/langserve",
|
||||
label: "LangServe",
|
||||
},
|
||||
{
|
||||
href: "https://js.langchain.com/docs",
|
||||
label: "JS/TS",
|
||||
href: "https://js.langchain.com",
|
||||
label: "JS/TS Docs",
|
||||
},
|
||||
]
|
||||
},
|
||||
|
@ -26,7 +26,7 @@ module.exports = {
|
||||
label: "Get started",
|
||||
collapsed: false,
|
||||
collapsible: false,
|
||||
items: [{ type: "autogenerated", dirName: "get_started" }],
|
||||
items: [{ type: "autogenerated", dirName: "get_started" }, "security"],
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
description: 'Get started with LangChain',
|
||||
@ -46,29 +46,24 @@ module.exports = {
|
||||
{
|
||||
type: "category",
|
||||
label: "Modules",
|
||||
collapsed: false,
|
||||
collapsed: true,
|
||||
items: [{ type: "autogenerated", dirName: "modules" } ],
|
||||
link: {
|
||||
type: 'doc',
|
||||
id: "modules/index"
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
label: "Security",
|
||||
id: "security",
|
||||
},
|
||||
{type: "doc", id: "langserve", label: "LangServe"},
|
||||
{
|
||||
type: "category",
|
||||
label: "Guides",
|
||||
label: "LangSmith",
|
||||
collapsed: true,
|
||||
items: [{ type: "autogenerated", dirName: "guides" }],
|
||||
items: [{ type: "autogenerated", dirName: "langsmith" } ],
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
description: 'Design guides for key parts of the development process',
|
||||
slug: "guides",
|
||||
type: 'doc',
|
||||
id: "langsmith/index"
|
||||
},
|
||||
}
|
||||
},
|
||||
],
|
||||
integrations: [
|
||||
{
|
||||
@ -111,4 +106,7 @@ module.exports = {
|
||||
use_cases: [
|
||||
{type: "autogenerated", dirName: "use_cases" }
|
||||
],
|
||||
guides: [
|
||||
{type: "autogenerated", dirName: "guides" }
|
||||
],
|
||||
};
|
||||
|
BIN
docs/static/img/langchain_stack.jpg
vendored
Normal file
BIN
docs/static/img/langchain_stack.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 914 KiB |
@ -50,5 +50,5 @@ python3.11 scripts/model_feat_table.py
|
||||
nbdoc_build --srcdir docs
|
||||
cp ../cookbook/README.md src/pages/cookbook.mdx
|
||||
cp ../.github/CONTRIBUTING.md docs/contributing.md
|
||||
wget https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/guides/deployments/langserve.md
|
||||
wget https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O docs/langserve.md
|
||||
python3.11 scripts/generate_api_reference_links.py
|
||||
|
Loading…
Reference in New Issue
Block a user