// Get the current date in the format "January 20, 2024"
constcurrentDate=newIntl.DateTimeFormat('en-US',{
year:'numeric',
month:'long',
day:'2-digit'
}).format(newDate());
constres=awaitfetch(`${url}/chat/completions`,{
method:'POST',
headers:{
Accept:'application/json',
'Content-Type':'application/json',
Authorization:`Bearer ${token}`
},
body:JSON.stringify({
model:model,
// Few shot prompting
messages:[
{
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}.`
`Oops! Hold tight! Your files are still in the processing oven. We're cooking them up to perfection. Please be patient and we'll let you know once they're ready.`
"Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':"