Closed drupol closed 3 weeks ago
I just tried it out with the following settings:
{
services.searxng."searxng1" = {
enable = true;
settings = {
use_default_settings = true;
server.secret_key = "secret";
search.formats = [ "html" "json" ];
};
};
}
And tried out the json
format output with curl
:
❯ curl -G 'http://localhost:1234/search' \
--data-urlencode 'q=OpenAI' \
--data-urlencode 'format=json' | jq '.results | .[:1]'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 34975 100 34975 0 0 11099 0 0:00:03 0:00:03 --:--:-- 11099
[
{
"url": "https://openai.com/",
"title": "OpenAI",
"content": "OpenAI announces GPT-4o, a new version of its powerful language model, and ChatGPT, a free service that lets you chat with it. Learn more about their research, products, and mission to create safe and beneficial artificial general intelligence.",
"thumbnail": "",
"engine": "google",
"parsed_url": [
"https",
"openai.com",
"/",
"",
"",
""
],
"template": "default.html",
"engines": [
"duckduckgo",
"google",
"brave"
],
"positions": [
1,
1,
1,
2
],
"publishedDate": "2024-05-13T00:00:00",
"score": 14.0,
"category": "general"
}
]
pretty cool! will be really helpful to provide search engine access to agents.
pretty cool! will be really helpful to provide search engine access to agents.
Already using it in conjunction with open-webui on my server, that's the reason why I did this PR.
Can merge after @shivaraj-bh review (and addressing of comments) with CI fully passing (currently fails on mac).
For the time-being, we can disable tests for this package on Darwin (like we do for grafana), with a comment linking to upstream issue: https://github.com/NixOS/nixpkgs/issues/321329.
I think i'm done.
Top! thanks.
This PR:
searxng
serviceTest with: