mirror of
https://github.com/leon-ai/leon.git
synced 2024-11-28 04:04:58 +03:00
Merge branch 'develop' into feat/add-typebox-ajv
This commit is contained in:
commit
fd4f429b86
@ -125,8 +125,10 @@ table {
|
||||
}
|
||||
|
||||
:root {
|
||||
--black-color: #151718;
|
||||
--black-color: #000;
|
||||
--light-black-color: #222426;
|
||||
--white-color: #fff;
|
||||
--grey-color: #323739;
|
||||
}
|
||||
|
||||
a {
|
||||
@ -193,7 +195,7 @@ input {
|
||||
color: var(--white-color);
|
||||
width: 100%;
|
||||
border: none;
|
||||
border-bottom: 2px solid var(--white-color);
|
||||
border-bottom: 2px solid var(--grey-color);
|
||||
background: none;
|
||||
font-weight: 400;
|
||||
font-size: 4em;
|
||||
@ -222,7 +224,7 @@ small {
|
||||
top: 10%;
|
||||
height: 50%;
|
||||
overflow-y: auto;
|
||||
border: 2px solid var(--white-color);
|
||||
border: 2px solid var(--grey-color);
|
||||
border-radius: 12px;
|
||||
}
|
||||
#feed::-webkit-scrollbar {
|
||||
@ -302,8 +304,8 @@ small {
|
||||
right: 0;
|
||||
}
|
||||
#feed .leon .bubble {
|
||||
background-color: #eee;
|
||||
color: var(--black-color);
|
||||
background-color: var(--light-black-color);
|
||||
color: var(--white-color);
|
||||
}
|
||||
@keyframes fadeIn {
|
||||
100% {
|
||||
|
@ -137,7 +137,7 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
alert(`Error: ${e.message}; ${JSON.stringify(e.response.data)}`)
|
||||
alert(`Error: ${e.message}; ${JSON.stringify(e.response?.data)}`)
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
|
@ -1,16 +1,24 @@
|
||||
import dns from 'node:dns'
|
||||
|
||||
import dotenv from 'dotenv'
|
||||
import { defineConfig } from 'vite'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
dns.setDefaultResultOrder('verbatim')
|
||||
|
||||
// Map necessary Leon's env vars as Vite only expose VITE_*
|
||||
process.env.VITE_LEON_NODE_ENV = process.env.LEON_NODE_ENV
|
||||
process.env.VITE_LEON_HOST = process.env.LEON_HOST
|
||||
process.env.VITE_LEON_PORT = process.env.LEON_PORT
|
||||
|
||||
export default {
|
||||
export default defineConfig({
|
||||
root: 'app/src',
|
||||
build: {
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true
|
||||
},
|
||||
server: {
|
||||
port: 3000
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -53,6 +53,7 @@
|
||||
"build:tcp-server": "ts-node scripts/build-binaries.js tcp-server",
|
||||
"start:tcp-server": "cross-env PIPENV_PIPFILE=tcp_server/src/Pipfile pipenv run python tcp_server/src/main.py",
|
||||
"start": "cross-env LEON_NODE_ENV=production node ./server/dist/index.js",
|
||||
"python-bridge": "cross-env PIPENV_PIPFILE=bridges/python/src/Pipfile pipenv run python bridges/python/src/main.py server/src/intent-object.sample.json",
|
||||
"train": "ts-node scripts/train/run-train.js",
|
||||
"prepare-release": "ts-node scripts/release/prepare-release.js",
|
||||
"pre-release:python-bridge": "ts-node scripts/release/pre-release-binaries.js python-bridge",
|
||||
|
@ -1,4 +1,5 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import os from 'node:os'
|
||||
import { spawn } from 'node:child_process'
|
||||
|
||||
@ -199,7 +200,10 @@ dotenv.config()
|
||||
try {
|
||||
const executionStart = Date.now()
|
||||
const p = await command(
|
||||
`${PYTHON_BRIDGE_BIN_PATH} scripts/assets/intent-object.json`,
|
||||
`${PYTHON_BRIDGE_BIN_PATH} "${path.join(
|
||||
process.cwd(),
|
||||
'scripts/assets/intent-object.json'
|
||||
)}"`,
|
||||
{ shell: true }
|
||||
)
|
||||
const executionEnd = Date.now()
|
||||
|
@ -199,8 +199,7 @@ class Brain {
|
||||
*
|
||||
* 1. Need to be at the root of the project
|
||||
* 2. Edit: server/src/intent-object.sample.json
|
||||
* 3. Run: PIPENV_PIPFILE=bridges/python/src/Pipfile pipenv run
|
||||
* python bridges/python/src/main.py server/src/intent-object.sample.json
|
||||
* 3. Run: npm run python-bridge
|
||||
*/
|
||||
const slots = {}
|
||||
if (obj.slots) {
|
||||
@ -225,7 +224,7 @@ class Brain {
|
||||
try {
|
||||
fs.writeFileSync(intentObjectPath, JSON.stringify(intentObj))
|
||||
this.process = spawn(
|
||||
`${PYTHON_BRIDGE_BIN_PATH} ${intentObjectPath}`,
|
||||
`${PYTHON_BRIDGE_BIN_PATH} "${intentObjectPath}"`,
|
||||
{ shell: true }
|
||||
)
|
||||
} catch (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user