This commit is contained in:
Andreas Deininger 2024-04-15 08:27:28 +02:00 committed by GitHub
parent 1619478250
commit 81e8889568
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 27 additions and 27 deletions

View File

@ -79,7 +79,7 @@ common:
securityContext: {} securityContext: {}
service: service:
extenalLabel: {} externalLabel: {}
type: ClusterIP type: ClusterIP
port: 1337 port: 1337
targetPort: 1337 targetPort: 1337
@ -193,7 +193,7 @@ common:
securityContext: {} securityContext: {}
service: service:
extenalLabel: {} externalLabel: {}
type: ClusterIP type: ClusterIP
port: 3000 port: 3000
targetPort: 3000 targetPort: 3000

View File

@ -60,7 +60,7 @@ const joinPath: (paths: string[]) => Promise<string> = (paths) =>
globalThis.core.api?.joinPath(paths) globalThis.core.api?.joinPath(paths)
/** /**
* Retrive the basename from an url. * Retrieve the basename from an url.
* @param path - The path to retrieve. * @param path - The path to retrieve.
* @returns {Promise<string>} A promise that resolves with the basename. * @returns {Promise<string>} A promise that resolves with the basename.
*/ */

View File

@ -4,7 +4,7 @@ import { log } from './logger'
export const getSystemResourceInfo = async (): Promise<SystemResourceInfo> => { export const getSystemResourceInfo = async (): Promise<SystemResourceInfo> => {
const cpu = await physicalCpuCount() const cpu = await physicalCpuCount()
log(`[NITRO]::CPU informations - ${cpu}`) log(`[NITRO]::CPU information - ${cpu}`)
return { return {
numCpuPhysicalCore: cpu, numCpuPhysicalCore: cpu,

View File

@ -22,7 +22,7 @@ export const getSelectedText = async () => {
/** /**
* Registers a global shortcut of `accelerator`. The `callback` is called * Registers a global shortcut of `accelerator`. The `callback` is called
* with the selected text when the registered shorcut is pressed by the user * with the selected text when the registered shortcut is pressed by the user
* *
* Returns `true` if the shortcut was registered successfully * Returns `true` if the shortcut was registered successfully
*/ */

View File

@ -3,7 +3,7 @@ import { app } from 'electron'
export const setupCore = async () => { export const setupCore = async () => {
// Setup core api for main process // Setup core api for main process
global.core = { global.core = {
// Define appPath function for app to retrieve app path globaly // Define appPath function for app to retrieve app path globally
appPath: () => app.getPath('userData'), appPath: () => app.getPath('userData'),
} }
} }

View File

@ -42,7 +42,7 @@ export default class JanInferenceNitroExtension extends LocalOAIEngine {
/** /**
* The interval id for the health check. Used to stop the health check. * The interval id for the health check. Used to stop the health check.
*/ */
private getNitroProcesHealthIntervalId: NodeJS.Timeout | undefined = undefined private getNitroProcessHealthIntervalId: NodeJS.Timeout | undefined = undefined
/** /**
* Tracking the current state of nitro process. * Tracking the current state of nitro process.
@ -65,7 +65,7 @@ export default class JanInferenceNitroExtension extends LocalOAIEngine {
this.inferenceUrl = `${window.core?.api?.baseApiUrl}/v1/chat/completions` this.inferenceUrl = `${window.core?.api?.baseApiUrl}/v1/chat/completions`
} }
this.getNitroProcesHealthIntervalId = setInterval( this.getNitroProcessHealthIntervalId = setInterval(
() => this.periodicallyGetNitroHealth(), () => this.periodicallyGetNitroHealth(),
JanInferenceNitroExtension._intervalHealthCheck JanInferenceNitroExtension._intervalHealthCheck
) )
@ -95,7 +95,7 @@ export default class JanInferenceNitroExtension extends LocalOAIEngine {
override loadModel(model: Model): Promise<void> { override loadModel(model: Model): Promise<void> {
if (model.engine !== this.provider) return Promise.resolve() if (model.engine !== this.provider) return Promise.resolve()
this.getNitroProcesHealthIntervalId = setInterval( this.getNitroProcessHealthIntervalId = setInterval(
() => this.periodicallyGetNitroHealth(), () => this.periodicallyGetNitroHealth(),
JanInferenceNitroExtension._intervalHealthCheck JanInferenceNitroExtension._intervalHealthCheck
) )
@ -106,9 +106,9 @@ export default class JanInferenceNitroExtension extends LocalOAIEngine {
if (model?.engine && model.engine !== this.provider) return if (model?.engine && model.engine !== this.provider) return
// stop the periocally health check // stop the periocally health check
if (this.getNitroProcesHealthIntervalId) { if (this.getNitroProcessHealthIntervalId) {
clearInterval(this.getNitroProcesHealthIntervalId) clearInterval(this.getNitroProcessHealthIntervalId)
this.getNitroProcesHealthIntervalId = undefined this.getNitroProcessHealthIntervalId = undefined
} }
return super.unloadModel(model) return super.unloadModel(model)
} }

View File

@ -136,7 +136,7 @@ export const getCurrentLoad = () =>
}) })
/** /**
* This will retrive GPU informations and persist settings.json * This will retrieve GPU information and persist settings.json
* Will be called when the extension is loaded to turn on GPU acceleration if supported * Will be called when the extension is loaded to turn on GPU acceleration if supported
*/ */
export const updateNvidiaInfo = async () => { export const updateNvidiaInfo = async () => {

View File

@ -12,7 +12,7 @@ export async function setup() {
if (!existsSync(appDir)) mkdirSync(appDir) if (!existsSync(appDir)) mkdirSync(appDir)
//@ts-ignore //@ts-ignore
global.core = { global.core = {
// Define appPath function for app to retrieve app path globaly // Define appPath function for app to retrieve app path globally
appPath: () => appDir, appPath: () => appDir,
} }
init({ init({

View File

@ -22,7 +22,7 @@
* This ADR aims to outline design decisions for deploying Jan in cloud native environments such as: Runpod, AWS, Azure, GCP in a fast and simple way. * This ADR aims to outline design decisions for deploying Jan in cloud native environments such as: Runpod, AWS, Azure, GCP in a fast and simple way.
* The current code-base should not change too much. * The current code-base should not change too much.
* The current plugins must be reusable across enviroments (Desktop, Cloud-native). * The current plugins must be reusable across environments (Desktop, Cloud-native).
### Key Design Decisions ### Key Design Decisions

View File

@ -14,8 +14,8 @@ Modular Architecture w/ Plugins:
- Jan will have an architecture similar to VSCode or k8Lens - Jan will have an architecture similar to VSCode or k8Lens
- "Desktop Application" whose functionality can be extended thru plugins - "Desktop Application" whose functionality can be extended thru plugins
- Jan's architecture will need to accomodate plugins for (a) Persistence(b) IAM(c) Teams and RBAC(d) Policy engines(e) "Apps" (i.e. higher-order business logic)(f) Themes (UI) - Jan's architecture will need to accommodate plugins for (a) Persistence(b) IAM(c) Teams and RBAC(d) Policy engines(e) "Apps" (i.e. higher-order business logic)(f) Themes (UI)
- Nitro's architecture will need to accomodate plugins for different "model backends"(a) llama.cpp(b) rkwk (and others)(c) 3rd-party AIs - Nitro's architecture will need to accommodate plugins for different "model backends"(a) llama.cpp(b) rkwk (and others)(c) 3rd-party AIs
## Decision ## Decision

View File

@ -14,7 +14,7 @@ Proposed
## Context ## Context
What is the issue that we're seeing that is motivating this decision or change? What is the issue that we're seeing that is motivating this decision or change?
- The A.I world is moving fast with multiple runtime/ prebaked environment. We or the builder cannot cover just everything but rather we should adopt it and facillitate it as much as possible within Jan. - The A.I world is moving fast with multiple runtime/ prebaked environment. We or the builder cannot cover just everything but rather we should adopt it and facilitate it as much as possible within Jan.
- For `Run your own A.I`: Builder can build app on Jan (NodeJS env) and connect to external endpoint which serves the real A.I - For `Run your own A.I`: Builder can build app on Jan (NodeJS env) and connect to external endpoint which serves the real A.I
- e.g 1: Nitro acting as proxy to `triton-inference-server` running within a Docker container controlled by Jan app - e.g 1: Nitro acting as proxy to `triton-inference-server` running within a Docker container controlled by Jan app
- e.g 2: Original models can be in many formats (pytorch, paddlepaddle). In order to run it with the most optimized version locally, there must be a step to transpile the model ([Ollama import model](https://github.com/jmorganca/ollama/blob/main/docs/import.md), Tensorrt). Btw Jan can prebuilt it and let user pull but later - e.g 2: Original models can be in many formats (pytorch, paddlepaddle). In order to run it with the most optimized version locally, there must be a step to transpile the model ([Ollama import model](https://github.com/jmorganca/ollama/blob/main/docs/import.md), Tensorrt). Btw Jan can prebuilt it and let user pull but later

View File

@ -62,7 +62,7 @@ export default function Error({
> >
contact us contact us
</a>{' '} </a>{' '}
if the problem presists. if the problem persists.
</p> </p>
<div <div
className="mt-5 w-full rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700" className="mt-5 w-full rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700"

View File

@ -44,8 +44,8 @@ export enum UsecaseTag {
UsecaseDefault = 'UsecaseDefault', UsecaseDefault = 'UsecaseDefault',
} }
export enum MiscellanousTag { export enum MiscellaneousTag {
MiscellanousDefault = 'MiscellanousDefault', MiscellaneousDefault = 'MiscellaneousDefault',
} }
export type TagType = export type TagType =
@ -59,4 +59,4 @@ export type TagType =
| NumOfBit | NumOfBit
| RamRequired | RamRequired
| UsecaseTag | UsecaseTag
| MiscellanousTag | MiscellaneousTag

View File

@ -138,7 +138,7 @@ const DropdownListSidebar = ({
...model?.parameters, ...model?.parameters,
...model?.settings, ...model?.settings,
} }
// Update model paramter to the thread state // Update model parameter to the thread state
setThreadModelParams(activeThread.id, modelParams) setThreadModelParams(activeThread.id, modelParams)
// Update model parameter to the thread file // Update model parameter to the thread file

View File

@ -107,7 +107,7 @@ export default function useGetSystemResources() {
return { return {
/** /**
* Fetch resource informations once * Fetch resource information once
*/ */
getSystemResources, getSystemResources,
/** /**

View File

@ -18,7 +18,7 @@ export const HuggingFaceConvertingErrorModal = () => {
</div> </div>
<div className="flex flex-col items-center justify-center gap-1"> <div className="flex flex-col items-center justify-center gap-1">
<p className="text-center"> <p className="text-center">
An error occured while {conversionStatus} model {repoData.id}. An error occurred while {conversionStatus} model {repoData.id}.
</p> </p>
<p>Please close this modal and try again.</p> <p>Please close this modal and try again.</p>
</div> </div>

View File

@ -21,7 +21,7 @@ export const HuggingFaceSearchModal = () => {
return ( return (
<> <>
<div className="flex flex-col items-center justify-center gap-1"> <div className="flex flex-col items-center justify-center gap-1">
<p className="text-2xl font-bold">Hugging Face Convertor</p> <p className="text-2xl font-bold">Hugging Face Converter</p>
<p className="text-gray-500">Type the repository id below</p> <p className="text-gray-500">Type the repository id below</p>
</div> </div>
<Input <Input