mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-22 15:28:13 +00:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
88ae67065b | ||
|
f35d12f94c | ||
|
3d17975d83 | ||
|
950717e0cf | ||
|
4f39b5746a |
Binary file not shown.
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
@@ -1,37 +0,0 @@
|
|||||||
FROM node:24.5.0-slim AS builder
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y python3 python3-pip sqlite3 && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /home/perplexica
|
|
||||||
|
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
RUN yarn install --frozen-lockfile --network-timeout 600000
|
|
||||||
|
|
||||||
COPY tsconfig.json next.config.mjs next-env.d.ts postcss.config.js drizzle.config.ts tailwind.config.ts ./
|
|
||||||
COPY src ./src
|
|
||||||
COPY public ./public
|
|
||||||
COPY drizzle ./drizzle
|
|
||||||
|
|
||||||
RUN mkdir -p /home/perplexica/data
|
|
||||||
RUN yarn build
|
|
||||||
|
|
||||||
FROM node:24.5.0-slim
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y python3 python3-pip sqlite3 && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /home/perplexica
|
|
||||||
|
|
||||||
COPY --from=builder /home/perplexica/public ./public
|
|
||||||
COPY --from=builder /home/perplexica/.next/static ./public/_next/static
|
|
||||||
|
|
||||||
COPY --from=builder /home/perplexica/.next/standalone ./
|
|
||||||
COPY --from=builder /home/perplexica/data ./data
|
|
||||||
COPY drizzle ./drizzle
|
|
||||||
|
|
||||||
RUN mkdir /home/perplexica/uploads
|
|
||||||
|
|
||||||
COPY entrypoint.sh ./entrypoint.sh
|
|
||||||
RUN chmod +x ./entrypoint.sh
|
|
||||||
RUN sed -i 's/\r$//' ./entrypoint.sh || true
|
|
||||||
|
|
||||||
CMD ["/home/perplexica/entrypoint.sh"]
|
|
@@ -11,14 +11,16 @@ const ModelSelect = ({
|
|||||||
type: 'chat' | 'embedding';
|
type: 'chat' | 'embedding';
|
||||||
}) => {
|
}) => {
|
||||||
const [selectedModel, setSelectedModel] = useState<string>(
|
const [selectedModel, setSelectedModel] = useState<string>(
|
||||||
`${providers[0]?.id}/${providers[0].embeddingModels[0]?.key}`,
|
type === 'chat'
|
||||||
|
? `${localStorage.getItem('chatModelProviderId')}/${localStorage.getItem('chatModelKey')}`
|
||||||
|
: `${localStorage.getItem('embeddingModelProviderId')}/${localStorage.getItem('embeddingModelKey')}`,
|
||||||
);
|
);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const handleSave = async (newValue: string) => {
|
const handleSave = async (newValue: string) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
setSelectedModel(newValue);
|
setSelectedModel(newValue);
|
||||||
console.log(newValue);
|
|
||||||
try {
|
try {
|
||||||
if (type === 'chat') {
|
if (type === 'chat') {
|
||||||
localStorage.setItem('chatModelProviderId', newValue.split('/')[0]);
|
localStorage.setItem('chatModelProviderId', newValue.split('/')[0]);
|
||||||
|
@@ -50,6 +50,25 @@ class ConfigManager {
|
|||||||
'e.g., "Respond in a friendly and concise tone" or "Use British English and format answers as bullet points."',
|
'e.g., "Respond in a friendly and concise tone" or "Use British English and format answers as bullet points."',
|
||||||
scope: 'client',
|
scope: 'client',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Measurement Unit',
|
||||||
|
key: 'measureUnit',
|
||||||
|
type: 'select',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Imperial',
|
||||||
|
value: 'Imperial',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Metric',
|
||||||
|
value: 'Metric',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
required: false,
|
||||||
|
description: 'Choose between Metric and Imperial measurement unit.',
|
||||||
|
default: 'Metric',
|
||||||
|
scope: 'client',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
modelProviders: [],
|
modelProviders: [],
|
||||||
search: [
|
search: [
|
||||||
|
Reference in New Issue
Block a user