agsamantha/node_modules/openai/lib/chatCompletionUtils.mjs

13 lines
377 B
JavaScript
Raw Permalink Normal View History

2024-10-02 15:15:21 -05: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