mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-09-19 07:41:33 +00:00
Compare commits
13 Commits
v1.11.0-rc
...
0bb8b7ec5c
Author | SHA1 | Date | |
---|---|---|---|
|
0bb8b7ec5c | ||
|
0024ce36c8 | ||
|
c44e746807 | ||
|
b1826066f4 | ||
|
b0b8acc45b | ||
|
e2b9ffc072 | ||
|
3b46baca4f | ||
|
772e461c08 | ||
|
5c6018a0f9 | ||
|
0b7989c3d3 | ||
|
8cfcc3e39c | ||
|
9eba4b7373 | ||
|
91306dc0c7 |
@@ -90,6 +90,7 @@ There are mainly 2 ways of installing Perplexica - With Docker, Without Docker.
|
|||||||
- `OLLAMA`: Your Ollama API URL. You should enter it as `http://host.docker.internal:PORT_NUMBER`. If you installed Ollama on port 11434, use `http://host.docker.internal:11434`. For other ports, adjust accordingly. **You need to fill this if you wish to use Ollama's models instead of OpenAI's**.
|
- `OLLAMA`: Your Ollama API URL. You should enter it as `http://host.docker.internal:PORT_NUMBER`. If you installed Ollama on port 11434, use `http://host.docker.internal:11434`. For other ports, adjust accordingly. **You need to fill this if you wish to use Ollama's models instead of OpenAI's**.
|
||||||
- `GROQ`: Your Groq API key. **You only need to fill this if you wish to use Groq's hosted models**.
|
- `GROQ`: Your Groq API key. **You only need to fill this if you wish to use Groq's hosted models**.
|
||||||
- `ANTHROPIC`: Your Anthropic API key. **You only need to fill this if you wish to use Anthropic models**.
|
- `ANTHROPIC`: Your Anthropic API key. **You only need to fill this if you wish to use Anthropic models**.
|
||||||
|
- `Gemini`: Your Gemini API key. **You only need to fill this if you wish to use Google's models**.
|
||||||
|
|
||||||
**Note**: You can change these after starting Perplexica from the settings dialog.
|
**Note**: You can change these after starting Perplexica from the settings dialog.
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ There are mainly 2 ways of installing Perplexica - With Docker, Without Docker.
|
|||||||
2. Clone the repository and rename the `sample.config.toml` file to `config.toml` in the root directory. Ensure you complete all required fields in this file.
|
2. Clone the repository and rename the `sample.config.toml` file to `config.toml` in the root directory. Ensure you complete all required fields in this file.
|
||||||
3. After populating the configuration run `npm i`.
|
3. After populating the configuration run `npm i`.
|
||||||
4. Install the dependencies and then execute `npm run build`.
|
4. Install the dependencies and then execute `npm run build`.
|
||||||
5. Finally, start the app by running `npm rum start`
|
5. Finally, start the app by running `npm run start`
|
||||||
|
|
||||||
**Note**: Using Docker is recommended as it simplifies the setup process, especially for managing environment variables and dependencies.
|
**Note**: Using Docker is recommended as it simplifies the setup process, especially for managing environment variables and dependencies.
|
||||||
|
|
||||||
|
@@ -41,6 +41,6 @@ To update Perplexica to the latest version, follow these steps:
|
|||||||
3. Check for changes in the configuration files. If the `sample.config.toml` file contains new fields, delete your existing `config.toml` file, rename `sample.config.toml` to `config.toml`, and update the configuration accordingly.
|
3. Check for changes in the configuration files. If the `sample.config.toml` file contains new fields, delete your existing `config.toml` file, rename `sample.config.toml` to `config.toml`, and update the configuration accordingly.
|
||||||
4. After populating the configuration run `npm i`.
|
4. After populating the configuration run `npm i`.
|
||||||
5. Install the dependencies and then execute `npm run build`.
|
5. Install the dependencies and then execute `npm run build`.
|
||||||
6. Finally, start the app by running `npm rum start`
|
6. Finally, start the app by running `npm run start`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { Settings } from 'lucide-react';
|
import { Settings } from 'lucide-react';
|
||||||
import EmptyChatMessageInput from './EmptyChatMessageInput';
|
import EmptyChatMessageInput from './EmptyChatMessageInput';
|
||||||
import { useEffect, useState } from 'react';
|
|
||||||
import { File } from './ChatWindow';
|
import { File } from './ChatWindow';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import WeatherWidget from './WeatherWidget';
|
import WeatherWidget from './WeatherWidget';
|
||||||
@@ -34,21 +33,23 @@ const EmptyChat = ({
|
|||||||
<Settings className="cursor-pointer lg:hidden" />
|
<Settings className="cursor-pointer lg:hidden" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-8">
|
<div className="flex flex-col items-center justify-center min-h-screen max-w-screen-sm mx-auto p-2 space-y-4">
|
||||||
<h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
|
<div className="flex flex-col items-center justify-center w-full space-y-8">
|
||||||
Research begins here.
|
<h2 className="text-black/70 dark:text-white/70 text-3xl font-medium -mt-8">
|
||||||
</h2>
|
Research begins here.
|
||||||
<EmptyChatMessageInput
|
</h2>
|
||||||
sendMessage={sendMessage}
|
<EmptyChatMessageInput
|
||||||
focusMode={focusMode}
|
sendMessage={sendMessage}
|
||||||
setFocusMode={setFocusMode}
|
focusMode={focusMode}
|
||||||
optimizationMode={optimizationMode}
|
setFocusMode={setFocusMode}
|
||||||
setOptimizationMode={setOptimizationMode}
|
optimizationMode={optimizationMode}
|
||||||
fileIds={fileIds}
|
setOptimizationMode={setOptimizationMode}
|
||||||
setFileIds={setFileIds}
|
fileIds={fileIds}
|
||||||
files={files}
|
setFileIds={setFileIds}
|
||||||
setFiles={setFiles}
|
files={files}
|
||||||
/>
|
setFiles={setFiles}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<div className="flex flex-col w-full gap-4 mt-2 sm:flex-row sm:justify-center">
|
<div className="flex flex-col w-full gap-4 mt-2 sm:flex-row sm:justify-center">
|
||||||
<div className="flex-1 max-w-xs">
|
<div className="flex-1 max-w-xs">
|
||||||
<WeatherWidget />
|
<WeatherWidget />
|
||||||
|
@@ -31,30 +31,40 @@ const WeatherWidget = () => {
|
|||||||
city: string;
|
city: string;
|
||||||
}) => void,
|
}) => void,
|
||||||
) => {
|
) => {
|
||||||
/*
|
if (navigator.geolocation) {
|
||||||
// Geolocation doesn't give city so we'll country using ipapi for now
|
const result = await navigator.permissions.query({
|
||||||
if (navigator.geolocation) {
|
name: 'geolocation',
|
||||||
const result = await navigator.permissions.query({
|
});
|
||||||
name: 'geolocation',
|
|
||||||
})
|
|
||||||
|
|
||||||
if (result.state === 'granted') {
|
if (result.state === 'granted') {
|
||||||
navigator.geolocation.getCurrentPosition(position => {
|
navigator.geolocation.getCurrentPosition(async (position) => {
|
||||||
callback({
|
const res = await fetch(
|
||||||
latitude: position.coords.latitude,
|
`https://api-bdc.io/data/reverse-geocode-client?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}&localityLanguage=en`,
|
||||||
longitude: position.coords.longitude,
|
{
|
||||||
})
|
method: 'GET',
|
||||||
})
|
headers: {
|
||||||
} else if (result.state === 'prompt') {
|
'Content-Type': 'application/json',
|
||||||
callback(await getApproxLocation())
|
},
|
||||||
navigator.geolocation.getCurrentPosition(position => {})
|
},
|
||||||
} else if (result.state === 'denied') {
|
);
|
||||||
callback(await getApproxLocation())
|
|
||||||
}
|
const data = await res.json();
|
||||||
} else {
|
|
||||||
callback(await getApproxLocation())
|
callback({
|
||||||
} */
|
latitude: position.coords.latitude,
|
||||||
callback(await getApproxLocation());
|
longitude: position.coords.longitude,
|
||||||
|
city: data.locality,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else if (result.state === 'prompt') {
|
||||||
|
callback(await getApproxLocation());
|
||||||
|
navigator.geolocation.getCurrentPosition((position) => {});
|
||||||
|
} else if (result.state === 'denied') {
|
||||||
|
callback(await getApproxLocation());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback(await getApproxLocation());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
getLocation(async (location) => {
|
getLocation(async (location) => {
|
||||||
|
@@ -13,9 +13,17 @@ import { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
|||||||
import { Embeddings } from '@langchain/core/embeddings';
|
import { Embeddings } from '@langchain/core/embeddings';
|
||||||
|
|
||||||
const geminiChatModels: Record<string, string>[] = [
|
const geminiChatModels: Record<string, string>[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Gemini 2.5 Flash Preview 05-20',
|
||||||
|
key: 'gemini-2.5-flash-preview-05-20',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Gemini 2.5 Pro Preview',
|
||||||
|
key: 'gemini-2.5-pro-preview-05-06',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Gemini 2.5 Pro Experimental',
|
displayName: 'Gemini 2.5 Pro Experimental',
|
||||||
key: 'gemini-2.5-pro-exp-03-25',
|
key: 'gemini-2.5-pro-preview-05-06',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Gemini 2.0 Flash',
|
displayName: 'Gemini 2.0 Flash',
|
||||||
|
Reference in New Issue
Block a user