modelfusion 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composed-function/summarize/SummarizationFunction.d.ts +1 -1
- package/composed-function/summarize/summarizeRecursively.d.ts +1 -1
- package/composed-function/summarize/summarizeRecursivelyWithTextGenerationAndTokenSplitting.d.ts +1 -1
- package/{run → core}/DefaultRun.cjs +1 -1
- package/{run → core}/DefaultRun.js +1 -1
- package/{run → core}/FunctionEvent.d.ts +30 -6
- package/index.cjs +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/model-function/Model.d.ts +1 -1
- package/model-function/ModelCallEvent.d.ts +20 -5
- package/model-function/ModelFunctionOptions.d.ts +1 -1
- package/model-function/SuccessfulModelCall.cjs +4 -2
- package/model-function/SuccessfulModelCall.d.ts +1 -1
- package/model-function/SuccessfulModelCall.js +4 -2
- package/model-function/embed-text/TextEmbeddingEvent.d.ts +12 -12
- package/model-function/embed-text/TextEmbeddingModel.d.ts +1 -1
- package/model-function/embed-text/embedText.cjs +6 -61
- package/model-function/embed-text/embedText.d.ts +1 -1
- package/model-function/embed-text/embedText.js +6 -61
- package/model-function/executeCall.cjs +32 -19
- package/model-function/executeCall.d.ts +4 -12
- package/model-function/executeCall.js +32 -19
- package/model-function/generate-image/ImageGenerationEvent.d.ts +9 -11
- package/model-function/generate-image/generateImage.cjs +2 -27
- package/model-function/generate-image/generateImage.js +2 -27
- package/model-function/generate-json/JsonGenerationEvent.d.ts +3 -16
- package/model-function/generate-json/generateJson.cjs +2 -27
- package/model-function/generate-json/generateJson.js +2 -27
- package/model-function/generate-json/generateJsonOrText.cjs +2 -27
- package/model-function/generate-json/generateJsonOrText.js +2 -27
- package/model-function/generate-text/TextGenerationEvent.d.ts +10 -10
- package/model-function/generate-text/TextStreamingEvent.d.ts +4 -17
- package/model-function/generate-text/generateText.cjs +2 -27
- package/model-function/generate-text/generateText.js +2 -27
- package/model-function/generate-text/streamText.cjs +24 -29
- package/model-function/generate-text/streamText.js +24 -29
- package/model-function/synthesize-speech/SpeechSynthesisEvent.d.ts +11 -10
- package/model-function/synthesize-speech/synthesizeSpeech.cjs +2 -28
- package/model-function/synthesize-speech/synthesizeSpeech.js +2 -28
- package/model-function/transcribe-speech/TranscriptionEvent.d.ts +9 -11
- package/model-function/transcribe-speech/transcribe.cjs +2 -27
- package/model-function/transcribe-speech/transcribe.js +2 -27
- package/model-provider/cohere/CohereTextEmbeddingModel.d.ts +3 -3
- package/model-provider/cohere/CohereTokenizer.d.ts +1 -1
- package/model-provider/llamacpp/LlamaCppTokenizer.d.ts +1 -1
- package/package.json +1 -1
- package/text-chunk/split/SplitFunction.d.ts +1 -1
- package/tool/ExecuteToolEvent.d.ts +7 -16
- package/tool/Tool.d.ts +1 -1
- package/tool/WebSearchTool.cjs +25 -0
- package/tool/WebSearchTool.d.ts +56 -1
- package/tool/WebSearchTool.js +25 -0
- package/tool/executeTool.cjs +14 -8
- package/tool/executeTool.d.ts +1 -1
- package/tool/executeTool.js +14 -8
- package/vector-index/VectorIndex.d.ts +1 -1
- package/vector-index/memory/MemoryVectorIndex.d.ts +1 -1
- package/vector-index/pinecone/PineconeVectorIndex.d.ts +1 -1
- /package/{run → core}/ConsoleLogger.cjs +0 -0
- /package/{run → core}/ConsoleLogger.d.ts +0 -0
- /package/{run → core}/ConsoleLogger.js +0 -0
- /package/{run → core}/DefaultRun.d.ts +0 -0
- /package/{run → core}/FunctionEvent.cjs +0 -0
- /package/{run → core}/FunctionEvent.js +0 -0
- /package/{run → core}/FunctionEventSource.cjs +0 -0
- /package/{run → core}/FunctionEventSource.d.ts +0 -0
- /package/{run → core}/FunctionEventSource.js +0 -0
- /package/{run → core}/FunctionObserver.cjs +0 -0
- /package/{run → core}/FunctionObserver.d.ts +0 -0
- /package/{run → core}/FunctionObserver.js +0 -0
- /package/{run → core}/FunctionOptions.cjs +0 -0
- /package/{run → core}/FunctionOptions.d.ts +0 -0
- /package/{run → core}/FunctionOptions.js +0 -0
- /package/{run → core}/GlobalFunctionObservers.cjs +0 -0
- /package/{run → core}/GlobalFunctionObservers.d.ts +0 -0
- /package/{run → core}/GlobalFunctionObservers.js +0 -0
- /package/{run → core}/Run.cjs +0 -0
- /package/{run → core}/Run.d.ts +0 -0
- /package/{run → core}/Run.js +0 -0
- /package/{run → core}/Vector.cjs +0 -0
- /package/{run → core}/Vector.d.ts +0 -0
- /package/{run → core}/Vector.js +0 -0
- /package/{run → core}/index.cjs +0 -0
- /package/{run → core}/index.d.ts +0 -0
- /package/{run → core}/index.js +0 -0
package/tool/executeTool.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { nanoid as createId } from "nanoid";
|
2
|
-
import { FunctionEventSource } from "../
|
3
|
-
import { getGlobalFunctionObservers } from "../
|
2
|
+
import { FunctionEventSource } from "../core/FunctionEventSource.js";
|
3
|
+
import { getGlobalFunctionObservers } from "../core/GlobalFunctionObservers.js";
|
4
4
|
import { startDurationMeasurement } from "../util/DurationMeasurement.js";
|
5
5
|
import { AbortError } from "../util/api/AbortError.js";
|
6
6
|
import { runSafe } from "../util/runSafe.js";
|
@@ -64,7 +64,7 @@ async function doExecuteTool(tool, input, options) {
|
|
64
64
|
sessionId: run?.sessionId,
|
65
65
|
userId: run?.userId,
|
66
66
|
functionId: options?.functionId,
|
67
|
-
|
67
|
+
toolName: tool.name,
|
68
68
|
input,
|
69
69
|
};
|
70
70
|
eventSource.notify({
|
@@ -86,14 +86,18 @@ async function doExecuteTool(tool, input, options) {
|
|
86
86
|
if (result.isAborted) {
|
87
87
|
eventSource.notify({
|
88
88
|
...finishMetadata,
|
89
|
-
|
89
|
+
result: {
|
90
|
+
status: "abort",
|
91
|
+
},
|
90
92
|
});
|
91
93
|
throw new AbortError();
|
92
94
|
}
|
93
95
|
eventSource.notify({
|
94
96
|
...finishMetadata,
|
95
|
-
|
96
|
-
|
97
|
+
result: {
|
98
|
+
status: "error",
|
99
|
+
error: result.error,
|
100
|
+
},
|
97
101
|
});
|
98
102
|
throw new ToolExecutionError({
|
99
103
|
toolName: tool.name,
|
@@ -106,8 +110,10 @@ async function doExecuteTool(tool, input, options) {
|
|
106
110
|
const output = result.output;
|
107
111
|
eventSource.notify({
|
108
112
|
...finishMetadata,
|
109
|
-
|
110
|
-
|
113
|
+
result: {
|
114
|
+
status: "success",
|
115
|
+
output,
|
116
|
+
},
|
111
117
|
});
|
112
118
|
return {
|
113
119
|
output,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { VectorOperationsApi } from "@pinecone-database/pinecone/dist/pinecone-generated-ts-fetch/index.js";
|
2
2
|
import { z } from "zod";
|
3
|
-
import { Vector } from "../../
|
3
|
+
import { Vector } from "../../core/Vector.js";
|
4
4
|
import { VectorIndex } from "../VectorIndex.js";
|
5
5
|
export declare class PineconeVectorIndex<DATA extends object | undefined> implements VectorIndex<DATA, PineconeVectorIndex<DATA>> {
|
6
6
|
readonly index: VectorOperationsApi;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/package/{run → core}/Run.cjs
RENAMED
File without changes
|
/package/{run → core}/Run.d.ts
RENAMED
File without changes
|
/package/{run → core}/Run.js
RENAMED
File without changes
|
/package/{run → core}/Vector.cjs
RENAMED
File without changes
|
File without changes
|
/package/{run → core}/Vector.js
RENAMED
File without changes
|
/package/{run → core}/index.cjs
RENAMED
File without changes
|
/package/{run → core}/index.d.ts
RENAMED
File without changes
|
/package/{run → core}/index.js
RENAMED
File without changes
|