Add lucide-react package and remove unused icons

This commit is contained in:
n4ze3m
2024-02-25 18:44:47 +05:30
parent 06b32176a9
commit 43f3727369
37 changed files with 610 additions and 574 deletions

20
src/web/web.ts Normal file
View File

@@ -0,0 +1,20 @@
import { getWebSearchPrompt } from "~services/ollama"
import { webSearch } from "./local-google"
export const getSystemPromptForWeb = async (query: string) => {
try {
const search = await webSearch(query)
const search_results = search.map((result, idx) => `<result source="${result.url}" id="${idx}">${result.content}</result>`).join("\n")
const current_date_time = new Date().toLocaleString()
const system = await getWebSearchPrompt();
const prompt = system.replace("{current_date_time}", current_date_time).replace("{search_results}", search_results)
return prompt
} catch (e) {
return ''
}
}