mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
upgrades upgrades
This commit is contained in:
parent
18fe273aa4
commit
c0c7acfe60
2 changed files with 19 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from searx.search import SearchWithPlugins
|
||||
from pathlib import Path
|
||||
from gpt4all import GPT4All
|
||||
|
||||
import os
|
||||
|
||||
name = "Chat Plugin"
|
||||
description = "[REQUIRES ENGINE TOKEN] Similar to bing GPT or google bard in their respective searches"
|
||||
|
|
@ -17,8 +17,9 @@ def post_search(request, search: SearchWithPlugins) -> None:
|
|||
container.chat_box['content'] = 'Generating response to query: <br>' + f'\n{search_request.query}'
|
||||
container.chat_box['code'] = 202
|
||||
def generate_chat_content(query):
|
||||
script_directory = Path(os.path.dirname(__file__))
|
||||
model = GPT4All(model_name='gpt4all-falcon-q4_0.gguf',
|
||||
model_path=(Path.cwd() / 'searx' / 'plugins'),
|
||||
model_path=script_directory,
|
||||
allow_download=False)
|
||||
|
||||
system_template = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue