How can I update datasetItems via the API? (using typescript SDK) #11751
-
Describe your questionHello all! now, there can be a case where the local yaml file needs to change, for example when we add a new scorer / change the input text from the user etc... I couldn't find a way to update the datasetItems from the SDK. I did see however, that in the UI there is an option to update an it triggers the following API is there a way we can invoke this API from the SDK? thanks for the help Langfuse Cloud or Self-Hosted?Self-Hosted If Self-Hostedv3.111.0 OSS If Langfuse CloudNo response SDK and integration versionsPre-Submission Checklist
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Based on the available sources, I don't have information about updating dataset items via the TypeScript SDK. The sources only document The internal tRPC API endpoint you mentioned ( For your use case of syncing YAML test cases to Langfuse datasets, you might need to implement a delete-and-recreate workflow using the existing SDK methods (delete the old item, create a new one with updated content) until an update method becomes available in the SDK. Check out these potentially useful sources: Would you like a general answer based on my knowledge instead? 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @levyshachar2LR, yes, you can update a Dataset Item by using the API to post a dataset item with the same id but different content. You can use the POST /api/public/dataset-items endpoint - it will create a new item if the id doesn't exist, or update the existing item if it does. |
Beta Was this translation helpful? Give feedback.
Hi @levyshachar2LR, yes, you can update a Dataset Item by using the API to post a dataset item with the same id but different content. You can use the POST /api/public/dataset-items endpoint - it will create a new item if the id doesn't exist, or update the existing item if it does.