node-ejs-renderer/node_modules/openai/lib/chatCompletionUtils.js

20 lines
700 B
JavaScript
Raw Normal View History

2024-06-09 13:55:01 -04:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPresent = exports.isToolMessage = exports.isFunctionMessage = exports.isAssistantMessage = void 0;
const isAssistantMessage = (message) => {
return message?.role === 'assistant';
};
exports.isAssistantMessage = isAssistantMessage;
const isFunctionMessage = (message) => {
return message?.role === 'function';
};
exports.isFunctionMessage = isFunctionMessage;
const isToolMessage = (message) => {
return message?.role === 'tool';
};
exports.isToolMessage = isToolMessage;
function isPresent(obj) {
return obj != null;
}
exports.isPresent = isPresent;
//# sourceMappingURL=chatCompletionUtils.js.map