Documentation Index
Fetch the complete documentation index at: https://langbear.runbear.io/llms.txt
Use this file to discover all available pages before exploring further.
Running LangBear application
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 supabase
Step 2. Start your app with npm run dev.
The LangBear application is now available at http://localhost:3030. Check
out the Application page for more details.
Setting up your development
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:
Step 2. Initialize LangBear client:
from langbear import LangBear
lb = LangBear(end_point="http://localhost:3030")
Step 2. Add LangBear callback handler to your LangChain callbacks:
from langchain.llms import OpenAI
llm = OpenAI(temperature=0.5, callbacks=[lb.callback_handler])
Step 3. Get a prompt template from LangBear:
prompt = lb.prompts.get("company-name-generation")
prompt.format(product="colorful socks")
You are now ready to manage prompts using LangBear. Check out the
Development page for more details.