@aigne/core 1.0.14 → 1.0.15

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.
@@ -26,7 +26,7 @@ export type LLMModelInputs = {
26
26
  };
27
27
  export interface LLMModelInputMessage {
28
28
  role: Role;
29
- content: string | ({
29
+ content?: string | ({
30
30
  type: "text";
31
31
  text: string;
32
32
  } | {
@@ -68,7 +68,7 @@ async function contentsFromInputMessages(messages) {
68
68
  content: typeof i.content === "string"
69
69
  ? i.content
70
70
  : i.content
71
- .map((c) => {
71
+ ?.map((c) => {
72
72
  if (c.type === "text") {
73
73
  return { type: "text", text: c.text };
74
74
  }
@@ -26,7 +26,7 @@ export type LLMModelInputs = {
26
26
  };
27
27
  export interface LLMModelInputMessage {
28
28
  role: Role;
29
- content: string | ({
29
+ content?: string | ({
30
30
  type: "text";
31
31
  text: string;
32
32
  } | {
@@ -26,7 +26,7 @@ export type LLMModelInputs = {
26
26
  };
27
27
  export interface LLMModelInputMessage {
28
28
  role: Role;
29
- content: string | ({
29
+ content?: string | ({
30
30
  type: "text";
31
31
  text: string;
32
32
  } | {
@@ -61,7 +61,7 @@ async function contentsFromInputMessages(messages) {
61
61
  content: typeof i.content === "string"
62
62
  ? i.content
63
63
  : i.content
64
- .map((c) => {
64
+ ?.map((c) => {
65
65
  if (c.type === "text") {
66
66
  return { type: "text", text: c.text };
67
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/core",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "AIGNE core library",
5
5
  "publishConfig": {
6
6
  "access": "public"