Unit_AI/node_modules/openai/lib/chatCompletionUtils.mjs

13 lines
377 B
JavaScript
Raw Normal View History

2024-06-01 21:24:36 +01:00
export const isAssistantMessage = (message) => {
return message?.role === 'assistant';
};
export const isFunctionMessage = (message) => {
return message?.role === 'function';
};
export const isToolMessage = (message) => {
return message?.role === 'tool';
};
export function isPresent(obj) {
return obj != null;
}
//# sourceMappingURL=chatCompletionUtils.mjs.map