statsig-langchain
v0.0.2
Published
[![npm version](https://badge.fury.io/js/statsig-langchain.svg)](https://badge.fury.io/js/statsig-langchain)
Downloads
7
Keywords
Readme
Statsig Langchain Extensions
Extensions on top of Langchain Primitives that hook into Statsig analytics and experiments.
Example use:
const { OpenAIChat } = require("statsig-langchain/dist/llms/openai");
const { PromptTemplate } = require("statsig-langchain/dist/prompts");
async function run() {
const model = await OpenAIChat.newWithStatsig({ temperature: 0 });
const template = await PromptTemplate.fromTemplateStatsig("What is a good name for a company that makes {product}?");
const prompt = await template.format({ product: "cars" });
const response = await model.call(prompt);
console.log(response);
}