New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

langfuse-core

Package Overview
Dependencies
Maintainers
2
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langfuse-core - npm Package Compare versions

Comparing version 3.6.0 to 3.7.0

30

lib/index.cjs.js

@@ -459,3 +459,4 @@ 'use strict';

async _getDataset(name) {
return this.fetch(`${this.baseUrl}/api/public/datasets/${name}`, this._getFetchOptions({
const encodedName = encodeURIComponent(name);
return this.fetch(`${this.baseUrl}/api/public/datasets/${encodedName}`, this._getFetchOptions({
method: "GET"

@@ -465,3 +466,5 @@ })).then(res => res.json());

async getDatasetRun(params) {
return this.fetch(`${this.baseUrl}/api/public/datasets/${params.datasetName}/runs/${params.runName}`, this._getFetchOptions({
const encodedDatasetName = encodeURIComponent(params.datasetName);
const encodedRunName = encodeURIComponent(params.runName);
return this.fetch(`${this.baseUrl}/api/public/datasets/${encodedDatasetName}/runs/${encodedRunName}`, this._getFetchOptions({
method: "GET"

@@ -476,6 +479,12 @@ })).then(res => res.json());

}
async createDataset(name) {
const body = {
name
};
/**
* Creates a dataset. Upserts the dataset if it already exists.
*
* @param dataset Can be either a string (name) or an object with name, description and metadata
* @returns A promise that resolves to the response of the create operation.
*/
async createDataset(dataset) {
const body = typeof dataset === "string" ? {
name: dataset
} : dataset;
return this.fetch(`${this.baseUrl}/api/public/datasets`, this._getFetchOptions({

@@ -827,5 +836,7 @@ method: "POST",

...dataset,
description: dataset.description ?? undefined,
metadata: dataset.metadata ?? undefined,
items: items.map(item => ({
...item,
link: async (obj, runName) => {
link: async (obj, runName, runArgs) => {
await this.awaitAllQueuedAndPendingRequests();

@@ -835,3 +846,6 @@ const data = await this.createDatasetRunItem({

datasetItemId: item.id,
observationId: obj.id
observationId: obj.observationId,
traceId: obj.traceId,
runDescription: runArgs?.description,
metadata: runArgs?.metadata
});

@@ -838,0 +852,0 @@ return data;

{
"name": "langfuse-core",
"version": "3.6.0",
"version": "3.7.0",
"engines": {

@@ -40,3 +40,3 @@ "node": ">=18"

},
"gitHead": "110b1078b7363176c2bfce4ec056ee96620c9dc0"
"gitHead": "47f2f2d14fe61363be5e14c2d41f5d24b125480e"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc