Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add current date and time to prompt for researcher #149

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/agents/researcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export async function researcher(
)

let isFirstToolResponse = true
const currentDate = new Date().toLocaleString();
const result = await nonexperimental_streamText({
model: openai.chat(process.env.OPENAI_API_MODEL || 'gpt-4o'),
maxTokens: 2500,
Expand All @@ -40,7 +41,7 @@ export async function researcher(
If there are any images relevant to your answer, be sure to include them as well.
Aim to directly address the user's question, augmenting your response with insights gleaned from the search results.
Whenever quoting or referencing information from a specific URL, always cite the source URL explicitly.
Please match the language of the response to the user's language.`,
Please match the language of the response to the user's language. Current date and time: ${currentDate}`,
messages,
tools: getTools({
uiStream,
Expand Down