-
Notifications
You must be signed in to change notification settings - Fork 63
docs: add multimodal traces section (ChatPromptTemplate) #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
import * as fs from "fs"; | ||
|
||
function encodeImageToBase64(imagePath: string): string { | ||
const imageBuffer = fs.readFileSync(imagePath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: would use async?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok added async loading of the image, lmk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approve to unblock, left a nit
- would add a link from https://langsmith-docs-git-feat-multimodal-traces-langchain.vercel.app/observability/how_to_guides/log_multimodal_traces to this page
return messages; | ||
} | ||
|
||
async function createMultiImagePrompt(): Promise<ChatPromptTemplate> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this does not need to be async
This PR adds the Log multimodal traces section in
how_to_guides/trace_with_langchain#log-multimodal-traces
. This is useful to showcase ChatPromptTemplate's capabilities in appending images and visualize them in langsmith.To-do