langchain 1.0.0a14__py3-none-any.whl → 1.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langchain might be problematic. Click here for more details.
- langchain/__init__.py +1 -1
- langchain/agents/__init__.py +7 -1
- langchain/agents/factory.py +74 -49
- langchain/agents/middleware/__init__.py +15 -6
- langchain/agents/middleware/context_editing.py +30 -2
- langchain/agents/middleware/human_in_the_loop.py +24 -20
- langchain/agents/middleware/model_call_limit.py +42 -9
- langchain/agents/middleware/model_fallback.py +36 -3
- langchain/agents/middleware/pii.py +7 -7
- langchain/agents/middleware/{planning.py → todo.py} +18 -5
- langchain/agents/middleware/tool_call_limit.py +89 -16
- langchain/agents/middleware/tool_emulator.py +2 -2
- langchain/agents/middleware/tool_retry.py +384 -0
- langchain/agents/middleware/types.py +111 -63
- langchain/agents/structured_output.py +29 -25
- langchain/chat_models/__init__.py +7 -1
- langchain/chat_models/base.py +98 -108
- langchain/embeddings/__init__.py +7 -1
- langchain/embeddings/base.py +1 -1
- langchain/messages/__init__.py +10 -1
- langchain/tools/__init__.py +9 -3
- langchain/tools/tool_node.py +288 -94
- langchain-1.0.0rc1.dist-info/METADATA +85 -0
- langchain-1.0.0rc1.dist-info/RECORD +30 -0
- langchain/agents/middleware/prompt_caching.py +0 -89
- langchain-1.0.0a14.dist-info/METADATA +0 -125
- langchain-1.0.0a14.dist-info/RECORD +0 -30
- {langchain-1.0.0a14.dist-info → langchain-1.0.0rc1.dist-info}/WHEEL +0 -0
- {langchain-1.0.0a14.dist-info → langchain-1.0.0rc1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: langchain
|
|
3
|
+
Version: 1.0.0rc1
|
|
4
|
+
Summary: Building applications with LLMs through composability
|
|
5
|
+
Project-URL: homepage, https://docs.langchain.com/
|
|
6
|
+
Project-URL: repository, https://github.com/langchain-ai/langchain/tree/master/libs/langchain
|
|
7
|
+
Project-URL: changelog, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D1%22
|
|
8
|
+
Project-URL: twitter, https://x.com/LangChainAI
|
|
9
|
+
Project-URL: slack, https://www.langchain.com/join-community
|
|
10
|
+
Project-URL: reddit, https://www.reddit.com/r/LangChain/
|
|
11
|
+
License: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Python: <4.0.0,>=3.10.0
|
|
14
|
+
Requires-Dist: langchain-core<2.0.0,>=1.0.0a7
|
|
15
|
+
Requires-Dist: langgraph<2.0.0,>=1.0.0a4
|
|
16
|
+
Requires-Dist: pydantic<3.0.0,>=2.7.4
|
|
17
|
+
Provides-Extra: anthropic
|
|
18
|
+
Requires-Dist: langchain-anthropic; extra == 'anthropic'
|
|
19
|
+
Provides-Extra: aws
|
|
20
|
+
Requires-Dist: langchain-aws; extra == 'aws'
|
|
21
|
+
Provides-Extra: community
|
|
22
|
+
Requires-Dist: langchain-community; extra == 'community'
|
|
23
|
+
Provides-Extra: deepseek
|
|
24
|
+
Requires-Dist: langchain-deepseek; extra == 'deepseek'
|
|
25
|
+
Provides-Extra: fireworks
|
|
26
|
+
Requires-Dist: langchain-fireworks; extra == 'fireworks'
|
|
27
|
+
Provides-Extra: google-genai
|
|
28
|
+
Requires-Dist: langchain-google-genai; extra == 'google-genai'
|
|
29
|
+
Provides-Extra: google-vertexai
|
|
30
|
+
Requires-Dist: langchain-google-vertexai; extra == 'google-vertexai'
|
|
31
|
+
Provides-Extra: groq
|
|
32
|
+
Requires-Dist: langchain-groq; extra == 'groq'
|
|
33
|
+
Provides-Extra: mistralai
|
|
34
|
+
Requires-Dist: langchain-mistralai; extra == 'mistralai'
|
|
35
|
+
Provides-Extra: ollama
|
|
36
|
+
Requires-Dist: langchain-ollama; extra == 'ollama'
|
|
37
|
+
Provides-Extra: openai
|
|
38
|
+
Requires-Dist: langchain-openai; extra == 'openai'
|
|
39
|
+
Provides-Extra: perplexity
|
|
40
|
+
Requires-Dist: langchain-perplexity; extra == 'perplexity'
|
|
41
|
+
Provides-Extra: together
|
|
42
|
+
Requires-Dist: langchain-together; extra == 'together'
|
|
43
|
+
Provides-Extra: xai
|
|
44
|
+
Requires-Dist: langchain-xai; extra == 'xai'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# 🦜️🔗 LangChain
|
|
48
|
+
|
|
49
|
+
[](https://pypi.org/project/langchain/#history)
|
|
50
|
+
[](https://opensource.org/licenses/MIT)
|
|
51
|
+
[](https://pypistats.org/packages/langchain)
|
|
52
|
+
[](https://twitter.com/langchainai)
|
|
53
|
+
|
|
54
|
+
Looking for the JS/TS version? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).
|
|
55
|
+
|
|
56
|
+
To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
|
|
57
|
+
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
|
|
58
|
+
|
|
59
|
+
## Quick Install
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install langchain
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 🤔 What is this?
|
|
66
|
+
|
|
67
|
+
LangChain is the easiest way to start building agents and applications powered by LLMs. With under 10 lines of code, you can connect to OpenAI, Anthropic, Google, and [more](https://docs.langchain.com/oss/python/integrations/providers/overview). LangChain provides a pre-built agent architecture and model integrations to help you get started quickly and seamlessly incorporate LLMs into your agents and applications.
|
|
68
|
+
|
|
69
|
+
We recommend you use LangChain if you want to quickly build agents and autonomous applications. Use [LangGraph](https://docs.langchain.com/oss/python/langgraph/overview), our low-level agent orchestration framework and runtime, when you have more advanced needs that require a combination of deterministic and agentic workflows, heavy customization, and carefully controlled latency.
|
|
70
|
+
|
|
71
|
+
LangChain [agents](https://docs.langchain.com/oss/python/langchain/agents) are built on top of LangGraph in order to provide durable execution, streaming, human-in-the-loop, persistence, and more. (You do not need to know LangGraph for basic LangChain agent usage.)
|
|
72
|
+
|
|
73
|
+
## 📖 Documentation
|
|
74
|
+
|
|
75
|
+
For full documentation, see the [API reference](https://reference.langchain.com/python/langchain_classic).
|
|
76
|
+
|
|
77
|
+
## 📕 Releases & Versioning
|
|
78
|
+
|
|
79
|
+
See our [Releases](https://docs.langchain.com/oss/python/release-policy) and [Versioning](https://docs.langchain.com/oss/python/versioning) policies.
|
|
80
|
+
|
|
81
|
+
## 💁 Contributing
|
|
82
|
+
|
|
83
|
+
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
|
84
|
+
|
|
85
|
+
For detailed information on how to contribute, see the [Contributing Guide](https://docs.langchain.com/oss/python/contributing/overview).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
langchain/__init__.py,sha256=P-ltxKbHEHDxRxjxiCkHmWeDHiI9-Bgd6sjEJ8c0TcY,64
|
|
2
|
+
langchain/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
langchain/agents/__init__.py,sha256=tDjbhFSC6XHQUZ_XvjHwmbICFfjxmE9xKFMbUVSIwfs,522
|
|
4
|
+
langchain/agents/factory.py,sha256=dEfeSNBZ2NCp0E64mHgxNseNASfMdHd-7i2JhPbWv_c,62606
|
|
5
|
+
langchain/agents/structured_output.py,sha256=BDSF6PWVih41M7IGyjCHWy46jmDxZsfBt_B4llE9OOc,13764
|
|
6
|
+
langchain/agents/middleware/__init__.py,sha256=FBoTr4TAyuLJiOKV-mJN3oaLE6D6Q5ubI5sCbnsCCSs,1955
|
|
7
|
+
langchain/agents/middleware/context_editing.py,sha256=0sUpDc0FvOKMERNnEKnhBqrTjX_rCVWjIX8hH3RTG8U,8749
|
|
8
|
+
langchain/agents/middleware/human_in_the_loop.py,sha256=N7Vt31rlHS7J-cA0EBDS2mlQW-SMvvxyAwjBnAY9vZU,12650
|
|
9
|
+
langchain/agents/middleware/model_call_limit.py,sha256=yYBcOY5DKNIG6_9f-rkTjIj_BLVUO1tuShgxt00P8W0,7735
|
|
10
|
+
langchain/agents/middleware/model_fallback.py,sha256=VKDN81jfFB9zJOaJZ94tfwzodk3zRXRwz6CqQ6MkJtw,4097
|
|
11
|
+
langchain/agents/middleware/pii.py,sha256=rkGojBFIJGMs1p1cKNh0npafts_0UUJ0_NeZsyJo498,24760
|
|
12
|
+
langchain/agents/middleware/summarization.py,sha256=H1VxRkkbauw4p4sMMKyc_uZGbJhtqoVvOF7y_5JBXTc,10329
|
|
13
|
+
langchain/agents/middleware/todo.py,sha256=0PyHV4u5JaBBuMmPWmDr3orZ5T5F6lk2jiVoBzVVMM4,9808
|
|
14
|
+
langchain/agents/middleware/tool_call_limit.py,sha256=AHA-No4oUze2-2d1INnX8d_9otFuDB8uoWayJpt9nPo,12321
|
|
15
|
+
langchain/agents/middleware/tool_emulator.py,sha256=UmN5UIMsikDnFvcPbNLNDOF4RXvIxqd-AMG46LVI0iA,7211
|
|
16
|
+
langchain/agents/middleware/tool_retry.py,sha256=M76csBFFZa37djxtfUCqNU-x2erTNtxZqoO__DozWxA,13787
|
|
17
|
+
langchain/agents/middleware/tool_selection.py,sha256=6RYdgkg6aSNx1w-YxRyL2Hct7UPnMRgGg6YVZVtW5TU,11638
|
|
18
|
+
langchain/agents/middleware/types.py,sha256=FVuYue9cLB5C1ZNcYLIGNPN6IUaNXY3UsWQ6gC-gZNs,55547
|
|
19
|
+
langchain/chat_models/__init__.py,sha256=lQwcJkHtGjrclCL7sBFocQuzRdRgZRPzIIPnGhEJmVQ,533
|
|
20
|
+
langchain/chat_models/base.py,sha256=k1Qnuh7O_3LwsWtcVFSWsWP00hxiEyninwltTdi1rk8,35655
|
|
21
|
+
langchain/embeddings/__init__.py,sha256=crY7GUw7RSA25JgpYl7I4WPloVCVY6eUmJbSSSchWis,444
|
|
22
|
+
langchain/embeddings/base.py,sha256=1aNxDLQmS_l7RMcvjnK7Cv7rtgKrKt6Sl7mgXM2_JWI,7329
|
|
23
|
+
langchain/messages/__init__.py,sha256=p7NlF1yf8MkMgJzJ2wggXGkkA_okz1f-g63KoflL6PA,1710
|
|
24
|
+
langchain/rate_limiters/__init__.py,sha256=5490xUNhet37N2nX6kbJlDgf8u1DX-C1Cs_r7etXn8A,351
|
|
25
|
+
langchain/tools/__init__.py,sha256=hMzbaGcfHhNYfJx20uV57uMd9a-gNLbmopG4gDReeEc,628
|
|
26
|
+
langchain/tools/tool_node.py,sha256=wsYXehwtaCIWYOSv4ncV23WQ7-N34sEwckcYfaFoLFg,64977
|
|
27
|
+
langchain-1.0.0rc1.dist-info/METADATA,sha256=niUo9gSSaOCiH5kFM9cYfd0m1G06cdfifywnk0G_Mqk,4543
|
|
28
|
+
langchain-1.0.0rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
29
|
+
langchain-1.0.0rc1.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
|
|
30
|
+
langchain-1.0.0rc1.dist-info/RECORD,,
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"""Anthropic prompt caching middleware."""
|
|
2
|
-
|
|
3
|
-
from collections.abc import Callable
|
|
4
|
-
from typing import Literal
|
|
5
|
-
from warnings import warn
|
|
6
|
-
|
|
7
|
-
from langchain.agents.middleware.types import (
|
|
8
|
-
AgentMiddleware,
|
|
9
|
-
ModelCallResult,
|
|
10
|
-
ModelRequest,
|
|
11
|
-
ModelResponse,
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class AnthropicPromptCachingMiddleware(AgentMiddleware):
|
|
16
|
-
"""Prompt Caching Middleware.
|
|
17
|
-
|
|
18
|
-
Optimizes API usage by caching conversation prefixes for Anthropic models.
|
|
19
|
-
|
|
20
|
-
Learn more about Anthropic prompt caching
|
|
21
|
-
[here](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching).
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
def __init__(
|
|
25
|
-
self,
|
|
26
|
-
type: Literal["ephemeral"] = "ephemeral",
|
|
27
|
-
ttl: Literal["5m", "1h"] = "5m",
|
|
28
|
-
min_messages_to_cache: int = 0,
|
|
29
|
-
unsupported_model_behavior: Literal["ignore", "warn", "raise"] = "warn",
|
|
30
|
-
) -> None:
|
|
31
|
-
"""Initialize the middleware with cache control settings.
|
|
32
|
-
|
|
33
|
-
Args:
|
|
34
|
-
type: The type of cache to use, only "ephemeral" is supported.
|
|
35
|
-
ttl: The time to live for the cache, only "5m" and "1h" are supported.
|
|
36
|
-
min_messages_to_cache: The minimum number of messages until the cache is used,
|
|
37
|
-
default is 0.
|
|
38
|
-
unsupported_model_behavior: The behavior to take when an unsupported model is used.
|
|
39
|
-
"ignore" will ignore the unsupported model and continue without caching.
|
|
40
|
-
"warn" will warn the user and continue without caching.
|
|
41
|
-
"raise" will raise an error and stop the agent.
|
|
42
|
-
"""
|
|
43
|
-
self.type = type
|
|
44
|
-
self.ttl = ttl
|
|
45
|
-
self.min_messages_to_cache = min_messages_to_cache
|
|
46
|
-
self.unsupported_model_behavior = unsupported_model_behavior
|
|
47
|
-
|
|
48
|
-
def wrap_model_call(
|
|
49
|
-
self,
|
|
50
|
-
request: ModelRequest,
|
|
51
|
-
handler: Callable[[ModelRequest], ModelResponse],
|
|
52
|
-
) -> ModelCallResult:
|
|
53
|
-
"""Modify the model request to add cache control blocks."""
|
|
54
|
-
try:
|
|
55
|
-
from langchain_anthropic import ChatAnthropic
|
|
56
|
-
except ImportError:
|
|
57
|
-
ChatAnthropic = None # noqa: N806
|
|
58
|
-
|
|
59
|
-
msg: str | None = None
|
|
60
|
-
|
|
61
|
-
if ChatAnthropic is None:
|
|
62
|
-
msg = (
|
|
63
|
-
"AnthropicPromptCachingMiddleware caching middleware only supports "
|
|
64
|
-
"Anthropic models. "
|
|
65
|
-
"Please install langchain-anthropic."
|
|
66
|
-
)
|
|
67
|
-
elif not isinstance(request.model, ChatAnthropic):
|
|
68
|
-
msg = (
|
|
69
|
-
"AnthropicPromptCachingMiddleware caching middleware only supports "
|
|
70
|
-
f"Anthropic models, not instances of {type(request.model)}"
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
if msg is not None:
|
|
74
|
-
if self.unsupported_model_behavior == "raise":
|
|
75
|
-
raise ValueError(msg)
|
|
76
|
-
if self.unsupported_model_behavior == "warn":
|
|
77
|
-
warn(msg, stacklevel=3)
|
|
78
|
-
else:
|
|
79
|
-
return handler(request)
|
|
80
|
-
|
|
81
|
-
messages_count = (
|
|
82
|
-
len(request.messages) + 1 if request.system_prompt else len(request.messages)
|
|
83
|
-
)
|
|
84
|
-
if messages_count < self.min_messages_to_cache:
|
|
85
|
-
return handler(request)
|
|
86
|
-
|
|
87
|
-
request.model_settings["cache_control"] = {"type": self.type, "ttl": self.ttl}
|
|
88
|
-
|
|
89
|
-
return handler(request)
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: langchain
|
|
3
|
-
Version: 1.0.0a14
|
|
4
|
-
Summary: Building applications with LLMs through composability
|
|
5
|
-
Project-URL: homepage, https://docs.langchain.com/
|
|
6
|
-
Project-URL: repository, https://github.com/langchain-ai/langchain/tree/master/libs/langchain
|
|
7
|
-
Project-URL: changelog, https://github.com/langchain-ai/langchain/releases?q=tag%3A%22langchain%3D%3D1%22
|
|
8
|
-
Project-URL: twitter, https://x.com/LangChainAI
|
|
9
|
-
Project-URL: slack, https://www.langchain.com/join-community
|
|
10
|
-
Project-URL: reddit, https://www.reddit.com/r/LangChain/
|
|
11
|
-
License: MIT
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Requires-Python: <4.0.0,>=3.10.0
|
|
14
|
-
Requires-Dist: langchain-core<2.0.0,>=1.0.0a7
|
|
15
|
-
Requires-Dist: langgraph<2.0.0,>=1.0.0a4
|
|
16
|
-
Requires-Dist: pydantic<3.0.0,>=2.7.4
|
|
17
|
-
Provides-Extra: anthropic
|
|
18
|
-
Requires-Dist: langchain-anthropic; extra == 'anthropic'
|
|
19
|
-
Provides-Extra: aws
|
|
20
|
-
Requires-Dist: langchain-aws; extra == 'aws'
|
|
21
|
-
Provides-Extra: community
|
|
22
|
-
Requires-Dist: langchain-community; extra == 'community'
|
|
23
|
-
Provides-Extra: deepseek
|
|
24
|
-
Requires-Dist: langchain-deepseek; extra == 'deepseek'
|
|
25
|
-
Provides-Extra: fireworks
|
|
26
|
-
Requires-Dist: langchain-fireworks; extra == 'fireworks'
|
|
27
|
-
Provides-Extra: google-genai
|
|
28
|
-
Requires-Dist: langchain-google-genai; extra == 'google-genai'
|
|
29
|
-
Provides-Extra: google-vertexai
|
|
30
|
-
Requires-Dist: langchain-google-vertexai; extra == 'google-vertexai'
|
|
31
|
-
Provides-Extra: groq
|
|
32
|
-
Requires-Dist: langchain-groq; extra == 'groq'
|
|
33
|
-
Provides-Extra: mistralai
|
|
34
|
-
Requires-Dist: langchain-mistralai; extra == 'mistralai'
|
|
35
|
-
Provides-Extra: ollama
|
|
36
|
-
Requires-Dist: langchain-ollama; extra == 'ollama'
|
|
37
|
-
Provides-Extra: openai
|
|
38
|
-
Requires-Dist: langchain-openai; extra == 'openai'
|
|
39
|
-
Provides-Extra: perplexity
|
|
40
|
-
Requires-Dist: langchain-perplexity; extra == 'perplexity'
|
|
41
|
-
Provides-Extra: together
|
|
42
|
-
Requires-Dist: langchain-together; extra == 'together'
|
|
43
|
-
Provides-Extra: xai
|
|
44
|
-
Requires-Dist: langchain-xai; extra == 'xai'
|
|
45
|
-
Description-Content-Type: text/markdown
|
|
46
|
-
|
|
47
|
-
# 🦜️🔗 LangChain
|
|
48
|
-
|
|
49
|
-
⚡ Building applications with LLMs through composability ⚡
|
|
50
|
-
|
|
51
|
-
[](https://opensource.org/licenses/MIT)
|
|
52
|
-
[](https://pypistats.org/packages/langchain)
|
|
53
|
-
[](https://twitter.com/langchainai)
|
|
54
|
-
|
|
55
|
-
Looking for the JS/TS version? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).
|
|
56
|
-
|
|
57
|
-
To help you ship LangChain apps to production faster, check out [LangSmith](https://smith.langchain.com).
|
|
58
|
-
[LangSmith](https://smith.langchain.com) is a unified developer platform for building, testing, and monitoring LLM applications.
|
|
59
|
-
|
|
60
|
-
## Quick Install
|
|
61
|
-
|
|
62
|
-
`pip install langchain`
|
|
63
|
-
|
|
64
|
-
## 🤔 What is this?
|
|
65
|
-
|
|
66
|
-
Large language models (LLMs) are emerging as a transformative technology, enabling developers to build applications that they previously could not. However, using these LLMs in isolation is often insufficient for creating a truly powerful app - the real power comes when you can combine them with other sources of computation or knowledge.
|
|
67
|
-
|
|
68
|
-
This library aims to assist in the development of those types of applications. Common examples of these applications include:
|
|
69
|
-
|
|
70
|
-
**❓ Question answering with RAG**
|
|
71
|
-
|
|
72
|
-
- [Documentation](https://python.langchain.com/docs/tutorials/rag/)
|
|
73
|
-
- End-to-end Example: [Chat LangChain](https://chat.langchain.com) and [repo](https://github.com/langchain-ai/chat-langchain)
|
|
74
|
-
|
|
75
|
-
**🧱 Extracting structured output**
|
|
76
|
-
|
|
77
|
-
- [Documentation](https://python.langchain.com/docs/tutorials/extraction/)
|
|
78
|
-
- End-to-end Example: [SQL Llama2 Template](https://github.com/langchain-ai/langchain-extract/)
|
|
79
|
-
|
|
80
|
-
**🤖 Chatbots**
|
|
81
|
-
|
|
82
|
-
- [Documentation](https://python.langchain.com/docs/tutorials/chatbot/)
|
|
83
|
-
- End-to-end Example: [Web LangChain (web researcher chatbot)](https://weblangchain.vercel.app) and [repo](https://github.com/langchain-ai/weblangchain)
|
|
84
|
-
|
|
85
|
-
## 📖 Documentation
|
|
86
|
-
|
|
87
|
-
Please see [our full documentation](https://python.langchain.com) on:
|
|
88
|
-
|
|
89
|
-
- Getting started (installation, setting up the environment, simple examples)
|
|
90
|
-
- How-To examples (demos, integrations, helper functions)
|
|
91
|
-
- Reference (full API docs)
|
|
92
|
-
- Resources (high-level explanation of core concepts)
|
|
93
|
-
|
|
94
|
-
## 🚀 What can this help with?
|
|
95
|
-
|
|
96
|
-
There are five main areas that LangChain is designed to help with.
|
|
97
|
-
These are, in increasing order of complexity:
|
|
98
|
-
|
|
99
|
-
**🤖 Agents:**
|
|
100
|
-
|
|
101
|
-
Agents involve an LLM making decisions about which Actions to take, taking that Action, seeing an Observation, and repeating that until done. LangChain provides a standard interface for agents, a selection of agents to choose from, and examples of end-to-end agents.
|
|
102
|
-
|
|
103
|
-
**📚 Retrieval Augmented Generation:**
|
|
104
|
-
|
|
105
|
-
Retrieval Augmented Generation involves specific types of chains that first interact with an external data source to fetch data for use in the generation step. Examples include summarization of long pieces of text and question/answering over specific data sources.
|
|
106
|
-
|
|
107
|
-
**🧐 Evaluation:**
|
|
108
|
-
|
|
109
|
-
Generative models are notoriously hard to evaluate with traditional metrics. One new way of evaluating them is using language models themselves to do the evaluation. LangChain provides some prompts/chains for assisting in this.
|
|
110
|
-
|
|
111
|
-
**📃 Models and Prompts:**
|
|
112
|
-
|
|
113
|
-
This includes prompt management, prompt optimization, a generic interface for all LLMs, and common utilities for working with chat models and LLMs.
|
|
114
|
-
|
|
115
|
-
**🔗 Chains:**
|
|
116
|
-
|
|
117
|
-
Chains go beyond a single LLM call and involve sequences of calls (whether to an LLM or a different utility). LangChain provides a standard interface for chains, lots of integrations with other tools, and end-to-end chains for common applications.
|
|
118
|
-
|
|
119
|
-
For more information on these concepts, please see our [full documentation](https://python.langchain.com).
|
|
120
|
-
|
|
121
|
-
## 💁 Contributing
|
|
122
|
-
|
|
123
|
-
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
|
|
124
|
-
|
|
125
|
-
For detailed information on how to contribute, see the [Contributing Guide](https://python.langchain.com/docs/contributing/).
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
langchain/__init__.py,sha256=rED92FbyWFRmks07cFlRTuz5ZtaPKxYq6BcsxW5KhrE,64
|
|
2
|
-
langchain/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
langchain/agents/__init__.py,sha256=x85V7MqddVSrraoirGHplPMzEz9Lha-vL9fKjXCS7lA,258
|
|
4
|
-
langchain/agents/factory.py,sha256=e6xjbw_qTFvfP-AHXZtykXGrX-2GoX6hFaW_97WHiEw,61245
|
|
5
|
-
langchain/agents/structured_output.py,sha256=msf-ClqDnMfJ-oGHqjwEyth860tMnx58GLTvqJijqg8,13686
|
|
6
|
-
langchain/agents/middleware/__init__.py,sha256=FDwjEGYtxPgyFa9iiLAWT5M2W8c-NDYfGz6_y8cEqPI,1568
|
|
7
|
-
langchain/agents/middleware/context_editing.py,sha256=6ca6Qed-F59JD1rAlrIuxlrBbDVIKQmCpfvZaIFbBy8,7691
|
|
8
|
-
langchain/agents/middleware/human_in_the_loop.py,sha256=Bs4_Hgjuy9l0-AMUHvU9wlr_rL2Z1rUwL_VcfFLhhUM,12666
|
|
9
|
-
langchain/agents/middleware/model_call_limit.py,sha256=H3lJL2cLv3u0uF0kJsRagFt1rBmHHgn5SFsfnmcyQdA,6703
|
|
10
|
-
langchain/agents/middleware/model_fallback.py,sha256=pdKRSO9JD6MdMYHFl7IK4yj6LEwQfyzfTJiBE8uJ2pE,3118
|
|
11
|
-
langchain/agents/middleware/pii.py,sha256=7hTBxnpcG_hSZd29TCg-4tbiLFO9IJb-wwnujCRMrv4,24780
|
|
12
|
-
langchain/agents/middleware/planning.py,sha256=59Q6-4aALytjssIZ5a4hZkx5THxIG-RTeUHuDP1LGDA,9319
|
|
13
|
-
langchain/agents/middleware/prompt_caching.py,sha256=cMvIJ_dpSsn4_cqCvZBBKjtw5GpcVkc8Lgf_VEPzM1w,3225
|
|
14
|
-
langchain/agents/middleware/summarization.py,sha256=H1VxRkkbauw4p4sMMKyc_uZGbJhtqoVvOF7y_5JBXTc,10329
|
|
15
|
-
langchain/agents/middleware/tool_call_limit.py,sha256=6cWviwPRzaf7UUcp9zlXwk6RJBBoWVaVSBc1NaVT2fI,9729
|
|
16
|
-
langchain/agents/middleware/tool_emulator.py,sha256=5qJFPfTSiVukNclDeUo7_c7-PjGEVWyefbPC-zpYSlI,7115
|
|
17
|
-
langchain/agents/middleware/tool_selection.py,sha256=6RYdgkg6aSNx1w-YxRyL2Hct7UPnMRgGg6YVZVtW5TU,11638
|
|
18
|
-
langchain/agents/middleware/types.py,sha256=JqTdwFru-nqs8RlamYPqEM0cnak9WBPEp__dtsve3g4,53868
|
|
19
|
-
langchain/chat_models/__init__.py,sha256=PTq9qskQEbqXYAcUUxUXDsugOcwISgFhv4w40JgkbgU,181
|
|
20
|
-
langchain/chat_models/base.py,sha256=HPlD0QaLOGXRJAY1Qq6ojr1WcteBlgVO--_GoSqpxXE,34560
|
|
21
|
-
langchain/embeddings/__init__.py,sha256=kfLfu342i9bTrA0WC8yA6IJE2bgY4ZynWBi-_cMUg8E,179
|
|
22
|
-
langchain/embeddings/base.py,sha256=o77Z1TrXoUZN1SdYY9nZCNehm7cZzC-TNqc5NIzWtww,7327
|
|
23
|
-
langchain/messages/__init__.py,sha256=X5-dRewJP-jtehdC6oDbs21j9bxGDUbI5WlcNrO_bHk,1309
|
|
24
|
-
langchain/rate_limiters/__init__.py,sha256=5490xUNhet37N2nX6kbJlDgf8u1DX-C1Cs_r7etXn8A,351
|
|
25
|
-
langchain/tools/__init__.py,sha256=C0GW8HPluAgnVmGneHXY-ibwbl3kXixBtZS88PtnXSI,410
|
|
26
|
-
langchain/tools/tool_node.py,sha256=p9NO3R8dgA9QhjCuGb-INebjizjzKj21tIsnoKSBkA8,57917
|
|
27
|
-
langchain-1.0.0a14.dist-info/METADATA,sha256=5-_c3FrZ93AM_AtuB9-PkYjoYDLgfMFtfij0SSHjvJE,6118
|
|
28
|
-
langchain-1.0.0a14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
29
|
-
langchain-1.0.0a14.dist-info/licenses/LICENSE,sha256=TsZ-TKbmch26hJssqCJhWXyGph7iFLvyFBYAa3stBHg,1067
|
|
30
|
-
langchain-1.0.0a14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|