Comments (5)
LLM-1001 Feature: Adding tags via langchain calls
from lunary.
Hi, are you using python?
from lunary.
If yes, you can use with lunary.tags(["tag1", ["tag2"]):
.
More details at the bottom of this page: https://lunary.ai/docs/features/tags
from lunary.
Nope i am using langchain-ts, would that also be possible there ?
from lunary.
You can pass tags like this:
import { ChatOpenAI } from "@langchain/openai";
import { ChatPromptTemplate } from "@langchain/core/prompts";
import { StringOutputParser } from "@langchain/core/output_parsers";
import { LunaryHandler } from "lunary/langchain";
const handler = new LunaryHandler();
const prompt = ChatPromptTemplate.fromMessages([
["human", "Tell me a short joke about {topic}"],
]);
const model = new ChatOpenAI({});
const outputParser = new StringOutputParser();
const chain = prompt.pipe(model).pipe(outputParser);
const response = await chain.invoke(
{
topic: "ice cream",
},
{
callbacks: [handler],
tags: ["tag1", "tag2"],
}
);
console.log(response);
from lunary.
Related Issues (20)
- LunaryModule not found - Langchain HOT 6
- Streaming Mode with openai package cause LLMonitor to throw error HOT 1
- Sorry to be that guy... *types*? HOT 3
- Should't this be DATABASE_URL? HOT 3
- Unable to create local deployment HOT 2
- Server-side error with vercel 'ai' npm package HOT 6
- relation "tag_cache" does not exist - relation "model_name_cache" does not exist HOT 3
- getting started to run locally - errors with npm run dev HOT 12
- 404 on Ops Submodule HOT 1
- instance of BaseCallbackHandler expected HOT 1
- Confused about the Self-Hosted Community tier HOT 1
- Self hosting errors HOT 1
- Errors while self hosting HOT 3
- Source of benchmark page HOT 1
- Self hosted: High db usage while idle HOT 4
- Best way to trace cached LLM and tool calls HOT 21
- Tags not displaying in tools traces HOT 4
- frontend env variable HOT 2
- Deleted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lunary.