modelfusion 0.44.0 → 0.45.1
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/README.md +9 -5
- package/core/getRun.cjs +2 -2
- package/core/getRun.d.ts +1 -1
- package/core/getRun.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
@@ -500,15 +500,19 @@ Integrations: [Helicone](https://modelfusion.dev/integration/observability/helic
|
|
500
500
|
|
501
501
|
- [Model Functions](https://modelfusion.dev/guide/function/)
|
502
502
|
- [Generate and stream text](https://modelfusion.dev/guide/function/generate-text)
|
503
|
+
- [Prompt Format](https://modelfusion.dev/guide/function/generate-text/prompt-format)
|
503
504
|
- [Generate and stream structure](https://modelfusion.dev/guide/function/generate-structure)
|
504
505
|
- [Generate structure or text](https://modelfusion.dev/guide/function/generate-structure-or-text)
|
505
|
-
- [Embed Value](https://modelfusion.dev/guide/function/embed)
|
506
506
|
- [Tokenize Text](https://modelfusion.dev/guide/function/tokenize-text)
|
507
|
+
- [Embed Value](https://modelfusion.dev/guide/function/embed)
|
507
508
|
- [Transcribe Speech](https://modelfusion.dev/guide/function/transcribe-speech)
|
508
509
|
- [Synthesize Speech](https://modelfusion.dev/guide/function/synthesize-speech)
|
509
510
|
- [Describe Image](https://modelfusion.dev/guide/function/describe-image)
|
510
511
|
- [Generate Image](https://modelfusion.dev/guide/function/generate-image)
|
511
512
|
- [Tools](https://modelfusion.dev/guide/tools)
|
513
|
+
- [Vector Indices](https://modelfusion.dev/guide/vector-index)
|
514
|
+
- [Upsert](https://modelfusion.dev/guide/vector-index/upsert)
|
515
|
+
- [Retrieve](https://modelfusion.dev/guide/vector-index/retrieve)
|
512
516
|
- [Text Chunks](https://modelfusion.dev/guide/text-chunk/)
|
513
517
|
- [Split Text](https://modelfusion.dev/guide/text-chunk/split)
|
514
518
|
- [Utilities](https://modelfusion.dev/guide/util/)
|
@@ -520,6 +524,10 @@ Integrations: [Helicone](https://modelfusion.dev/integration/observability/helic
|
|
520
524
|
- [Runs](https://modelfusion.dev/guide/util/run)
|
521
525
|
- [Abort signals](https://modelfusion.dev/guide/util/abort)
|
522
526
|
- [Cost calculation](https://modelfusion.dev/guide/util/cost-calculation)
|
527
|
+
- [Troubleshooting](https://modelfusion.dev/guide/troubleshooting)
|
528
|
+
- [Bundling](https://modelfusion.dev/guide/troubleshooting/bundling)
|
529
|
+
|
530
|
+
### [Examples & Tutorials](https://modelfusion.dev/tutorial)
|
523
531
|
|
524
532
|
### [Integrations](https://modelfusion.dev/integration/model-provider)
|
525
533
|
|
@@ -596,7 +604,3 @@ Extracts information about a topic from a PDF and writes a tweet in your own sty
|
|
596
604
|
### [Contributing Guide](https://github.com/lgrammel/modelfusion/blob/main/CONTRIBUTING.md)
|
597
605
|
|
598
606
|
Read the [ModelFusion contributing guide](https://github.com/lgrammel/modelfusion/blob/main/CONTRIBUTING.md) to learn about the development process, how to propose bugfixes and improvements, and how to build and test your changes.
|
599
|
-
|
600
|
-
```
|
601
|
-
|
602
|
-
```
|
package/core/getRun.cjs
CHANGED
@@ -51,10 +51,10 @@ exports.getRun = getRun;
|
|
51
51
|
async function withRun(run, callback) {
|
52
52
|
await ensureLoaded();
|
53
53
|
if (runStorage != null) {
|
54
|
-
await runStorage.run(run, callback);
|
54
|
+
await runStorage.run(run, () => callback(run));
|
55
55
|
}
|
56
56
|
else {
|
57
|
-
await callback();
|
57
|
+
await callback(run);
|
58
58
|
}
|
59
59
|
}
|
60
60
|
exports.withRun = withRun;
|
package/core/getRun.d.ts
CHANGED
@@ -6,4 +6,4 @@ export declare function getRun(run?: Run): Promise<Run | undefined>;
|
|
6
6
|
/**
|
7
7
|
* Stores the run in an AsyncLocalStorage if running in Node.js. It can be retrieved with `getRun()`.
|
8
8
|
*/
|
9
|
-
export declare function withRun(run: Run, callback: () => PromiseLike<void>): Promise<void>;
|
9
|
+
export declare function withRun(run: Run, callback: (run: Run) => PromiseLike<void>): Promise<void>;
|
package/core/getRun.js
CHANGED
@@ -24,9 +24,9 @@ export async function getRun(run) {
|
|
24
24
|
export async function withRun(run, callback) {
|
25
25
|
await ensureLoaded();
|
26
26
|
if (runStorage != null) {
|
27
|
-
await runStorage.run(run, callback);
|
27
|
+
await runStorage.run(run, () => callback(run));
|
28
28
|
}
|
29
29
|
else {
|
30
|
-
await callback();
|
30
|
+
await callback(run);
|
31
31
|
}
|
32
32
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "modelfusion",
|
3
3
|
"description": "Build multimodal applications, chatbots, and agents with JavaScript and TypeScript.",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.45.1",
|
5
5
|
"author": "Lars Grammel",
|
6
6
|
"license": "MIT",
|
7
7
|
"keywords": [
|
@@ -57,7 +57,7 @@
|
|
57
57
|
"js-tiktoken": "1.0.7",
|
58
58
|
"nanoid": "3.3.6",
|
59
59
|
"secure-json-parse": "2.7.0",
|
60
|
-
"zod": "3.
|
60
|
+
"zod": "3.22.4",
|
61
61
|
"zod-to-json-schema": "3.21.4"
|
62
62
|
},
|
63
63
|
"devDependencies": {
|