update readme and vite port

This commit is contained in:
Henry
2023-11-27 12:24:11 +00:00
parent 8ce32179ee
commit 4e3f219e2d
11 changed files with 41 additions and 34 deletions
@@ -107,7 +107,7 @@ export class HuggingFaceInference extends LLM implements HFInput {
const { HfInference } = await import('@huggingface/inference')
return { HfInference }
} catch (e) {
throw new Error('Please install huggingface as a dependency with, e.g. `yarn add @huggingface/inference`')
throw new Error('Please install huggingface as a dependency with, e.g. `pnpm install @huggingface/inference`')
}
}
}
@@ -72,7 +72,7 @@ export class Cohere extends LLM implements CohereInput {
const { default: cohere } = await import('cohere-ai')
return { cohere }
} catch (e) {
throw new Error('Please install cohere-ai as a dependency with, e.g. `yarn add cohere-ai`')
throw new Error('Please install cohere-ai as a dependency with, e.g. `pnpm install cohere-ai`')
}
}
}
+1 -1
View File
@@ -1 +1 @@
PORT=8080
VITE_PORT=8080
+2 -2
View File
@@ -55,8 +55,8 @@
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
To begin the development, run `pnpm start`.
To create a production bundle, use `pnpm build`.
-->
</body>
</html>
+4 -1
View File
@@ -3,7 +3,10 @@ export const gridSpacing = 3
export const drawerWidth = 260
export const appDrawerWidth = 320
export const maxScroll = 100000
export const baseURL = import.meta.env.PROD === true ? window.location.origin : window.location.origin.replace(':8080', ':3000')
export const baseURL =
import.meta.env.PROD === true
? window.location.origin
: window.location.origin.replace(`:${import.meta.env.VITE_PORT ?? '8080'}`, ':3000')
export const uiBaseURL = window.location.origin
export const FLOWISE_CREDENTIAL_ID = 'FLOWISE_CREDENTIAL_ID'
export const REDACTED_CREDENTIAL_VALUE = '_FLOWISE_BLANK_07167752-1a71-43b1-bf8f-4f32252165db'
+4 -1
View File
@@ -1,6 +1,9 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
import dotenv from 'dotenv'
dotenv.config()
export default defineConfig({
plugins: [react()],
@@ -15,6 +18,6 @@ export default defineConfig({
},
server: {
open: true,
port: 8080
port: process.env.VITE_PORT ?? 8080
}
})