Using context in prompts
How do I pass something such as the current time (String) to the definePrompt's system prompt?
const triageResponse = await triageChat.send({
prompt: userInput,
messages: formattedUserHistory,
context: { systemTime },
});
export const triageAgent = ai.definePrompt({
model: 'googleai/gemini-1.5-pro',
name: 'triageAgent',
description:
'Decides on the initial casual response and which specialized agents to call next.',
output: { format: 'json', schema: triageOutputSchema },
system: `You are a triage agent that routes questions to specialized agents. The current system time is @systemTime in UTC format.
.......const triageResponse = await triageChat.send({
prompt: userInput,
messages: formattedUserHistory,
context: { systemTime },
});
export const triageAgent = ai.definePrompt({
model: 'googleai/gemini-1.5-pro',
name: 'triageAgent',
description:
'Decides on the initial casual response and which specialized agents to call next.',
output: { format: 'json', schema: triageOutputSchema },
system: `You are a triage agent that routes questions to specialized agents. The current system time is @systemTime in UTC format.
.......