refac: styling

This commit is contained in:
Timothy J. Baek
2024-05-27 14:55:08 -07:00
parent 74a8deb19f
commit 4d64893661
5 changed files with 110 additions and 34 deletions
-14
View File
@@ -403,18 +403,12 @@ export const generateSearchQuery = async (
let error = null;
// TODO: Allow users to specify the prompt
// Get the current date in the format "January 20, 2024"
const currentDate = new Intl.DateTimeFormat('en-US', {
year: 'numeric',
month: 'long',
day: '2-digit'
}).format(new Date());
const yesterdayDate = new Intl.DateTimeFormat('en-US', {
year: 'numeric',
month: 'long',
day: '2-digit'
}).format(new Date());
const res = await fetch(`${url}/chat/completions`, {
method: 'POST',
@@ -431,14 +425,6 @@ export const generateSearchQuery = async (
role: 'assistant',
content: `You are tasked with generating web search queries. Give me an appropriate query to answer my question for google search. Answer with only the query. Today is ${currentDate}.`
},
{
role: 'user',
content: 'What is the current weather in Paris?'
},
{
role: 'assistant',
content: `Weather in Paris ${currentDate}`
},
{
role: 'user',
content: prompt