Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hwchase17/langchain-hub
https://github.com/hwchase17/langchain-hub
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hwchase17/langchain-hub
- Owner: hwchase17
- Archived: true
- Created: 2023-01-11T03:22:40.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T16:24:10.000Z (over 1 year ago)
- Last Synced: 2024-05-19T14:32:07.002Z (8 months ago)
- Language: Python
- Size: 68.4 KB
- Stars: 3,176
- Watchers: 74
- Forks: 248
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-langchain - LangChainHub - hub?style=social) (LangChain Framework)
- awesome-langchain-zh - LangChainHub - hub?style=social): 收集所有对于使用LangChain原始概念(如提示,链和代理)有用的工件的集合,LangChainHub的灵感来自于Hugging Face Hub,它是一个集合,包含所有对于使用LangChain原始概念(如提示,链和代理)有用的工件。这个仓库的目标是成为分享和发现高质量提示,链和代理的中心资源,这些元素结合在一起形成复杂的LLM应用。我们希望这个仓库能够开始收集提示,并期待LangChain社区能够增加这个集合。我们希望不久后能够扩展到链和代理。 (LangChain框架)
README
# LangChainHub
| 🌐 This repo is getting replaced by our hosted LangChain Hub Product! Visit it at [https://smith.langchain.com/hub](https://smith.langchain.com/hub) 🌐 |
| --- |## Introduction
Taking inspiration from Hugging Face Hub, LangChainHub is collection of all artifacts useful for working with LangChain primitives such as prompts, chains and agents.
The goal of this repository is to be a central resource for sharing and discovering high quality prompts, chains and agents that combine together to form complex LLM applications.We are starting off the hub with a collection of prompts, and we look forward to the LangChain community adding to this collection. We hope to expand to chains and agents shortly.
## Contributing
Since we are using GitHub to organize this Hub, adding artifacts can best be done in one of three ways:
1. Create a fork and then open a PR against the repo.
2. Create an issue on the repo with details of the artifact you would like to add.
3. Add an artifact with the appropriate Google form:
- [Prompts](https://forms.gle/aAhZ6nEUybdzVbYq6)Each of the different types of artifacts (listed below) will have different instructions on how to upload them.
Please refer to the appropriate documentation to do so.## 📖 Prompts
At a high level, prompts are organized by use case inside the `prompts` directory.
To load a prompt in LangChain, you should use the following code snippet:```python
from langchain.prompts import load_promptprompt = load_prompt('lc://prompts/path/to/file.json')
```In addition to prompt files themselves, each sub-directory also contains a README explaining how best to use that prompt in the appropriate LangChain chain.
For more detailed information on how prompts are organized in the Hub, and how best to upload one, please see the documentation [here](./prompts/README.md).
## 🔗 Chains
At a high level, chains are organized by use case inside the `chains` directory.
To load a chain in LangChain, you should use the following code snippet:```python
from langchain.chains import load_chainchain = load_chain('lc://chains/path/to/file.json')
```In addition to chain files themselves, each sub-directory also contains a README explaining what that chain contains.
For more detailed information on how chains are organized in the Hub, and how best to upload one, please see the documentation [here](./chains/README.md).
## 🤖 Agents
At a high level, agents are organized by use case inside the `agents` directory.
To load an agent in LangChain, you should use the following code snippet:```python
from langchain.agents import initialize_agentllm = ...
tools = ...agent = initialize_agent(tools, llm, agent="lc://agents/self-ask-with-search/agent.json")
```In addition to agent files themselves, each sub-directory also contains a README explaining what that agent contains.
For more detailed information on how agents are organized in the Hub, and how best to upload one, please see the documentation [here](./agents/README.md).
## 👷 Agent Executors
Coming soon!