agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

Perplexica / SearXNG search results

Open Cletus-Mccoy opened this issue 1 year ago • 4 comments

I have created two helpers, one to search with SearXNG and the other with Perplexica. I have also updated the knowledge_tool to include these helpers. I am building a containerized version of agent-zero which contains ollama, perplexica & searxng for the moment.

custom_searches.zip

I have included these files in a .ZIP so they can be integrated when OK

https://github.com/ItzCrazyKns

Perplexica & SearXNG were installed with the default settings for the compose-stack from the github repo. I am currently still running agent-zero and ollama locally for testing purposes and am using Llama3.1:8B & nomic-embed-text.

Cletus-Mccoy avatar Nov 19 '24 21:11 Cletus-Mccoy

Thank you for this! I can't get it to work though, I'm getting this error in agent zero:

Agent Zero\python\tools\knowledge_tool.py", line 5, in from python.helpers import memory, perplexica_search, duckduckgo_search, searxng_search ImportError: cannot import name 'perplexica_search' from 'python.helpers' (unknown location)

I did: pip install helper

And I have all the files in the python\tools\ dir (including SearXNG and Perplexica).

What am I doing wrong??

I have created two helpers, one to search with SearXNG and the other with Perplexica. I have also updated the knowledge_tool to include these helpers. I am building a containerized version of agent-zero which contains ollama, perplexica & searxng for the moment.

custom_searches.zip

I have included these files in a .ZIP so they can be integrated when OK

https://github.com/ItzCrazyKns

Perplexica & SearXNG were installed with the default settings for the compose-stack from the github repo. I am currently still running agent-zero and ollama locally for testing purposes and am using Llama3.1:8B & nomic-embed-text.

misterjice avatar Nov 26 '24 04:11 misterjice

custom_searches_v2.zip I made some mistakes, that's why it is not working

Cletus-Mccoy avatar Dec 01 '24 14:12 Cletus-Mccoy

@frdel if you want to have a look a this, just discovered the development branch and see you also have SearXNG integrated there. I'm not sure how to make an actual proposal in git :)

Cletus-Mccoy avatar Dec 01 '24 14:12 Cletus-Mccoy

If you are interested I have a working implementation of SearXNG search. Configurable in terms of categories and number of result per category from an env variable.

Here an example of the output you get asking to serch online for the term "ambiguos" (wrong spelling was to test is It auto correct, and It does):

`Hint: Initialized searXNG search for categories: General, Images, Videos, News, Map, Music, Science, Files, Social_media, It

Hint: Waiting search results...

Hint: Received 10 search results.

Generating markdown for 10 results Query: Search results for the term 'ambiguos'

Agent 0: Response from tool 'knowledge_tool'

Online sources

SearXNG Search Results

The following are the search results for query Search results for the term 'ambiguos' divided by category and ordered by relevance.

Category General

Ambiguous Definition & Meaning

The meaning of AMBIGUOUS is doubtful or uncertain especially from obscurity or indistinctness. How to use ambiguous in a sentence. Synonym Discussion of Ambiguous. Frequently Asked Questions About ambiguous.

Metadata

  • url: https://www.merriam-webster.com/dictionary/ambiguous
  • score: 16.207
  • published_date: None
  • thumbnail:
  • engine: google
  • parsed_url: ['https', 'www.merriam-webster.com', '/dictionary/ambiguous', '', '', '']
  • template: default.html
  • engines: ['qwant', 'google', 'brave', 'startpage']
  • positions: [1, 1, 1, 1]

AMBIGUOUS | English meaning - Cambridge Dictionary

5 days ago — having or expressing more than one possible meaning, sometimes intentionally: His reply to my question was somewhat ambiguous. The wording of ...

Metadata

  • url: https://dictionary.cambridge.org/dictionary/english/ambiguous
  • score: 7.124666666666666
  • published_date: 2024-12-03 00:00:00
  • thumbnail:
  • engine: google
  • parsed_url: ['https', 'dictionary.cambridge.org', '/dictionary/english/ambiguous', '', '', '']
  • template: default.html
  • engines: ['qwant', 'google', 'brave', 'startpage']
  • positions: [2, 3, 3, 2]
  • publishedDate: 2024-12-03T21:35:55.736061

Ambiguous - Definition, Meaning & Synonyms

Something ambiguous is unclear or vague, like the end of a short story that leaves you scratching your head. But if you're ambivalent about something, you can take it or leave it.

Metadata

  • url: https://www.vocabulary.com/dictionary/ambiguous
  • score: 3.550428571428571
  • published_date: None
  • thumbnail:
  • engine: google
  • parsed_url: ['https', 'www.vocabulary.com', '/dictionary/ambiguous', '', '', '']
  • template: default.html
  • engines: ['qwant', 'google', 'brave', 'startpage']
  • positions: [5, 6, 7, 3]

Category Music

Metaphysics (Book 7) by Aristotle

the simple terms. For the extreme terms are not in the same way identical with the middle term. But perhaps

Metadata

  • url: https://genius.com/Aristotle-metaphysics-book-7-annotated
  • score: 2.507
  • published_date: 2015-06-07 00:00:00
  • thumbnail: https://s3.amazonaws.com/rapgenius/1368193318_aristotle3.jpg
  • publishedDate: 2015-06-07T03:43:45
  • iframe_src: https://genius.com/songs/2029855/apple_music_player
  • engine: genius
  • parsed_url: ['https', 'genius.com', '/Aristotle-metaphysics-book-7-annotated', '', '', '']
  • template: default.html
  • engines: ['genius']
  • positions: [1, 5] ...`

ivan-saorin avatar Dec 08 '24 21:12 ivan-saorin