mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-26 18:23:00 +03:00
36 lines
946 B
JavaScript
36 lines
946 B
JavaScript
import { LoaderHelper } from '@/helpers/loader-helper'
|
|
import { LogHelper } from '@/helpers/log-helper'
|
|
|
|
import train from '../train/train'
|
|
import generateHttpApiKey from '../generate/generate-http-api-key'
|
|
|
|
import setupDotenv from './setup-dotenv'
|
|
import setupCore from './setup-core'
|
|
import setupSkillsConfig from './setup-skills-config'
|
|
import setupPythonBinaries from './setup-python-binaries'
|
|
|
|
// Do not load ".env" file because it is not created yet
|
|
|
|
/**
|
|
* Main entry to set up Leon
|
|
*/
|
|
;(async () => {
|
|
try {
|
|
await setupDotenv()
|
|
LoaderHelper.start()
|
|
await Promise.all([setupCore(), setupSkillsConfig()])
|
|
LoaderHelper.stop()
|
|
await setupPythonBinaries()
|
|
await generateHttpApiKey()
|
|
LoaderHelper.start()
|
|
await train()
|
|
|
|
LogHelper.default('')
|
|
LogHelper.success('Hooray! Leon is installed and ready to go!')
|
|
LoaderHelper.stop()
|
|
} catch (e) {
|
|
LogHelper.error(e)
|
|
LoaderHelper.stop()
|
|
}
|
|
})()
|