refactor ai naming and make omni raw-json first
This commit is contained in:
@@ -255,7 +255,7 @@ export async function runCrmAgentFor(
|
||||
);
|
||||
}
|
||||
|
||||
export async function persistChatMessage(input: {
|
||||
export async function persistAiMessage(input: {
|
||||
role: ChatRole;
|
||||
text: string;
|
||||
plan?: string[];
|
||||
@@ -279,7 +279,7 @@ export async function persistChatMessage(input: {
|
||||
authorUserId?: string | null;
|
||||
}) {
|
||||
const hasStoredPayload = Boolean(input.changeSet || input.messageKind);
|
||||
const data: Prisma.ChatMessageCreateInput = {
|
||||
const data: Prisma.AiMessageCreateInput = {
|
||||
team: { connect: { id: input.teamId } },
|
||||
conversation: { connect: { id: input.conversationId } },
|
||||
authorUser: input.authorUserId ? { connect: { id: input.authorUserId } } : undefined,
|
||||
@@ -292,5 +292,5 @@ export async function persistChatMessage(input: {
|
||||
} as any)
|
||||
: undefined,
|
||||
};
|
||||
return prisma.chatMessage.create({ data });
|
||||
return prisma.aiMessage.create({ data });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user