Merge pull request #2 from wahyd4/junv-improvments

SAI2
This commit is contained in:
2024-04-25 21:58:19 +10:00
committed by GitHub
6 changed files with 359 additions and 431 deletions
+1 -1
View File
@@ -5,4 +5,4 @@ SEARCH1API_KEY=
LLM_MODEL=gpt-3.5-turbo-0125
RELATED_QUESTIONS=1
NEXT_PUBLIC_GOOGLE_ANALYTICS=
CHAT_HISTORY=1
CHAT_HISTORY=1
+10 -4
View File
@@ -7,13 +7,19 @@ services:
ports:
- 8800:8800
environment:
OPENAI_API_KEY: sk-xxx
OPENAI_BASE_URL: https://api.openai.com/v1
OPENAI_API_KEY: ""
OPENAI_BASE_URL: ""
LLM_MODEL: gpt-3.5-turbo-0125
RELATED_QUESTIONS: 1
# Change your search provider name here, if use another different provider
BACKEND: SEARCH1API
BACKEND: SEARXNG
SEARXNG_BASE_URL:
# Set your search key from your provider here
SEARCH1API_KEY: xxxx
# SYSTEM_PROMPT: "You are a trustworthy and experienced AI assistant, please always use Chinese to answer the following questions with a bullet list: {context}"
SYSTEM_PROMPT: |-
You are a large language AI assistant built by AI. You are given a user question, and please write clean, concise and accurate answer to the question. You will be given a set of related contexts to the question, each starting with a reference number like [[citation:x]], where x is a number. Please use the context and cite the context at the end of each sentence if applicable.
Please cite the contexts with the reference numbers, in the format [citation:x]. If a sentence comes from multiple contexts, please list all applicable citations, like [citation:3][citation:5].
Other than code and specific names and citations, your answer must be written in the same language as the question.
{context}
Remember, don't blindly repeat the contexts verbatim and use the exact language that I ask the question to answer And here is the user question:
# RELATED_QUESTIONS_SYSTEM_PROMPT: "xxx {context} xxx"
+2 -1
View File
@@ -8,4 +8,5 @@ sqlitedict
python-dotenv
tld==0.13
tldextract==5.1.2
trafilatura==1.8.1
trafilatura==1.8.1
groq==0.5.0
Executable
+4
View File
@@ -0,0 +1,4 @@
#! /bin/bash
set -euo pipefail
sanic search4all:app --reload --debug --port 8800
+341 -424
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -9,7 +9,7 @@ export default function SearchPage() {
const rid = decodeURIComponent(searchParams.get("rid") || "");
return (
<div className="absolute inset-0 bg-[url('/ui/bg.svg')]">
<div className="mx-auto max-w-3xl absolute inset-4 md:inset-8 bg-white">
<div className="mx-auto max-w-4xl absolute inset-4 md:inset-8 bg-white">
<div className="h-20 pointer-events-none rounded-t-2xl w-full backdrop-filter absolute top-0 bg-gradient-to-t from-transparent to-white [mask-image:linear-gradient(to_bottom,white,transparent)]"></div>
<div className="px-4 md:px-8 pt-6 pb-24 rounded-2xl ring-8 ring-zinc-300/20 border border-zinc-200 h-full overflow-auto">
<Title query={query}></Title>