fix prompt structure (I am retarded)

This commit is contained in:
2025-06-29 15:41:29 -04:00
parent c0a686b565
commit d44c5d80bb

View File

@ -72,9 +72,7 @@ const storePromptData = async (
await prisma.response.create({ await prisma.response.create({
data: { data: {
response: ollamaResponseBody.response, response: ollamaResponseBody.response,
request: `${notification.status.account.fqn} asks: ${striptags( request: striptags(notification.status.content),
notification.status.content
)}`,
to: notification.account.fqn, to: notification.account.fqn,
pleromaNotificationId: notification.status.id, pleromaNotificationId: notification.status.id,
}, },
@ -110,7 +108,9 @@ const generateOllamaRequest = async (
const ollamaRequestBody: OllamaRequest = { const ollamaRequestBody: OllamaRequest = {
model: process.env.OLLAMA_MODEL as string, model: process.env.OLLAMA_MODEL as string,
system: process.env.OLLAMA_SYSTEM_PROMPT as string, system: process.env.OLLAMA_SYSTEM_PROMPT as string,
prompt: striptags(notification.status.content), prompt: `${notification.status.account.fqn} asks: ${striptags(
notification.status.content
)}`,
stream: false, stream: false,
}; };
const response = await fetch(`${process.env.OLLAMA_URL}/api/generate`, { const response = await fetch(`${process.env.OLLAMA_URL}/api/generate`, {