langfuse-core
Advanced tools
Comparing version 2.1.0 to 2.1.1-alpha.2
@@ -768,8 +768,8 @@ 'use strict'; | ||
this.promptResponse = prompt; | ||
this.name = prompt.name; | ||
this.version = prompt.version; | ||
this.prompt = prompt.prompt; | ||
} | ||
compile(variables) { | ||
if (typeof variables !== "object") { | ||
throw new Error("Variables must be an object"); | ||
} | ||
return mustache.render(this.promptResponse.prompt, variables); | ||
return mustache.render(this.promptResponse.prompt, variables ?? {}); | ||
} | ||
@@ -776,0 +776,0 @@ } |
@@ -1532,6 +1532,11 @@ /// <reference types="node" /> | ||
private promptResponse; | ||
readonly name: string; | ||
readonly version: number; | ||
readonly prompt: string; | ||
constructor(prompt: CreateLangfusePromptResponse); | ||
compile(variables: unknown): string; | ||
compile(variables?: { | ||
[key: string]: string; | ||
}): string; | ||
} | ||
export { CreateLangfuseDatasetBody, CreateLangfuseDatasetItemBody, CreateLangfuseDatasetItemResponse, CreateLangfuseDatasetResponse, CreateLangfuseDatasetRunItemBody, CreateLangfuseDatasetRunItemResponse, CreateLangfuseEventBody, CreateLangfuseGenerationBody, CreateLangfusePromptBody, CreateLangfusePromptResponse, CreateLangfuseScoreBody, CreateLangfuseSpanBody, CreateLangfuseTraceBody, DeferRuntime, GetLangfuseDatasetParams, GetLangfuseDatasetResponse, GetLangfuseDatasetRunParams, GetLangfuseDatasetRunResponse, GetLangfusePromptResponse, IngestionBody, IngestionReturnType, JsonType, LangfuseCore, LangfuseCoreOptions, LangfuseEventClient, LangfuseEventProperties, LangfuseFetchOptions, LangfuseFetchResponse, LangfuseGenerationClient, LangfuseMemoryStorage, LangfuseMetadataProperties, LangfuseObject, LangfuseObjectClient, LangfusePersistedProperty, LangfusePromptClient, LangfuseQueueItem, LangfuseSpanClient, LangfuseTraceClient, LangfuseWebStateless, SingleIngestionEvent, UpdateLangfuseGenerationBody, UpdateLangfuseSpanBody, Usage, components, external, operations, paths, utils_d as utils, webhooks }; |
{ | ||
"name": "langfuse-core", | ||
"version": "2.1.0", | ||
"version": "2.1.1-alpha.2", | ||
"engines": { | ||
@@ -40,3 +40,3 @@ "node": ">=18" | ||
}, | ||
"gitHead": "477701e959d7020c1a49f9963fc30d1af5876001" | ||
"gitHead": "544214d279a0240fb9826bb36a6fec23500ff561" | ||
} |
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 not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
277399
9
3084
0
12
2
1