Compare commits
No commits in common. "main" and "multiple-models" have entirely different histories.
main
...
multiple-m
@ -26,15 +26,6 @@ allows users to run alpaca models on their local machine.
|
|||||||
- [Yarn](https://classic.yarnpkg.com/en/docs/install/#windows-stable)
|
- [Yarn](https://classic.yarnpkg.com/en/docs/install/#windows-stable)
|
||||||
- [Git](https://git-scm.com/downloads)
|
- [Git](https://git-scm.com/downloads)
|
||||||
|
|
||||||
# If you want to run the project
|
|
||||||
|
|
||||||
```sh
|
|
||||||
git clone --recursive https://github.com/ohmplatform/FreedomGPT.git freedom-gpt
|
|
||||||
cd freedom-gpt
|
|
||||||
yarn install
|
|
||||||
yarn start:prod
|
|
||||||
```
|
|
||||||
|
|
||||||
# If you want to contribute to the project
|
# If you want to contribute to the project
|
||||||
|
|
||||||
## Working with the repository
|
## Working with the repository
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import type { ForgeConfig } from "@electron-forge/shared-types";
|
|||||||
import * as dotenv from "dotenv";
|
import * as dotenv from "dotenv";
|
||||||
import { mainConfig } from "./webpack.main.config";
|
import { mainConfig } from "./webpack.main.config";
|
||||||
import { rendererConfig } from "./webpack.renderer.config";
|
import { rendererConfig } from "./webpack.renderer.config";
|
||||||
|
|
||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
const config: ForgeConfig = {
|
const config: ForgeConfig = {
|
||||||
@ -15,7 +14,7 @@ const config: ForgeConfig = {
|
|||||||
process.platform === "win32"
|
process.platform === "win32"
|
||||||
? "./src/appicons/icons/win/icon.ico"
|
? "./src/appicons/icons/win/icon.ico"
|
||||||
: "./src/appicons/icons/mac/ico",
|
: "./src/appicons/icons/mac/ico",
|
||||||
extraResource: "./models",
|
extraResource: "./src/models",
|
||||||
osxSign: {
|
osxSign: {
|
||||||
identity: "Developer ID Application: Age of AI, LLC (TS4W464GMN)",
|
identity: "Developer ID Application: Age of AI, LLC (TS4W464GMN)",
|
||||||
optionsForFile: () => {
|
optionsForFile: () => {
|
||||||
@ -53,11 +52,8 @@ const config: ForgeConfig = {
|
|||||||
{
|
{
|
||||||
name: "FreedomGPT",
|
name: "FreedomGPT",
|
||||||
setupIcon: "./src/appicons/icons/win/icon.ico",
|
setupIcon: "./src/appicons/icons/win/icon.ico",
|
||||||
certificateFile: process.env["WINDOWS_PFX_FILE"],
|
certificateFile: process.env.WINDOWS_PFX_FILE as string,
|
||||||
certificatePassword: process.env["WINDOWS_PFX_PASSWORD"],
|
certificatePassword: process.env.WIN_CERTIFICATE_PASSWORD as string,
|
||||||
owners: "Age of AI, LLC",
|
|
||||||
authors: "Age of AI, LLC",
|
|
||||||
copyright: "Age of AI, LLC",
|
|
||||||
},
|
},
|
||||||
["win32"]
|
["win32"]
|
||||||
),
|
),
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "freedomgpt",
|
"name": "freedomgpt",
|
||||||
"productName": "freedomgpt",
|
"productName": "freedomgpt",
|
||||||
"version": "1.1.4",
|
"version": "1.1.2",
|
||||||
"description": "Our goal is to illustrate that AI Safety cannot be achieved through censorship. Let information flow freely, no matter how discomforting - because the truth shall set us free.",
|
"description": "Our goal is to illustrate that AI Safety cannot be achieved through censorship. Let information flow freely, no matter how discomforting - because the truth shall set us free.",
|
||||||
"main": ".webpack/main",
|
"main": ".webpack/main",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
27
src/index.ts
27
src/index.ts
@ -19,9 +19,6 @@ const io = new Server(server, {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const usePackaged =
|
|
||||||
process.env.npm_lifecycle_event === "start:prod" ? true : false;
|
|
||||||
|
|
||||||
const homeDir = app.getPath("home");
|
const homeDir = app.getPath("home");
|
||||||
|
|
||||||
const DEFAULT_MODEL_LOCATION = homeDir + "/FreedomGPT";
|
const DEFAULT_MODEL_LOCATION = homeDir + "/FreedomGPT";
|
||||||
@ -40,25 +37,11 @@ let program: import("child_process").ChildProcessWithoutNullStreams = null;
|
|||||||
|
|
||||||
const deviceisWindows = process.platform === "win32";
|
const deviceisWindows = process.platform === "win32";
|
||||||
|
|
||||||
// const CHAT_APP_LOCATION = app.isPackaged
|
const CHAT_APP_LOCATION = app.isPackaged
|
||||||
// ? process.resourcesPath + "/models/llama/main"
|
? process.resourcesPath + "/models/llama/main"
|
||||||
// : deviceisWindows
|
: deviceisWindows
|
||||||
// ? process.cwd() + "/llama.cpp/build/bin/Release/main"
|
? process.cwd() + "/llama.cpp/build/bin/Release/main"
|
||||||
// : process.cwd() + "/llama.cpp/main";
|
: process.cwd() + "/llama.cpp/main";
|
||||||
|
|
||||||
const isDev: boolean = app.isPackaged ? false : true;
|
|
||||||
|
|
||||||
const CHAT_APP_LOCATION = deviceisWindows
|
|
||||||
? isDev
|
|
||||||
? usePackaged
|
|
||||||
? process.cwd() + "/src/model/windows/main"
|
|
||||||
: process.cwd() + "/llama.cpp/build/bin/Release/main"
|
|
||||||
: process.resourcesPath + "/models/llama/main"
|
|
||||||
: isDev
|
|
||||||
? usePackaged
|
|
||||||
? process.cwd() + "/src/model/mac/main"
|
|
||||||
: process.cwd() + "/llama.cpp/main"
|
|
||||||
: process.resourcesPath + "/models/llama/main";
|
|
||||||
|
|
||||||
io.on("connection", (socket) => {
|
io.on("connection", (socket) => {
|
||||||
const totalRAM = os.totalmem() / 1024 ** 3;
|
const totalRAM = os.totalmem() / 1024 ** 3;
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user