Add @mantine/hooks dependency and update PlaygroundChat component

This commit is contained in:
n4ze3m
2024-02-25 21:17:27 +05:30
parent 86d4d53693
commit 094615498c
13 changed files with 99 additions and 40 deletions

View File

@@ -13,8 +13,21 @@ export const getSystemPromptForWeb = async (query: string) => {
const prompt = system.replace("{current_date_time}", current_date_time).replace("{search_results}", search_results)
return prompt
return {
prompt,
source: search.map((result) => {
return {
url: result.url,
name: new URL(result.url).hostname,
type: "url",
}
})
}
} catch (e) {
return ''
console.error(e)
return {
prompt: "",
source: [],
}
}
}