Unverified Commit 32619dbe authored by Timothy Jaeryang Baek's avatar Timothy Jaeryang Baek Committed by GitHub
Browse files

Merge branch 'main' into dev

parents 1fb6b13a 54555ce8
...@@ -7,32 +7,54 @@ assignees: '' ...@@ -7,32 +7,54 @@ assignees: ''
--- ---
**Describe the bug** # Bug Report
A clear and concise description of what the bug is.
## Description
**To Reproduce**
Steps to reproduce the behavior: **Bug Summary:**
1. Go to '...' [Provide a brief but clear summary of the bug]
2. Click on '....'
3. Scroll down to '....' **Steps to Reproduce:**
4. See error [Outline the steps to reproduce the bug. Be as detailed as possible.]
**Expected behavior** **Expected Behavior:**
A clear and concise description of what you expected to happen. [Describe what you expected to happen.]
**Screenshots** **Actual Behavior:**
If applicable, add screenshots to help explain your problem. [Describe what actually happened.]
**Desktop (please complete the following information):** ## Environment
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari] - **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]
- Version [e.g. 22] - **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0]
**Smartphone (please complete the following information):** ## Reproduction Details
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1] **Confirmation:**
- Browser [e.g. stock browser, safari] - [ ] I have read and followed all the instructions provided in the README.md.
- Version [e.g. 22] - [ ] I have reviewed the troubleshooting.md document.
- [ ] I have included the browser console logs.
**Additional context** - [ ] I have included the Docker container logs.
Add any other context about the problem here.
## Logs and Screenshots
**Browser Console Logs:**
[Include relevant browser console logs, if applicable]
**Docker Container Logs:**
[Include relevant Docker container logs, if applicable]
**Screenshots (if applicable):**
[Attach any relevant screenshots to help illustrate the issue]
## Installation Method
[Describe the method you used to install the project, e.g., manual installation, Docker, package manager, etc.]
## Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
## Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
ChatGPT-Style Web Interface for Ollama 🦙 ChatGPT-Style Web Interface for Ollama 🦙
**Disclaimer:** *ollama-webui is a community-driven project and is not affiliated with the Ollama team in any way. This initiative is independent, and any inquiries or feedback should be directed to [our community on Discord](https://discord.gg/5rJgQTnV4s). We kindly request users to refrain from contacting or harassing the Ollama team regarding this project.*
![Ollama Web UI Demo](./demo.gif) ![Ollama Web UI Demo](./demo.gif)
Also check our sibling project, [OllamaHub](https://ollamahub.com/), where you can discover, download, and explore customized Modelfiles for Ollama! 🦙🔍 Also check our sibling project, [OllamaHub](https://ollamahub.com/), where you can discover, download, and explore customized Modelfiles for Ollama! 🦙🔍
...@@ -123,6 +125,10 @@ docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://example.com/api --name ...@@ -123,6 +125,10 @@ docker run -d -p 3000:8080 -e OLLAMA_API_BASE_URL=https://example.com/api --name
While we strongly recommend using our convenient Docker container installation for optimal support, we understand that some situations may require a non-Docker setup, especially for development purposes. Please note that non-Docker installations are not officially supported, and you might need to troubleshoot on your own. While we strongly recommend using our convenient Docker container installation for optimal support, we understand that some situations may require a non-Docker setup, especially for development purposes. Please note that non-Docker installations are not officially supported, and you might need to troubleshoot on your own.
**Warning: Backend Dependency for Proper Functionality**
In order to ensure the seamless operation of our application, it is crucial to run both the backend and frontend components simultaneously. Serving only the frontend in isolation is not supported and may lead to unpredictable outcomes, rendering the application inoperable. Attempting to raise an issue when solely serving the frontend will not be addressed, as it falls outside the intended usage. To achieve optimal results, please strictly adhere to the specified steps outlined in this documentation. Utilize the frontend solely for building static files, and subsequently run the complete application with the provided backend commands. Failure to follow these instructions may result in unsupported configurations, and we may not be able to provide assistance in such cases. Your cooperation in following the prescribed procedures is essential for a smooth user experience and effective issue resolution.
### TL;DR 🚀 ### TL;DR 🚀
Run the following commands to install: Run the following commands to install:
......
...@@ -45,6 +45,15 @@ Becomes ...@@ -45,6 +45,15 @@ Becomes
docker run --platform linux/amd64 -d -p 3000:8080 -e OLLAMA_API_BASE_URL=http://example.com:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main docker run --platform linux/amd64 -d -p 3000:8080 -e OLLAMA_API_BASE_URL=http://example.com:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main
``` ```
## Running ollama-webui as a container on WSL Ubuntu
If you're running ollama-webui via docker on WSL Ubuntu and have chosen to install webui and ollama separately, you might encounter connection issues. This is often due to the docker container being unable to reach the Ollama server at 127.0.0.1:11434. To resolve this, you can use the `--network=host` flag in the docker command.
Here's an example of the command you should run:
```bash
docker run -d --network=host -e OLLAMA_API_BASE_URL=http://127.0.0.1:11434/api --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main
```
## References ## References
[Change Docker Desktop Settings on Mac](https://docs.docker.com/desktop/settings/mac/) Search for "x86" in that page. [Change Docker Desktop Settings on Mac](https://docs.docker.com/desktop/settings/mac/) Search for "x86" in that page.
......
This diff is collapsed.
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"scripts": { "scripts": {
"start": "http-server ./build -P http://localhost:8080?",
"dev": "vite dev --host", "dev": "vite dev --host",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",
...@@ -42,7 +41,6 @@ ...@@ -42,7 +41,6 @@
"@sveltejs/adapter-node": "^1.3.1", "@sveltejs/adapter-node": "^1.3.1",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"highlight.js": "^11.9.0", "highlight.js": "^11.9.0",
"http-server": "^14.1.1",
"idb": "^7.1.1", "idb": "^7.1.1",
"js-sha256": "^0.10.1", "js-sha256": "^0.10.1",
"katex": "^0.16.9", "katex": "^0.16.9",
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { settings } from '$lib/stores'; import { settings } from '$lib/stores';
import toast from 'svelte-french-toast'; import toast from 'svelte-french-toast';
import Suggestions from './MessageInput/Suggestions.svelte'; import Suggestions from './MessageInput/Suggestions.svelte';
import { onMount } from 'svelte';
export let submitPrompt: Function; export let submitPrompt: Function;
export let stopResponse: Function; export let stopResponse: Function;
...@@ -11,6 +12,7 @@ ...@@ -11,6 +12,7 @@
let filesInputElement; let filesInputElement;
let inputFiles; let inputFiles;
let dragged = false;
export let files = []; export let files = [];
...@@ -82,8 +84,74 @@ ...@@ -82,8 +84,74 @@
} }
} }
}; };
onMount(() => {
const dropZone = document.querySelector('body');
dropZone?.addEventListener('dragover', (e) => {
e.preventDefault();
dragged = true;
});
dropZone.addEventListener('drop', (e) => {
e.preventDefault();
console.log(e);
if (e.dataTransfer?.files) {
let reader = new FileReader();
reader.onload = (event) => {
files = [
...files,
{
type: 'image',
url: `${event.target.result}`
}
];
};
if (
e.dataTransfer?.files &&
e.dataTransfer?.files.length > 0 &&
['image/gif', 'image/jpeg', 'image/png'].includes(e.dataTransfer?.files[0]['type'])
) {
reader.readAsDataURL(e.dataTransfer?.files[0]);
} else {
toast.error(`Unsupported File Type '${e.dataTransfer?.files[0]['type']}'.`);
}
}
dragged = false;
});
dropZone?.addEventListener('dragleave', () => {
dragged = false;
});
});
</script> </script>
{#if dragged}
<div
class="absolute w-full h-full flex z-50 touch-none pointer-events-none"
id="dropzone"
role="region"
aria-label="Drag and Drop Container"
>
<div class="absolute rounded-xl w-full h-full backdrop-blur bg-gray-800/40 flex justify-center">
<div class="m-auto pt-48 flex flex-col justify-center">
<div class="max-w-md">
<div class=" text-center text-6xl mb-3">🏞️</div>
<div class="text-center dark:text-white text-2xl font-semibold z-50">Add Images</div>
<div class=" mt-2 text-center text-sm dark:text-gray-200 w-full">
Drop any images here to add to the conversation
</div>
</div>
</div>
</div>
</div>
{/if}
<div class="fixed bottom-0 w-full"> <div class="fixed bottom-0 w-full">
<div class="px-2.5 pt-2.5 -mb-0.5 mx-auto inset-x-0 bg-transparent flex justify-center"> <div class="px-2.5 pt-2.5 -mb-0.5 mx-auto inset-x-0 bg-transparent flex justify-center">
{#if messages.length == 0 && suggestionPrompts.length !== 0} {#if messages.length == 0 && suggestionPrompts.length !== 0}
......
...@@ -469,7 +469,12 @@ ...@@ -469,7 +469,12 @@
{#each message.files as file} {#each message.files as file}
<div> <div>
{#if file.type === 'image'} {#if file.type === 'image'}
<img src={file.url} alt="input" class=" max-h-96 rounded-lg" /> <img
src={file.url}
alt="input"
class=" max-h-96 rounded-lg"
draggable="false"
/>
{/if} {/if}
</div> </div>
{/each} {/each}
......
...@@ -236,36 +236,39 @@ ...@@ -236,36 +236,39 @@
<div <div
class="absolute rounded-xl w-full h-full backdrop-blur bg-gray-900/60 flex justify-center" class="absolute rounded-xl w-full h-full backdrop-blur bg-gray-900/60 flex justify-center"
> >
<div class="m-auto pb-44"> <div class="m-auto pb-44 flex flex-col justify-center">
<div class="text-center dark:text-white text-2xl font-medium z-50"> <div class="max-w-md">
Ollama Update Required <div class="text-center dark:text-white text-2xl font-medium z-50">
</div> Connection Issue or Update Needed
</div>
<div class=" mt-4 text-center max-w-md text-sm dark:text-gray-200">
Oops! It seems like your Ollama needs a little attention. <br <div class=" mt-4 text-center text-sm dark:text-gray-200 w-full">
class=" hidden sm:flex" Oops! It seems like your Ollama needs a little attention. <br
/> class=" hidden sm:flex"
We encountered a connection issue or noticed that you're running an outdated version. Please />We've detected either a connection hiccup or observed that you're using an older
update to version. Ensure you're on the latest Ollama version
<span class=" dark:text-white font-medium">{requiredOllamaVersion} or above</span>. <br class=" hidden sm:flex" />(version
</div> <span class=" dark:text-white font-medium">{requiredOllamaVersion} or higher</span>)
or check your connection.
<div class=" mt-6 mx-auto relative group w-fit"> </div>
<button
class="relative z-20 flex px-5 py-2 rounded-full bg-gray-100 hover:bg-gray-200 transition font-medium text-sm" <div class=" mt-6 mx-auto relative group w-fit">
on:click={async () => { <button
await setOllamaVersion(await getOllamaVersion()); class="relative z-20 flex px-5 py-2 rounded-full bg-gray-100 hover:bg-gray-200 transition font-medium text-sm"
}} on:click={async () => {
> await setOllamaVersion(await getOllamaVersion());
Check Again }}
</button> >
Check Again
<button </button>
class="text-xs text-center w-full mt-2 text-gray-400 underline"
on:click={async () => { <button
await setOllamaVersion(requiredOllamaVersion); class="text-xs text-center w-full mt-2 text-gray-400 underline"
}}>Close</button on:click={async () => {
> await setOllamaVersion(requiredOllamaVersion);
}}>Close</button
>
</div>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment