@markprompt/core
Advanced tools
Comparing version 0.4.0-beta1 to 0.4.0-beta2
@@ -24,7 +24,6 @@ import type { OpenAIModelId } from './types.js'; | ||
* @param {(references: string[]) => void} onReferences - This function is called when a chunk includes references. | ||
* @param {() => void} onDone - called when streaming is finished | ||
* @param {(error: Error) => void} onError - called when an error occurs | ||
* @param {Options} [options] - Optional options object | ||
*/ | ||
export declare function submitPrompt(prompt: string, projectKey: string, onAnswerChunk: (answerChunk: string) => void, onReferences: (references: string[]) => void, onDone: () => void, onError: (error: Error) => void, options?: Options): Promise<void>; | ||
export declare function submitPrompt(prompt: string, projectKey: string, onAnswerChunk: (answerChunk: string) => void, onReferences: (references: string[]) => void, onError: (error: Error) => void, options?: Options): Promise<void>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -10,7 +10,6 @@ export const DEFAULT_MODEL = 'gpt-3.5-turbo'; | ||
* @param {(references: string[]) => void} onReferences - This function is called when a chunk includes references. | ||
* @param {() => void} onDone - called when streaming is finished | ||
* @param {(error: Error) => void} onError - called when an error occurs | ||
* @param {Options} [options] - Optional options object | ||
*/ | ||
export async function submitPrompt(prompt, projectKey, onAnswerChunk, onReferences, onDone, onError, options = {}) { | ||
export async function submitPrompt(prompt, projectKey, onAnswerChunk, onReferences, onError, options = {}) { | ||
if (!projectKey) { | ||
@@ -70,3 +69,2 @@ throw new Error('A projectKey is required.'); | ||
} | ||
onDone(); | ||
} | ||
@@ -73,0 +71,0 @@ catch (error) { |
{ | ||
"name": "@markprompt/core", | ||
"version": "0.4.0-beta1", | ||
"version": "0.4.0-beta2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
10509
106