Skip to content

Commit

Permalink
Add Edge and Brave support
Browse files Browse the repository at this point in the history
  • Loading branch information
ianarawjo committed Aug 3, 2023
1 parent 3fbc88a commit ce897b5
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions INSTALL_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ The simplest and safest way to install the latest public build of ChainForge is
```
> **Note**
> If you'd like to run ChainForge on a different hostname and port, specify `--host` and `--port`. For instance, ```chainforge serve --host 0.0.0.0 --port 3400```
5. Open [localhost:8000](http://localhost:8000/) on a recent version of Google Chrome or Mozilla Firefox.
5. Open [localhost:8000](http://localhost:8000/) on a recent version of Google Chrome, Mozilla Firefox, Microsoft Edge (Chromium), or Brave browser.

> **Note**
> ChainForge beta version currently does not support other browsers, but if you want support, please open an Issue or make a Pull Request. The main barrier at the moment is that CSS formatting is slightly different for Safari, Edge etc.; to fix this, we'd need to correct said formatting problems.
> ChainForge beta version currently does not support other browsers, but if you want support, please open an Issue or make a Pull Request. The main barrier at the moment is that CSS formatting is slightly different for Safari and other browsers; to fix this, we'd need to correct said formatting problems.
## Step 2. Get and set API keys for certain model providers

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Once installed, do
chainforge serve
```

Open [localhost:8000](http://localhost:8000/) in a Google Chrome or Firefox browser.
Open [localhost:8000](http://localhost:8000/) in a Google Chrome, Firefox, Microsoft Edge, or Brave browser.

You can set your API keys by clicking the Settings icon in the top-right corner. If you prefer to not worry about this everytime you open ChainForge, we recommend that save your OpenAI, Anthropic, and/or Google PaLM API keys to your local environment. For more details, see the [Installation Guide](https://github.com/ianarawjo/ChainForge/blob/main/INSTALL_GUIDE.md).

Expand Down
6 changes: 3 additions & 3 deletions chainforge/react-server/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"files": {
"main.css": "/static/css/main.a4e8271c.css",
"main.js": "/static/js/main.69c090b9.js",
"main.js": "/static/js/main.a3a00eec.js",
"static/js/787.4c72bb55.chunk.js": "/static/js/787.4c72bb55.chunk.js",
"index.html": "/index.html",
"main.a4e8271c.css.map": "/static/css/main.a4e8271c.css.map",
"main.69c090b9.js.map": "/static/js/main.69c090b9.js.map",
"main.a3a00eec.js.map": "/static/js/main.a3a00eec.js.map",
"787.4c72bb55.chunk.js.map": "/static/js/787.4c72bb55.chunk.js.map"
},
"entrypoints": [
"static/css/main.a4e8271c.css",
"static/js/main.69c090b9.js"
"static/js/main.a3a00eec.js"
]
}
2 changes: 1 addition & 1 deletion chainforge/react-server/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script async src="https://www.googletagmanager.com/gtag/js?id=G-RN3FDBLMCR"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-RN3FDBLMCR")</script><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A visual programming environment for prompt engineering"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>ChainForge</title><script defer="defer" src="/static/js/main.69c090b9.js"></script><link href="/static/css/main.a4e8271c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><script async src="https://www.googletagmanager.com/gtag/js?id=G-RN3FDBLMCR"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-RN3FDBLMCR")</script><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="A visual programming environment for prompt engineering"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>ChainForge</title><script defer="defer" src="/static/js/main.a3a00eec.js"></script><link href="/static/css/main.a4e8271c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions chainforge/react-server/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import StorageCache from './backend/cache';
import { APP_IS_RUNNING_LOCALLY } from './backend/utils';

// Device / Browser detection
import { isMobile, isChrome, isFirefox } from 'react-device-detect';
const IS_ACCEPTED_BROWSER = (isChrome || isFirefox) && !isMobile;
import { isMobile, isChrome, isFirefox, isEdgeChromium, isChromium } from 'react-device-detect';
const IS_ACCEPTED_BROWSER = (isChrome || isChromium || isEdgeChromium || isFirefox || navigator?.brave !== undefined) && !isMobile;

const selector = (state) => ({
nodes: state.nodes,
Expand Down Expand Up @@ -651,6 +651,8 @@ const App = () => {
<List m='xl' size={'11pt'}>
<List.Item>Google Chrome</List.Item>
<List.Item>Mozilla Firefox</List.Item>
<List.Item>Microsoft Edge (Chromium)</List.Item>
<List.Item>Brave</List.Item>
</List>

<Text m='xl' size={'11pt'}>These browsers offer enhanced compatibility with ChainForge's features. Don't worry, though! We're working to expand our browser support to ensure everyone can enjoy our platform. 😊</Text>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def readme():

setup(
name='chainforge',
version='0.2.5.2',
version='0.2.5.3',
packages=find_packages(),
author="Ian Arawjo",
description="A Visual Programming Environment for Prompt Engineering",
Expand Down

0 comments on commit ce897b5

Please sign in to comment.