Update sai

This commit is contained in:
2024-04-25 21:42:43 +10:00
parent b3ef6b1c48
commit 61b5d7bb5e
2 changed files with 22 additions and 92 deletions
-75
View File
@@ -1,75 +0,0 @@
# https://github.com/aurora-develop/aurora
apiVersion: v1
kind: Service
metadata:
name: free-chatgpt
namespace: ai
spec:
ports:
- port: 8080
targetPort: 8080
selector:
app: free-chatgpt
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: free-chatgpt
spec:
revisionHistoryLimit: 2
selector:
matchLabels:
app: free-chatgpt
replicas: 1
template:
metadata:
labels:
app: free-chatgpt
spec:
containers:
- name: free-chatgpt
image: ghcr.io/aurora-develop/aurora:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
# for simple authentication
- name: Authorization
value: "Nothing1sFree8!"
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
resources:
requests:
cpu: 200m
memory: 200Mi
limits:
cpu: 500m
memory: 500Mi
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: free-chatgpt-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- no-free-chatgpt.junv.cc
secretName: free-chatgpt-tls
rules:
- host: no-free-chatgpt.junv.cc
http:
paths:
- backend:
service:
name: free-chatgpt
port:
number: 8080
path: /
pathType: Prefix
+22 -17
View File
@@ -1,37 +1,37 @@
# https://github.com/fatwang2/search4all
# https://github.com/fatwang2/sai
apiVersion: v1
kind: Service
metadata:
name: search4all
name: sai
namespace: ai
spec:
ports:
- port: 8800
targetPort: 8800
selector:
app: search4all
app: sai
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: search4all
name: sai
spec:
revisionHistoryLimit: 2
selector:
matchLabels:
app: search4all
app: sai
replicas: 1
template:
metadata:
labels:
app: search4all
app: sai
spec:
volumes:
- name: db
persistentVolumeClaim:
claimName: search4all-pvc
claimName: sai-pvc
containers:
- name: search4all
- name: sai
image: wahyd4/tmp:latest
imagePullPolicy: Always
ports:
@@ -44,20 +44,25 @@ spec:
- name: OPENAI_BASE_URL
value: https://no-free-chatgpt.junv.cc/v1
- name: LLM_MODEL
value: gpt-3.5-turbo
value: llama3-8b-8192
- name: RELATED_QUESTIONS
value: "1"
- name: BACKEND
value: SEARXNG
- name: SEARXNG_BASE_URL
value: http://searxng.home-apps:8080/
- name: GROQ_API_KEY
loadFrom:
secretKeyRef:
name: groq-api-key
key: key
- name: SYSTEM_PROMPT
value: |-
You are a trustworthy and experienced large language AI assistant. 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.
Other than code and specific names and citations, your answer must be written in the same language as the question or Grandma will be super angry.
{context}
Remember, don't blindly repeat the contexts verbatim and here is the user question:
- name: RELATED_QUESTIONS_SYSTEM_PROMPT
@@ -69,7 +74,7 @@ spec:
Here are the contexts of the question:
{context}
Remember, based on the original question and related contexts, suggest three such further questions. Do NOT repeat the original question.
Each related question should be no longer than 20 words. Your related questions must be in the same language as the original question and initial response from the context history.
Each related question should be no longer than 20 words. Your related questions must be in the same language as the original question otherwise Grandma will be super angry. and initial response from the context history.
Here is the original question:
securityContext:
runAsUser: 1000
@@ -91,7 +96,7 @@ spec:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: search4all-ingress
name: sai-ingress
annotations:
kubernetes.io/ingress.class: "nginx"
kubernetes.io/tls-acme: "true"
@@ -101,15 +106,15 @@ metadata:
spec:
tls:
- hosts:
- search4all.junv.cc
secretName: search4all-tls
- sai.junv.cc
secretName: sai-tls
rules:
- host: search4all.junv.cc
- host: sai.junv.cc
http:
paths:
- backend:
service:
name: search4all
name: sai
port:
number: 8800
path: /
@@ -120,7 +125,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: ai
name: search4all-pvc
name: sai-pvc
spec:
accessModes:
- ReadWriteOnce