mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-12-16 16:48:14 +00:00
feat(search-agent): add search agent flow
This commit is contained in:
@@ -15,9 +15,9 @@ You have to use this action aggressively to find relevant information from the w
|
||||
When this action is present, you must use it to obtain current information from the web.
|
||||
|
||||
### How to use:
|
||||
1. For fast search mode, you can use this action once. Make sure to cover all aspects of the user's query in that single search.
|
||||
1. For speed search mode, you can use this action once. Make sure to cover all aspects of the user's query in that single search.
|
||||
2. If you're on quality mode, you'll get to use this action up to two times. Use the first search to gather general information, and the second search to fill in any gaps or get more specific details based on the initial findings.
|
||||
3. If you're set on Deep research mode, then you will get to use this action multiple times to gather more information. Use your judgment to decide when additional searches are necessary to provide a thorough and accurate response.
|
||||
3. If you're set on quality mode, then you will get to use this action multiple times to gather more information. Use your judgment to decide when additional searches are necessary to provide a thorough and accurate response.
|
||||
|
||||
Input: An array of search queries. Make sure the queries are relevant to the user's request and cover different aspects if necessary. You can include a maximum of 3 queries. Make sure the queries are SEO friendly and not sentences rather keywords which can be used to search a search engine like Google, Bing, etc.
|
||||
`;
|
||||
@@ -32,6 +32,7 @@ const webSearchAction: ResearchAction<typeof actionSchema> = {
|
||||
|
||||
const search = async (q: string) => {
|
||||
const res = await searchSearxng(q);
|
||||
|
||||
res.results.forEach((r) => {
|
||||
results.push({
|
||||
content: r.content || r.title,
|
||||
|
||||
Reference in New Issue
Block a user