mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-18 03:41:44 +03:00
13b174b202
Demo: https://github.com/StanGirard/quivr/assets/63923024/3aecb83f-3acd-46d4-900d-a042814c6638 Issue: https://github.com/StanGirard/quivr/issues/1753
24 lines
482 B
TypeScript
24 lines
482 B
TypeScript
import { ChatMessage } from "../types";
|
|
|
|
type GeneratePlaceHolderMessageProps = {
|
|
user_message: string;
|
|
chat_id: string;
|
|
};
|
|
|
|
export const generatePlaceHolderMessage = ({
|
|
user_message,
|
|
chat_id,
|
|
}: GeneratePlaceHolderMessageProps): ChatMessage => {
|
|
const message_id = new Date().getTime().toString();
|
|
const message_time = new Date().toISOString();
|
|
const assistant = "";
|
|
|
|
return {
|
|
message_id,
|
|
message_time,
|
|
assistant,
|
|
chat_id,
|
|
user_message,
|
|
};
|
|
};
|