-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from n4ze3m/next
v1.1.7
- Loading branch information
Showing
56 changed files
with
782 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,4 +42,7 @@ keys.json | |
|
||
# typescript | ||
.tsbuildinfo | ||
.wxt | ||
# WXT | ||
.wxt | ||
# WebStorm | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Ollama Connection Issues | ||
|
||
Connection issues can be caused by a number of reasons. Here are some common issues and how to resolve them on Page Assist. You will see the following error message if there is a connection issue: | ||
|
||
### 1. Direct Connection Error | ||
![Direct connection error](https://image.pageassist.xyz/Screenshot%202024-05-13%20001742.png) | ||
|
||
### 2. `403` Error When Sending a Message | ||
![403 error when sending a message](https://image.pageassist.xyz/Screenshot%202024-05-13%20001940.png) | ||
|
||
This issue usually occurs when Ollama is not running on [http://127.0.0.1:11434/](http://127.0.0.1:11434/), and the connection is from the private network or a different network. | ||
|
||
### Solutions | ||
|
||
Since Ollama has connection issues when directly accessed from the browser extension, Page Assist rewrites the request headers to make it work. However, automatic rewriting of headers only works on `http://127.0.0.1:*` and `http://localhost:*` URLs. To resolve the connection issue, you can try the following solutions: | ||
|
||
1. Go to Page Assist and click on the `Settings` icon. | ||
|
||
2. Click on the `Ollama Settings` tab. | ||
|
||
3. There you will see the `Advance Ollama URL Configuration` option. You need to expand it. | ||
|
||
![Advance Ollama URL Configuration](https://image.pageassist.xyz/Screenshot%202024-05-13%20003123.png) | ||
|
||
4. Enable the `Enable or Disable Custom Origin URL` option. | ||
|
||
![Enable or Disable Custom Origin URL](https://image.pageassist.xyz/Screenshot%202024-05-13%20003225.png) | ||
|
||
5. (Optional) If Ollama is running on a different port or host, then change the URL in the `Custom Origin URL` field; otherwise, leave it as it is. | ||
|
||
This will resolve the connection issue, and you will be able to use Ollama without any issues on Page Assist ❤ | ||
|
||
If you still face any issues, feel free to contact us [here](https://github.com/n4ze3m/page-assist/issues/new), and we will be happy to help you out. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { useStorage } from "@plasmohq/storage/hook" | ||
import { Input, Switch } from "antd" | ||
import { useTranslation } from "react-i18next" | ||
|
||
export const AdvanceOllamaSettings = () => { | ||
const [urlRewriteEnabled, setUrlRewriteEnabled] = useStorage( | ||
"urlRewriteEnabled", | ||
false | ||
) | ||
|
||
const [rewriteUrl, setRewriteUrl] = useStorage( | ||
"rewriteUrl", | ||
"http://127.0.0.1:11434" | ||
) | ||
const { t } = useTranslation("settings") | ||
|
||
return ( | ||
<div className="space-y-4"> | ||
<div className="flex sm:flex-row flex-col space-y-4 sm:space-y-0 sm:justify-between"> | ||
<span className="text-gray-500 dark:text-neutral-50 "> | ||
{t("ollamaSettings.settings.advanced.urlRewriteEnabled.label")} | ||
</span> | ||
<div> | ||
<Switch | ||
className="mt-4 sm:mt-0" | ||
checked={urlRewriteEnabled} | ||
onChange={(checked) => setUrlRewriteEnabled(checked)} | ||
/> | ||
</div> | ||
</div> | ||
<div className="flex flex-col space-y-4 sm:space-y-0 sm:justify-between"> | ||
<span className="text-gray-500 dark:text-neutral-50 mb-3"> | ||
{t("ollamaSettings.settings.advanced.rewriteUrl.label")} | ||
</span> | ||
<div> | ||
<Input | ||
className="w-full" | ||
value={rewriteUrl} | ||
disabled={!urlRewriteEnabled} | ||
placeholder={t( | ||
"ollamaSettings.settings.advanced.rewriteUrl.placeholder" | ||
)} | ||
onChange={(e) => setRewriteUrl(e.target.value)} | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
export const PageAssistLoader = () => { | ||
return ( | ||
<div className="fixed bg-[#171717] top-0 left-0 right-0 bottom-0 w-full h-screen z-50 overflow-hidden opacity-75 flex flex-col items-center justify-center"> | ||
<p className="text-center text-white text-lg mt-4"> | ||
Loading... | ||
</p> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.