init
This commit is contained in:
18
packages/genaiscript/genaisrc/tools/searxng.genai.mts
Normal file
18
packages/genaiscript/genaisrc/tools/searxng.genai.mts
Normal file
@@ -0,0 +1,18 @@
|
||||
script({
|
||||
isSystem: true
|
||||
})
|
||||
|
||||
import {SearxngClient} from "@agentic/searxng";
|
||||
import ky from 'ky';
|
||||
|
||||
const kyWithHeaders = ky.create({
|
||||
referrerPolicy: "unsafe-url",
|
||||
|
||||
headers: {
|
||||
'Authorization': 'Basic ' + btoa(`admin:${process.env.SEARXNG_PASSWORD}`),
|
||||
}
|
||||
});
|
||||
|
||||
const searxng = new SearxngClient({ky: kyWithHeaders});
|
||||
|
||||
defTool(searxng)
|
Reference in New Issue
Block a user