| title | Quickstart |
|---|---|
| description | Start managing prompts in under 5 minutes. |
The LangBear app is a web application for prompt management. Users can create and update prompt templates on-the-fly, track versions, and monitor prompt ratings with it.
Step 1. Create and configure a new LangBear app with Supabase.
$ npx create-langbear-app my-app --database supabaseStep 2. Start your app with npm run dev.
$ npm run devThe LangBear application is now available at http://localhost:3030. Check
out the Application page for more details.
The LangBear library allows you to manage LangChain prompts from the LangBear web application, accomplished with just a few lines of code.
Step 1. Add LangBear dependency to your project:
pip install langbearnpm install -S langbearyarn add langbearpnpm add langbearStep 2. Initialize LangBear client:
from langbear import LangBear
lb = LangBear(end_point="http://localhost:3030")TBD;Step 2. Add LangBear callback handler to your LangChain callbacks:
from langchain.llms import OpenAI
llm = OpenAI(temperature=0.5, callbacks=[lb.callback_handler])TBD;Step 3. Get a prompt template from LangBear:
prompt = lb.prompts.get("company-name-generation")
prompt.format(product="colorful socks")TBD;You are now ready to manage prompts using LangBear. Check out the Development page for more details.