modelfusion 0.68.0 → 0.68.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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.invokeFlow = void 0;
4
- const ZodSchema_1 = require("../core/schema/ZodSchema");
5
- const readEventSource_1 = require("./readEventSource");
4
+ const ZodSchema_js_1 = require("../core/schema/ZodSchema.cjs");
5
+ const readEventSource_js_1 = require("./readEventSource.cjs");
6
6
  async function invokeFlow({ url, input, schema, onEvent, onStop, }) {
7
7
  const response = await fetch(url, {
8
8
  method: "POST",
@@ -10,9 +10,9 @@ async function invokeFlow({ url, input, schema, onEvent, onStop, }) {
10
10
  body: JSON.stringify(input),
11
11
  });
12
12
  const eventSourceUrl = (await response.json()).url;
13
- (0, readEventSource_1.readEventSource)({
13
+ (0, readEventSource_js_1.readEventSource)({
14
14
  url: eventSourceUrl,
15
- schema: new ZodSchema_1.ZodSchema(schema.events),
15
+ schema: new ZodSchema_js_1.ZodSchema(schema.events),
16
16
  isStopEvent(event) {
17
17
  return event.data === "[DONE]";
18
18
  },
@@ -1,4 +1,4 @@
1
- import { FlowSchema } from "../server/fastify/FlowSchema";
1
+ import { FlowSchema } from "../server/fastify/FlowSchema.js";
2
2
  export declare function invokeFlow<INPUT, EVENT>({ url, input, schema, onEvent, onStop, }: {
3
3
  url: string;
4
4
  input: INPUT;
@@ -1,5 +1,5 @@
1
- import { ZodSchema } from "../core/schema/ZodSchema";
2
- import { readEventSource } from "./readEventSource";
1
+ import { ZodSchema } from "../core/schema/ZodSchema.js";
2
+ import { readEventSource } from "./readEventSource.js";
3
3
  export async function invokeFlow({ url, input, schema, onEvent, onStop, }) {
4
4
  const response = await fetch(url, {
5
5
  method: "POST",
@@ -6,9 +6,8 @@ import { Schema } from "./Schema.js";
6
6
  * @param text - The JSON string to parse.
7
7
  * @returns {unknown} - The parsed JSON object.
8
8
  */
9
- export declare function parseJSON({ text, schema, }: {
9
+ export declare function parseJSON({ text }: {
10
10
  text: string;
11
- schema?: undefined;
12
11
  }): unknown;
13
12
  /**
14
13
  * Parses a JSON string into a strongly-typed object using the provided schema.
@@ -28,9 +27,8 @@ export declare function parseJSON<T>({ text, schema, }: {
28
27
  * @param text - The JSON string to parse.
29
28
  * @returns {object} Either an object with `success: true` and the parsed data, or an object with `success: false` and the error that occurred.
30
29
  */
31
- export declare function safeParseJSON({ text, schema, }: {
30
+ export declare function safeParseJSON({ text, }: {
32
31
  text: string;
33
- schema?: undefined;
34
32
  }): {
35
33
  success: true;
36
34
  data: unknown;
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.68.0",
4
+ "version": "0.68.1",
5
5
  "author": "Lars Grammel",
6
6
  "license": "MIT",
7
7
  "keywords": [