Skip to content

Commit

Permalink
Update default prompt in the seed script
Browse files Browse the repository at this point in the history
  • Loading branch information
diksipav committed Nov 20, 2024
1 parent 534c86e commit 00955e6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
16 changes: 16 additions & 0 deletions nextjs-edgedb-ai/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ insert Book {
filter .name = "Orion Ember"
set { country := "United Kingdom" };
`);

// update the default prompt content
await client.query(`
update ext::ai::ChatPrompt
filter .name = 'builtin::rag-default'
set { messages := (
insert ext::ai::ChatPromptMessage {
participant_role := ext::ai::ChatParticipantRole.System,
content:= "You are an expert Q&A system.
Always answer questions based on the provided context information.
If user asks about someone's country always require a tool call.
Context information is below:
{context}",
}
)};
`);
}

main();
16 changes: 16 additions & 0 deletions nextjs-vercel-ai-provider/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ insert Book {
filter .name = "Orion Ember"
set { country := "United Kingdom" };
`);

// update the default prompt content
await client.query(`
update ext::ai::ChatPrompt
filter .name = 'builtin::rag-default'
set { messages := (
insert ext::ai::ChatPromptMessage {
participant_role := ext::ai::ChatParticipantRole.System,
content:= "You are an expert Q&A system.
Always answer questions based on the provided context information.
If user asks about someone's country always require a tool call.
Context information is below:
{context}",
}
)};
`);
}

main();
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

0 comments on commit 00955e6

Please sign in to comment.