@boundaryml/baml-core-ffi
Advanced tools
Comparing version 0.18.0-canary.0 to 0.18.0-canary.1
@@ -15,2 +15,24 @@ /* tslint:disable */ | ||
export function version(): string | ||
export class NapiChatMessage { | ||
role(): string | ||
message(): string | ||
} | ||
export class NapiRenderedPrompt { | ||
isCompletion(): boolean | ||
isChat(): boolean | ||
chatMessages(): Array<NapiChatMessage> | ||
completion(): string | ||
} | ||
export class NapiClient { | ||
constructor(name: string, provider: string) | ||
} | ||
export class NapiRenderer { | ||
constructor(template: string, outputSchema: string) | ||
addTemplateString(name: string, argNames: Array<string>, argTypes: Array<string>, template: string): void | ||
/** | ||
* Render the prompt with the given arguments | ||
* These elements are all dynamic and must be passed in by the caller | ||
*/ | ||
render(args: Record<string, any>, client: NapiClient, env: Record<string, string>): NapiRenderedPrompt | ||
} | ||
export class BamlTracer { | ||
@@ -17,0 +39,0 @@ constructor() |
16
index.js
@@ -237,5 +237,19 @@ /* tslint:disable */ | ||
const { TestCaseStatus, BamlTracer, BamlTester, BamlScopeGuard, version } = nativeBinding | ||
const { | ||
TestCaseStatus, | ||
NapiChatMessage, | ||
NapiRenderedPrompt, | ||
NapiClient, | ||
NapiRenderer, | ||
BamlTracer, | ||
BamlTester, | ||
BamlScopeGuard, | ||
version, | ||
} = nativeBinding | ||
module.exports.TestCaseStatus = TestCaseStatus | ||
module.exports.NapiChatMessage = NapiChatMessage | ||
module.exports.NapiRenderedPrompt = NapiRenderedPrompt | ||
module.exports.NapiClient = NapiClient | ||
module.exports.NapiRenderer = NapiRenderer | ||
module.exports.BamlTracer = BamlTracer | ||
@@ -242,0 +256,0 @@ module.exports.BamlTester = BamlTester |
{ | ||
"name": "@boundaryml/baml-core-ffi", | ||
"version": "0.18.0-canary.0", | ||
"version": "0.18.0-canary.1", | ||
"description": "Template project for writing node package with napi-rs", | ||
@@ -110,8 +110,8 @@ "main": "index.js", | ||
"optionalDependencies": { | ||
"@boundaryml/baml-core-ffi-linux-x64-gnu": "0.18.0-canary.0", | ||
"@boundaryml/baml-core-ffi-linux-arm64-gnu": "0.18.0-canary.0", | ||
"@boundaryml/baml-core-ffi-darwin-arm64": "0.18.0-canary.0", | ||
"@boundaryml/baml-core-ffi-win32-x64-msvc": "0.18.0-canary.0", | ||
"@boundaryml/baml-core-ffi-darwin-x64": "0.18.0-canary.0" | ||
"@boundaryml/baml-core-ffi-linux-x64-gnu": "0.18.0-canary.1", | ||
"@boundaryml/baml-core-ffi-linux-arm64-gnu": "0.18.0-canary.1", | ||
"@boundaryml/baml-core-ffi-darwin-arm64": "0.18.0-canary.1", | ||
"@boundaryml/baml-core-ffi-win32-x64-msvc": "0.18.0-canary.1", | ||
"@boundaryml/baml-core-ffi-darwin-x64": "0.18.0-canary.1" | ||
} | ||
} |
18680
339