1.0.1 • Published 11 months ago
@baserun-ai/baserun v1.0.1
Baserun
Baserun is the developer platform for AI teams. Visit https://baserun.ai to sign up for an account. This repo provides utilities designed to simplify and centralize the management of prompts for Large Language Models (LLMs).
We want to standardize how prompts are configured and used in order to provide an optimal experience for developing, iterating on, and evaluating prompts.
Documentation and Usage
To get started with Baserun, you can refer to the official documentation page.
npm install @baserun-ai/baserun
# or
yarn add @baserun-ai/baserun
import { Baserun } from "@baserun-ai/baserun";
const baserun = new Baserun();
const question = 'Who is the president of the United States?';
const completionRequest = baserun.buildPrompt({
config: {model: 'gpt-3.5-turbo'},
messages: [{role: "user", content: '{question}'}],
provider: "openai",
type: "chat",
}, {question});
const completion = await openai.createChatCompletion(completionRequest);