jorge-menjivar / unsaged

Open source chat kit engineered for seamless interaction with AI models.
https://unsaged.com
Apache License 2.0
247 stars 77 forks source link

[WIP] Desktop applications #125

Closed jorge-menjivar closed 8 months ago

jorge-menjivar commented 9 months ago

Work in progress. This pull request has the code for building Windows, macOS, and Linux applications. This will become a separate app in the monorepo, although this app also contains many updates that will also be merged into the web app.

The following are the things that will differentiate the desktop app:

Progress:

Instructions to run desktop app:

  1. Make sure that you have all of Tauri's prerequisites: https://tauri.app/v1/guides/getting-started/prerequisites/
  2. pnpm install
  3. cd apps/desktop
  4. pnpm tauri dev

Optional

You shouldn't have to do this for ollama to work, but I'm leaving this just in case. To access ollama models you must set the env variable OLLAMA_ORIGINS=*://localhost for the ollama service.

Their documentation is not very clear, so here's my guide:

Linux

  1. Add the following content to /etc/systemd/system/ollama.service.d/environment.conf. You may need to create the file and directory.

    [Service]
    Environment="OLLAMA_ORIGINS=*://localhost"
  2. Run

    sudo systemctl daemon-reload
    sudo systemctl restart ollama

macOS

  1. Run OLLAMA_ORIGINS=*://localhost ollama serve

Ollama documentation source

vercel[bot] commented 9 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unsaged ❌ Failed (Inspect) Dec 23, 2023 2:50am
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **unsaged-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/jorge-menjivar/unsaged-docs/GjYQ1jhUREEgDfvmqahZX8P3J6Ve)) | [Visit Preview](https://unsaged-docs-git-desktop-app-jorge-menjivar.vercel.app) | | Dec 23, 2023 2:50am |
sebiweise commented 9 months ago

I think we should create a new directory for your changes so our monorepo structure will look like this: apps docs desktop web

packages eslint-config-custom tsconfig shared-code (coming later)

Bortus-AI commented 9 months ago

I think we should create a new directory for your changes so our monorepo structure will look like this: apps docs desktop web

packages eslint-config-custom tsconfig shared-code (coming later)

Good idea!

jorge-menjivar commented 9 months ago

The streaming functions and ollama model fetcher are now rusty. Running outside the browser environment allows us to skip CORS checks by the browser. This means that the optional section is no longer needed and ollama should work out of the box.

jorge-menjivar commented 8 months ago

Closing this in favor of #165 to make it easier to merge