Giter Site home page Giter Site logo

langchain-hub's Introduction

LangChainHub

[Warning: very beta, may change drastically]

Google Form for submitting new prompts.

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:

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:

from langchain.prompts import load_prompt

prompt = 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.

๐Ÿ”— 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:

from langchain.chains import load_chain

chain = 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.

๐Ÿค– Agents

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:

from langchain.agents import initialize_agent

llm = ...
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.

๐Ÿ‘ท Agent Executors

Coming soon!

langchain-hub's People

Contributors

davidtsong avatar fpingham avatar hwchase17 avatar shreyar avatar sjwhitmore avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.