mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-03 12:23:02 +01:00
Merge branch 'master' of github.com:khoj-ai/khoj into improve-debug-reasoning-and-other-misc-fixes
This commit is contained in:
commit
19241805ee
3 changed files with 70 additions and 35 deletions
|
@ -27,7 +27,28 @@ If you want to use the offline chat model and you have a GPU, you should use Ins
|
|||
<Tabs groupId="operating-systems" queryString="os">
|
||||
<TabItem value="macos" label="MacOS">
|
||||
<h3>Prerequisites</h3>
|
||||
Install [Docker Desktop](https://docs.docker.com/desktop/install/mac-install/)
|
||||
<h4>Docker</h4>
|
||||
(Option 1) Click here to install [Docker Desktop](https://docs.docker.com/desktop/install/mac-install/). Make sure you also install the [Docker Compose](https://docs.docker.com/desktop/install/mac-install/) tool.
|
||||
|
||||
(Option 2) Use [Homebrew](https://brew.sh/) to install Docker and Docker Compose.
|
||||
```shell
|
||||
brew install --cask docker
|
||||
brew install docker-compose
|
||||
```
|
||||
<h3>Setup</h3>
|
||||
1. Download the Khoj docker-compose.yml file [from Github](https://github.com/khoj-ai/khoj/blob/master/docker-compose.yml)
|
||||
```shell
|
||||
mkdir ~/.khoj && cd ~/.khoj
|
||||
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
|
||||
```
|
||||
2. Configure the environment variables in the docker-compose.yml
|
||||
- Set `KHOJ_ADMIN_PASSWORD`, `KHOJ_DJANGO_SECRET_KEY` (and optionally the `KHOJ_ADMIN_EMAIL`) to something secure. This allows you to customize Khoj later via the admin panel.
|
||||
- Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` to your API key if you want to use OpenAI, Anthropic or Gemini chat models respectively.
|
||||
3. Start Khoj by running the following command in the same directory as your docker-compose.yml file.
|
||||
```shell
|
||||
cd ~/.khoj
|
||||
docker-compose up
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="windows" label="Windows">
|
||||
<h3>Prerequisites</h3>
|
||||
|
@ -37,30 +58,47 @@ If you want to use the offline chat model and you have a GPU, you should use Ins
|
|||
wsl --install
|
||||
```
|
||||
2. Install [Docker Desktop](https://docs.docker.com/desktop/install/windows-install/) with **[WSL2 backend](https://docs.docker.com/desktop/wsl/#turn-on-docker-desktop-wsl-2)** (default)
|
||||
|
||||
<h3>Setup</h3>
|
||||
1. Download the Khoj docker-compose.yml file [from Github](https://github.com/khoj-ai/khoj/blob/master/docker-compose.yml)
|
||||
```shell
|
||||
# Windows users should use their WSL2 terminal to run these commands
|
||||
mkdir ~/.khoj && cd ~/.khoj
|
||||
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
|
||||
```
|
||||
2. Configure the environment variables in the docker-compose.yml
|
||||
- Set `KHOJ_ADMIN_PASSWORD`, `KHOJ_DJANGO_SECRET_KEY` (and optionally the `KHOJ_ADMIN_EMAIL`) to something secure. This allows you to customize Khoj later via the admin panel.
|
||||
- Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` to your API key if you want to use OpenAI, Anthropic or Gemini chat models respectively.
|
||||
3. Start Khoj by running the following command in the same directory as your docker-compose.yml file.
|
||||
```shell
|
||||
# Windows users should use their WSL2 terminal to run these commands
|
||||
cd ~/.khoj
|
||||
docker-compose up
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="linux" label="Linux">
|
||||
<h3>Prerequisites</h3>
|
||||
Install [Docker Desktop](https://docs.docker.com/desktop/install/linux/).
|
||||
You can also use your package manager to install Docker Engine & Docker Compose.
|
||||
|
||||
<h3>Setup</h3>
|
||||
1. Download the Khoj docker-compose.yml file [from Github](https://github.com/khoj-ai/khoj/blob/master/docker-compose.yml)
|
||||
```shell
|
||||
mkdir ~/.khoj && cd ~/.khoj
|
||||
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
|
||||
```
|
||||
2. Configure the environment variables in the docker-compose.yml
|
||||
- Set `KHOJ_ADMIN_PASSWORD`, `KHOJ_DJANGO_SECRET_KEY` (and optionally the `KHOJ_ADMIN_EMAIL`) to something secure. This allows you to customize Khoj later via the admin panel.
|
||||
- Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` to your API key if you want to use OpenAI, Anthropic or Gemini chat models respectively.
|
||||
3. Start Khoj by running the following command in the same directory as your docker-compose.yml file.
|
||||
```shell
|
||||
cd ~/.khoj
|
||||
docker-compose up
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<h3>Setup</h3>
|
||||
1. Download the Khoj docker-compose.yml file [from Github](https://github.com/khoj-ai/khoj/blob/master/docker-compose.yml)
|
||||
```shell
|
||||
# Windows users should use their WSL2 terminal to run these commands
|
||||
mkdir ~/.khoj && cd ~/.khoj
|
||||
wget https://raw.githubusercontent.com/khoj-ai/khoj/master/docker-compose.yml
|
||||
```
|
||||
2. Configure the environment variables in the docker-compose.yml
|
||||
- Set `KHOJ_ADMIN_PASSWORD`, `KHOJ_DJANGO_SECRET_KEY` (and optionally the `KHOJ_ADMIN_EMAIL`) to something secure. This allows you to customize Khoj later via the admin panel.
|
||||
- Set `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `GEMINI_API_KEY` to your API key if you want to use OpenAI, Anthropic or Gemini chat models respectively.
|
||||
3. Start Khoj by running the following command in the same directory as your docker-compose.yml file.
|
||||
```shell
|
||||
# Windows users should use their WSL2 terminal to run these commands
|
||||
cd ~/.khoj
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
|
||||
:::info[Remote Access]
|
||||
By default Khoj is only accessible on the machine it is running. To access Khoj from a remote machine see [Remote Access Docs](/advanced/remote).
|
||||
|
|
|
@ -26,6 +26,17 @@ import { Moon, Sun, UserCircle, Question, GearFine, ArrowRight } from "@phosphor
|
|||
import { KhojAgentLogo, KhojAutomationLogo, KhojSearchLogo } from "../logo/khojLogo";
|
||||
import { useIsMobileWidth } from "@/app/common/utils";
|
||||
|
||||
function SubscriptionBadge({ is_active }: { is_active: boolean }) {
|
||||
return (
|
||||
<div className="flex flex-row items-center">
|
||||
<div
|
||||
className={`w-3 h-3 rounded-full ${is_active ? "bg-yellow-500" : "bg-muted"} mr-1`}
|
||||
></div>
|
||||
<p className="text-xs">{is_active ? "Futurist" : "Free"}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function NavMenu() {
|
||||
const userData = useAuthenticatedData();
|
||||
const [darkMode, setDarkMode] = useState(false);
|
||||
|
@ -85,8 +96,9 @@ export default function NavMenu() {
|
|||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="gap-2">
|
||||
<DropdownMenuItem className="w-full">
|
||||
<div className="flex flex-rows">
|
||||
<div className="flex flex-col">
|
||||
<p className="font-semibold">{userData?.email}</p>
|
||||
<SubscriptionBadge is_active={userData?.is_active ?? false} />
|
||||
</div>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
|
@ -192,8 +204,9 @@ export default function NavMenu() {
|
|||
</MenubarTrigger>
|
||||
<MenubarContent align="end" className="rounded-xl gap-2">
|
||||
<MenubarItem className="w-full">
|
||||
<div className="flex flex-rows">
|
||||
<div className="flex flex-col">
|
||||
<p className="font-semibold">{userData?.email}</p>
|
||||
<SubscriptionBadge is_active={userData?.is_active ?? false} />
|
||||
</div>
|
||||
</MenubarItem>
|
||||
<MenubarSeparator className="dark:bg-white height-[2px] bg-black" />
|
||||
|
|
|
@ -193,7 +193,6 @@ you need to convert the user's query to a description format that the novice art
|
|||
- ellipse
|
||||
- line
|
||||
- arrow
|
||||
- frame
|
||||
|
||||
use these primitives to describe what sort of diagram the drawer should create. the artist must recreate the diagram every time, so include all relevant prior information in your description.
|
||||
|
||||
|
@ -284,21 +283,6 @@ For text, you must use the `text` property to specify the text to be rendered. Y
|
|||
text: string,
|
||||
}}
|
||||
|
||||
For frames, use the `children` property to specify the elements that are inside the frame by their ids.
|
||||
|
||||
{{
|
||||
type: "frame",
|
||||
id: string,
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number,
|
||||
name: string,
|
||||
children: [
|
||||
string
|
||||
]
|
||||
}}
|
||||
|
||||
Here's an example of a valid diagram:
|
||||
|
||||
Design Description: Create a diagram describing a circular development process with 3 stages: design, implementation and feedback. The design stage is connected to the implementation stage and the implementation stage is connected to the feedback stage and the feedback stage is connected to the design stage. Each stage should be labeled with the stage name.
|
||||
|
|
Loading…
Reference in a new issue