Skip to content

Commit

Permalink
Merge pull request #125 from andrewnguonly/1.0.10
Browse files Browse the repository at this point in the history
PR for app version `1.0.10`
  • Loading branch information
andrewnguonly authored Mar 8, 2024
2 parents 44c5a4a + 9ec1e3b commit 5c02dfd
Show file tree
Hide file tree
Showing 15 changed files with 483 additions and 134 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

A RAG LLM co-pilot for browsing the web, powered by local LLMs.

![Screenshot of Lumos](./screenshots/lumos_screenshot_2.png)
![Screenshot of Lumos](./screenshots/lumos_screenshot_3.png)

This Chrome extension is powered by [Ollama](https://ollama.ai/). Inference is done on your local machine without any _external_ server support. However, due to security constraints in the Chrome extension platform, the app does rely on _local_ server support to run the LLM. This app is inspired by the [Chrome extension example](https://github.com/mlc-ai/web-llm/tree/main/examples/chrome-extension) provided by the [Web LLM project](https://webllm.mlc.ai/) and the [local LLM examples](https://js.langchain.com/docs/use_cases/question_answering/local_retrieval_qa) provided by [LangChain](https://github.com/langchain-ai/langchainjs).

Expand Down Expand Up @@ -98,6 +98,7 @@ Right-click on the extension icon and select `Options` to access the extension's
- **Ollama Host**: Select desired host (defaults to `http://0.0.0.0:11434`)
- **Vector Store TTL (minutes)**: Number of minutes to store a URL's content in the vector store cache.
- **Content Parser Config**: Lumos's default content parser will extract all text content between a page's `<body></body>` tag. To customize the content parser, add an entry to the configuration.
- **Enable/Disable Tools**: Enable or disable individual tools. If a tool is enabled, a custom prefix trigger (e.g. "calc:") can be specified to override the app's internal prompt classification mechanism.

### Content Parser Config

Expand Down Expand Up @@ -194,6 +195,13 @@ Alternatively, if content is highlighted on a page (e.g. highlighted text), that

Note: Content that is highlighted will not be cached in the vector store cache. Each subsequent prompt containing highlighted content will generate new embeddings.

## Shortcuts

- `cmd + c`: Copy last message to clipboard.
- `cmd + j`: Toggle `Disable content parsing` checkbox.
- `cmd + k`: Clear all messages.
- `cmd + ;`: Open/close Chat History panel.

## Multimodal

Lumos supports multimodal models! Images that are present on the current page will be downloaded and bound to the model for prompting. See documentation and examples [here](./docs/multimodal.md).
Expand Down
16 changes: 16 additions & 0 deletions docs/edge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Steps to Install on Microsoft Edge

**Warning**: Lumos was originally developed as a Chrome extension. Some features may not be compatible with Microsoft Edge.

## Start Ollama Server

Example:
```
OLLAMA_ORIGINS=chrome-extension://* ollama serve
```

Note: The host protocol is still `chrome-extension://` despite the extension running on Microsoft Edge.

## Install Lumos

Follow instructions to [Sideload an extension](https://learn.microsoft.com/en-us/microsoft-edge/extensions-chromium/getting-started/extension-sideloading) on Microsoft Edge.
24 changes: 24 additions & 0 deletions docs/linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Linux

## Add `OLLAMA_ORIGINS` Environment Variable to Ollama Startup Service

1. Follow [Ollama's instructions for adding it as a startup service](https://github.com/ollama/ollama/blob/main/docs/linux.md#adding-ollama-as-a-startup-service-recommended).
2. In the service file, set `Environment` to `"OLLAMA_ORIGINS=chrome-extension://*"`.

Example service file:
```
[Unit]
Description=Ollama Service
After=network-online.target
[Service]
Environment="OLLAMA_ORIGINS=chrome-extension://*"
ExecStart=/usr/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
```
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.0.9",
"version": "1.0.10",
"manifest_version": 3,
"name": "Lumos",
"description": "An LLM co-pilot for browsing the web, powered by local LLMs. Your prompts never leave the browser.",
Expand Down
73 changes: 19 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lumos",
"version": "1.0.9",
"version": "1.0.10",
"private": true,
"dependencies": {
"@chatscope/chat-ui-kit-react": "^1.10.1",
Expand Down Expand Up @@ -28,6 +28,7 @@
"react-syntax-highlighter": "^15.5.0",
"ts-loader": "^9.5.0",
"typescript": "^4.9.5",
"uuid": "^9.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
Binary file removed screenshots/lumos_screenshot_2.png
Binary file not shown.
Binary file added screenshots/lumos_screenshot_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5c02dfd

Please sign in to comment.