You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by sahellebusch May 3, 2024
I'm working w/ a typescript application and want to write a test suite using a dataset. I want to reuse some of my application code, which uses the built in langchain tracing mechanism. Is there a similar integration to the python dataset integration called out in the docs?
Example code:
constlangfuseConfig={secretKey: process.env.LANGFUSE_SECRET_KEY,publicKey: process.env.LANGFUSE_PUBLIC_KEY,baseUrl: 'https://us.cloud.langfuse.com',};constlangfuse=newLangfuse(langfuseConfig);constprompt=awaitlangfuse.getPrompt('my-prompt');constopenAI=newChatOpenAI({openAIApiKey: process.env.OPENAI_API_KEY,modelName: prompt.config.modelName,temperature: prompt.config.temperature,});constdataset=awaitlangfuse.getDataset('my-dataset');awaitPromise.all(dataset.items.map(asynci=>{constres=awaitRunnableSequence.from([ChatPromptTemplate.fromMessages([['system',prompt.getLangchainPrompt()],['user','{input}'],]),openAI,StructuredOutputParser.fromZodSchema(z.object({someProperty: z.string()}),),]).invoke({input: i.input},{callbacks: [newCallbackHandler({
...langfuseConfig,userId: 'someUuid',metadata: {some: 'metadata',},}),],},);// Here I want to link and add a score.}),
The text was updated successfully, but these errors were encountered:
Discussed in https://github.com/orgs/langfuse/discussions/1969
Originally posted by sahellebusch May 3, 2024
I'm working w/ a typescript application and want to write a test suite using a dataset. I want to reuse some of my application code, which uses the built in langchain tracing mechanism. Is there a similar integration to the python dataset integration called out in the docs?
Example code:
The text was updated successfully, but these errors were encountered: