@axflow/models
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -202,2 +202,4 @@ declare class HttpError extends Error { | ||
export { FunctionType, HttpError, IterableToStream, JSONValueType, MessageType, NdJsonStream, NdJsonValueType, POST, StreamToIterable, StreamingJsonResponse, isHttpError }; | ||
declare const createMessage: (message: Partial<MessageType>) => MessageType; | ||
export { FunctionType, HttpError, IterableToStream, JSONValueType, MessageType, NdJsonStream, NdJsonValueType, POST, StreamToIterable, StreamingJsonResponse, createMessage, isHttpError }; |
@@ -29,2 +29,3 @@ "use strict"; | ||
StreamingJsonResponse: () => StreamingJsonResponse, | ||
createMessage: () => createMessage, | ||
isHttpError: () => isHttpError | ||
@@ -252,2 +253,13 @@ }); | ||
}; | ||
// src/shared/message.ts | ||
var createMessage = (message) => { | ||
const defaults = { | ||
id: crypto.randomUUID(), | ||
role: "user", | ||
created: Date.now(), | ||
content: "" | ||
}; | ||
return Object.assign(defaults, message); | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -261,3 +273,4 @@ 0 && (module.exports = { | ||
StreamingJsonResponse, | ||
createMessage, | ||
isHttpError | ||
}); |
{ | ||
"name": "@axflow/models", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "Zero-dependency, modular SDK for building robust natural language applications", | ||
@@ -199,3 +199,3 @@ "author": "Axflow (https://axflow.dev)", | ||
}, | ||
"gitHead": "004545e47596345bf0899fbe18b2ebed8d993436" | ||
"gitHead": "a7689d82bf69e2293bd0e4cc4eb8fc5f449dd8d6" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
240488
4600