Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 1.77 KB

File metadata and controls

102 lines (68 loc) · 1.77 KB
title Quickstart
description Start managing prompts in under 5 minutes.

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.

$ 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:

pip install langbear
npm install -S langbear
yarn add langbear
pnpm add langbear

Step 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.