Merge pull request #2362 from janhq/update-docs-14th-mar
Update docs 14th mar
This commit is contained in:
commit
4bc76b64c7
20
.gitignore
vendored
20
.gitignore
vendored
@ -22,16 +22,16 @@ package-lock.json
|
||||
core/lib/**
|
||||
|
||||
# Nitro binary files
|
||||
extensions/inference-nitro-extension/bin/*/nitro
|
||||
extensions/inference-nitro-extension/bin/*/*.metal
|
||||
extensions/inference-nitro-extension/bin/*/*.exe
|
||||
extensions/inference-nitro-extension/bin/*/*.dll
|
||||
extensions/inference-nitro-extension/bin/*/*.exp
|
||||
extensions/inference-nitro-extension/bin/*/*.lib
|
||||
extensions/inference-nitro-extension/bin/saved-*
|
||||
extensions/inference-nitro-extension/bin/*.tar.gz
|
||||
extensions/inference-nitro-extension/bin/vulkaninfoSDK.exe
|
||||
extensions/inference-nitro-extension/bin/vulkaninfo
|
||||
extensions/*-extension/bin/*/nitro
|
||||
extensions/*-extension/bin/*/*.metal
|
||||
extensions/*-extension/bin/*/*.exe
|
||||
extensions/*-extension/bin/*/*.dll
|
||||
extensions/*-extension/bin/*/*.exp
|
||||
extensions/*-extension/bin/*/*.lib
|
||||
extensions/*-extension/bin/saved-*
|
||||
extensions/*-extension/bin/*.tar.gz
|
||||
extensions/*-extension/bin/vulkaninfoSDK.exe
|
||||
extensions/*-extension/bin/vulkaninfo
|
||||
|
||||
|
||||
# Turborepo
|
||||
|
||||
10
README.md
10
README.md
@ -76,31 +76,31 @@ Jan is an open-source ChatGPT alternative that runs 100% offline on your compute
|
||||
<tr style="text-align:center">
|
||||
<td style="text-align:center"><b>Experimental (Nightly Build)</b></td>
|
||||
<td style="text-align:center">
|
||||
<a href='https://delta.jan.ai/latest/jan-win-x64-0.4.8-310.exe'>
|
||||
<a href='https://delta.jan.ai/latest/jan-win-x64-0.4.8-322.exe'>
|
||||
<img src='./docs/static/img/windows.png' style="height:14px; width: 14px" />
|
||||
<b>jan.exe</b>
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href='https://delta.jan.ai/latest/jan-mac-x64-0.4.8-310.dmg'>
|
||||
<a href='https://delta.jan.ai/latest/jan-mac-x64-0.4.8-322.dmg'>
|
||||
<img src='./docs/static/img/mac.png' style="height:15px; width: 15px" />
|
||||
<b>Intel</b>
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href='https://delta.jan.ai/latest/jan-mac-arm64-0.4.8-310.dmg'>
|
||||
<a href='https://delta.jan.ai/latest/jan-mac-arm64-0.4.8-322.dmg'>
|
||||
<img src='./docs/static/img/mac.png' style="height:15px; width: 15px" />
|
||||
<b>M1/M2</b>
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href='https://delta.jan.ai/latest/jan-linux-amd64-0.4.8-310.deb'>
|
||||
<a href='https://delta.jan.ai/latest/jan-linux-amd64-0.4.8-322.deb'>
|
||||
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
|
||||
<b>jan.deb</b>
|
||||
</a>
|
||||
</td>
|
||||
<td style="text-align:center">
|
||||
<a href='https://delta.jan.ai/latest/jan-linux-x86_64-0.4.8-310.AppImage'>
|
||||
<a href='https://delta.jan.ai/latest/jan-linux-x86_64-0.4.8-322.AppImage'>
|
||||
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
|
||||
<b>jan.AppImage</b>
|
||||
</a>
|
||||
|
||||
@ -45,11 +45,12 @@
|
||||
"start": "rollup -c rollup.config.ts -w"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^29.7.0",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^12.0.2",
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"jest": "^29.7.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.38.5",
|
||||
"rollup-plugin-commonjs": "^9.1.8",
|
||||
"rollup-plugin-json": "^3.1.0",
|
||||
@ -58,7 +59,10 @@
|
||||
"rollup-plugin-typescript2": "^0.36.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.3.3",
|
||||
"rimraf": "^3.0.2"
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"rxjs": "^7.8.1",
|
||||
"ulid": "^2.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ export default [
|
||||
// Allow json resolution
|
||||
json(),
|
||||
// Compile TypeScript files
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
typescript({ useTsconfigDeclarationDir: true, exclude: ['src/*.ts', 'src/extensions/**'] }),
|
||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||
commonjs(),
|
||||
// Allow node_modules resolution, so you can use 'external' to control
|
||||
|
||||
@ -33,6 +33,8 @@ export enum AppRoute {
|
||||
stopServer = 'stopServer',
|
||||
log = 'log',
|
||||
logServer = 'logServer',
|
||||
systemInformations = 'systemInformations',
|
||||
showToast = 'showToast',
|
||||
}
|
||||
|
||||
export enum AppEvent {
|
||||
@ -56,6 +58,7 @@ export enum DownloadEvent {
|
||||
onFileDownloadUpdate = 'onFileDownloadUpdate',
|
||||
onFileDownloadError = 'onFileDownloadError',
|
||||
onFileDownloadSuccess = 'onFileDownloadSuccess',
|
||||
onFileUnzipSuccess = 'onFileUnzipSuccess',
|
||||
}
|
||||
|
||||
export enum LocalImportModelEvent {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FileStat } from './types'
|
||||
import { DownloadRequest, FileStat, NetworkConfig } from './types'
|
||||
|
||||
/**
|
||||
* Execute a extension module function in main process
|
||||
@ -17,18 +17,16 @@ const executeOnMain: (extension: string, method: string, ...args: any[]) => Prom
|
||||
|
||||
/**
|
||||
* Downloads a file from a URL and saves it to the local file system.
|
||||
* @param {string} url - The URL of the file to download.
|
||||
* @param {string} fileName - The name to use for the downloaded file.
|
||||
* @param {object} network - Optional object to specify proxy/whether to ignore SSL certificates.
|
||||
*
|
||||
* @param {DownloadRequest} downloadRequest - The request to download the file.
|
||||
* @param {NetworkConfig} network - Optional object to specify proxy/whether to ignore SSL certificates.
|
||||
*
|
||||
* @returns {Promise<any>} A promise that resolves when the file is downloaded.
|
||||
*/
|
||||
const downloadFile: (
|
||||
url: string,
|
||||
fileName: string,
|
||||
network?: { proxy?: string; ignoreSSL?: boolean }
|
||||
) => Promise<any> = (url, fileName, network) => {
|
||||
return global.core?.api?.downloadFile(url, fileName, network)
|
||||
}
|
||||
const downloadFile: (downloadRequest: DownloadRequest, network?: NetworkConfig) => Promise<any> = (
|
||||
downloadRequest,
|
||||
network
|
||||
) => global.core?.api?.downloadFile(downloadRequest, network)
|
||||
|
||||
/**
|
||||
* Aborts the download of a specific file.
|
||||
@ -108,6 +106,20 @@ const log: (message: string, fileName?: string) => void = (message, fileName) =>
|
||||
const isSubdirectory: (from: string, to: string) => Promise<boolean> = (from: string, to: string) =>
|
||||
global.core.api?.isSubdirectory(from, to)
|
||||
|
||||
/**
|
||||
* Get system information
|
||||
* @returns {Promise<any>} - A promise that resolves with the system information.
|
||||
*/
|
||||
const systemInformations: () => Promise<any> = () => global.core.api?.systemInformations()
|
||||
|
||||
/**
|
||||
* Show toast message from browser processes.
|
||||
* @param title
|
||||
* @param message
|
||||
* @returns
|
||||
*/
|
||||
const showToast: (title: string, message: string) => void = (title, message) =>
|
||||
global.core.api?.showToast(title, message)
|
||||
/**
|
||||
* Register extension point function type definition
|
||||
*/
|
||||
@ -134,5 +146,7 @@ export {
|
||||
log,
|
||||
isSubdirectory,
|
||||
getUserHomePath,
|
||||
systemInformations,
|
||||
showToast,
|
||||
FileStat,
|
||||
}
|
||||
|
||||
@ -10,6 +10,22 @@ export enum ExtensionTypeEnum {
|
||||
export interface ExtensionType {
|
||||
type(): ExtensionTypeEnum | undefined
|
||||
}
|
||||
|
||||
export interface Compatibility {
|
||||
platform: string[]
|
||||
version: string
|
||||
}
|
||||
|
||||
const ALL_INSTALLATION_STATE = [
|
||||
'NotRequired', // not required.
|
||||
'Installed', // require and installed. Good to go.
|
||||
'NotInstalled', // require to be installed.
|
||||
'Corrupted', // require but corrupted. Need to redownload.
|
||||
] as const
|
||||
|
||||
export type InstallationStateTuple = typeof ALL_INSTALLATION_STATE
|
||||
export type InstallationState = InstallationStateTuple[number]
|
||||
|
||||
/**
|
||||
* Represents a base extension.
|
||||
* This class should be extended by any class that represents an extension.
|
||||
@ -33,4 +49,32 @@ export abstract class BaseExtension implements ExtensionType {
|
||||
* Any cleanup logic for the extension should be put here.
|
||||
*/
|
||||
abstract onUnload(): void
|
||||
|
||||
/**
|
||||
* The compatibility of the extension.
|
||||
* This is used to check if the extension is compatible with the current environment.
|
||||
* @property {Array} platform
|
||||
*/
|
||||
compatibility(): Compatibility | undefined {
|
||||
return undefined
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the prerequisites for the extension are installed.
|
||||
*
|
||||
* @returns {boolean} true if the prerequisites are installed, false otherwise.
|
||||
*/
|
||||
async installationState(): Promise<InstallationState> {
|
||||
return 'NotRequired'
|
||||
}
|
||||
|
||||
/**
|
||||
* Install the prerequisites for the extension.
|
||||
*
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
// @ts-ignore
|
||||
async install(...args): Promise<void> {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
60
core/src/extensions/ai-engines/AIEngine.ts
Normal file
60
core/src/extensions/ai-engines/AIEngine.ts
Normal file
@ -0,0 +1,60 @@
|
||||
import { getJanDataFolderPath, joinPath } from '../../core'
|
||||
import { events } from '../../events'
|
||||
import { BaseExtension } from '../../extension'
|
||||
import { fs } from '../../fs'
|
||||
import { Model, ModelEvent } from '../../types'
|
||||
|
||||
/**
|
||||
* Base AIEngine
|
||||
* Applicable to all AI Engines
|
||||
*/
|
||||
export abstract class AIEngine extends BaseExtension {
|
||||
// The inference engine
|
||||
abstract provider: string
|
||||
// The model folder
|
||||
modelFolder: string = 'models'
|
||||
|
||||
abstract models(): Promise<Model[]>
|
||||
|
||||
/**
|
||||
* On extension load, subscribe to events.
|
||||
*/
|
||||
onLoad() {
|
||||
this.prePopulateModels()
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-populate models to App Data Folder
|
||||
*/
|
||||
prePopulateModels(): Promise<void> {
|
||||
return this.models().then((models) => {
|
||||
const prePoluateOperations = models.map((model) =>
|
||||
getJanDataFolderPath()
|
||||
.then((janDataFolder) =>
|
||||
// Attempt to create the model folder
|
||||
joinPath([janDataFolder, this.modelFolder, model.id]).then((path) =>
|
||||
fs
|
||||
.mkdirSync(path)
|
||||
.catch()
|
||||
.then(() => path)
|
||||
)
|
||||
)
|
||||
.then((path) => joinPath([path, 'model.json']))
|
||||
.then((path) => {
|
||||
// Do not overwite existing model.json
|
||||
return fs.existsSync(path).then((exist: any) => {
|
||||
if (!exist) return fs.writeFileSync(path, JSON.stringify(model, null, 2))
|
||||
})
|
||||
})
|
||||
.catch((e: Error) => {
|
||||
console.error('Error', e)
|
||||
})
|
||||
)
|
||||
Promise.all(prePoluateOperations).then(() =>
|
||||
// Emit event to update models
|
||||
// So the UI can update the models list
|
||||
events.emit(ModelEvent.OnModelsUpdate, {})
|
||||
)
|
||||
})
|
||||
}
|
||||
}
|
||||
63
core/src/extensions/ai-engines/LocalOAIEngine.ts
Normal file
63
core/src/extensions/ai-engines/LocalOAIEngine.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import { executeOnMain, getJanDataFolderPath, joinPath } from '../../core'
|
||||
import { events } from '../../events'
|
||||
import { Model, ModelEvent } from '../../types'
|
||||
import { OAIEngine } from './OAIEngine'
|
||||
|
||||
/**
|
||||
* Base OAI Local Inference Provider
|
||||
* Added the implementation of loading and unloading model (applicable to local inference providers)
|
||||
*/
|
||||
export abstract class LocalOAIEngine extends OAIEngine {
|
||||
// The inference engine
|
||||
loadModelFunctionName: string = 'loadModel'
|
||||
unloadModelFunctionName: string = 'unloadModel'
|
||||
isRunning: boolean = false
|
||||
|
||||
/**
|
||||
* On extension load, subscribe to events.
|
||||
*/
|
||||
onLoad() {
|
||||
super.onLoad()
|
||||
// These events are applicable to local inference providers
|
||||
events.on(ModelEvent.OnModelInit, (model: Model) => this.onModelInit(model))
|
||||
events.on(ModelEvent.OnModelStop, (model: Model) => this.onModelStop(model))
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the model.
|
||||
*/
|
||||
async onModelInit(model: Model) {
|
||||
if (model.engine.toString() !== this.provider) return
|
||||
|
||||
const modelFolder = await joinPath([await getJanDataFolderPath(), this.modelFolder, model.id])
|
||||
|
||||
const res = await executeOnMain(this.nodeModule, this.loadModelFunctionName, {
|
||||
modelFolder,
|
||||
model,
|
||||
})
|
||||
|
||||
if (res?.error) {
|
||||
events.emit(ModelEvent.OnModelFail, {
|
||||
...model,
|
||||
error: res.error,
|
||||
})
|
||||
return
|
||||
} else {
|
||||
this.loadedModel = model
|
||||
events.emit(ModelEvent.OnModelReady, model)
|
||||
this.isRunning = true
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Stops the model.
|
||||
*/
|
||||
onModelStop(model: Model) {
|
||||
if (model.engine?.toString() !== this.provider) return
|
||||
|
||||
this.isRunning = false
|
||||
|
||||
executeOnMain(this.nodeModule, this.unloadModelFunctionName).then(() => {
|
||||
events.emit(ModelEvent.OnModelStopped, {})
|
||||
})
|
||||
}
|
||||
}
|
||||
116
core/src/extensions/ai-engines/OAIEngine.ts
Normal file
116
core/src/extensions/ai-engines/OAIEngine.ts
Normal file
@ -0,0 +1,116 @@
|
||||
import { requestInference } from './helpers/sse'
|
||||
import { ulid } from 'ulid'
|
||||
import { AIEngine } from './AIEngine'
|
||||
import {
|
||||
ChatCompletionRole,
|
||||
ContentType,
|
||||
InferenceEvent,
|
||||
MessageEvent,
|
||||
MessageRequest,
|
||||
MessageRequestType,
|
||||
MessageStatus,
|
||||
Model,
|
||||
ModelInfo,
|
||||
ThreadContent,
|
||||
ThreadMessage,
|
||||
} from '../../types'
|
||||
import { events } from '../../events'
|
||||
|
||||
/**
|
||||
* Base OAI Inference Provider
|
||||
* Applicable to all OAI compatible inference providers
|
||||
*/
|
||||
export abstract class OAIEngine extends AIEngine {
|
||||
// The inference engine
|
||||
abstract inferenceUrl: string
|
||||
abstract nodeModule: string
|
||||
|
||||
// Controller to handle stop requests
|
||||
controller = new AbortController()
|
||||
isCancelled = false
|
||||
|
||||
// The loaded model instance
|
||||
loadedModel: Model | undefined
|
||||
|
||||
/**
|
||||
* On extension load, subscribe to events.
|
||||
*/
|
||||
onLoad() {
|
||||
super.onLoad()
|
||||
events.on(MessageEvent.OnMessageSent, (data: MessageRequest) => this.inference(data))
|
||||
events.on(InferenceEvent.OnInferenceStopped, () => this.onInferenceStopped())
|
||||
}
|
||||
|
||||
/**
|
||||
* On extension unload
|
||||
*/
|
||||
onUnload(): void {}
|
||||
|
||||
/*
|
||||
* Inference request
|
||||
*/
|
||||
inference(data: MessageRequest) {
|
||||
if (data.model?.engine?.toString() !== this.provider) return
|
||||
|
||||
const timestamp = Date.now()
|
||||
const message: ThreadMessage = {
|
||||
id: ulid(),
|
||||
thread_id: data.threadId,
|
||||
type: data.type,
|
||||
assistant_id: data.assistantId,
|
||||
role: ChatCompletionRole.Assistant,
|
||||
content: [],
|
||||
status: MessageStatus.Pending,
|
||||
created: timestamp,
|
||||
updated: timestamp,
|
||||
object: 'thread.message',
|
||||
}
|
||||
|
||||
if (data.type !== MessageRequestType.Summary) {
|
||||
events.emit(MessageEvent.OnMessageResponse, message)
|
||||
}
|
||||
|
||||
this.isCancelled = false
|
||||
this.controller = new AbortController()
|
||||
|
||||
const model: ModelInfo = {
|
||||
...(this.loadedModel ? this.loadedModel : {}),
|
||||
...data.model,
|
||||
}
|
||||
|
||||
requestInference(this.inferenceUrl, data.messages ?? [], model, this.controller).subscribe({
|
||||
next: (content: any) => {
|
||||
const messageContent: ThreadContent = {
|
||||
type: ContentType.Text,
|
||||
text: {
|
||||
value: content.trim(),
|
||||
annotations: [],
|
||||
},
|
||||
}
|
||||
message.content = [messageContent]
|
||||
events.emit(MessageEvent.OnMessageUpdate, message)
|
||||
},
|
||||
complete: async () => {
|
||||
message.status = message.content.length ? MessageStatus.Ready : MessageStatus.Error
|
||||
events.emit(MessageEvent.OnMessageUpdate, message)
|
||||
},
|
||||
error: async (err: any) => {
|
||||
if (this.isCancelled || message.content.length) {
|
||||
message.status = MessageStatus.Stopped
|
||||
events.emit(MessageEvent.OnMessageUpdate, message)
|
||||
return
|
||||
}
|
||||
message.status = MessageStatus.Error
|
||||
events.emit(MessageEvent.OnMessageUpdate, message)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the inference.
|
||||
*/
|
||||
onInferenceStopped() {
|
||||
this.isCancelled = true
|
||||
this.controller?.abort()
|
||||
}
|
||||
}
|
||||
67
core/src/extensions/ai-engines/helpers/sse.ts
Normal file
67
core/src/extensions/ai-engines/helpers/sse.ts
Normal file
@ -0,0 +1,67 @@
|
||||
import { Observable } from 'rxjs'
|
||||
import { ModelRuntimeParams } from '../../../types'
|
||||
/**
|
||||
* Sends a request to the inference server to generate a response based on the recent messages.
|
||||
* @param recentMessages - An array of recent messages to use as context for the inference.
|
||||
* @returns An Observable that emits the generated response as a string.
|
||||
*/
|
||||
export function requestInference(
|
||||
inferenceUrl: string,
|
||||
recentMessages: any[],
|
||||
model: {
|
||||
id: string
|
||||
parameters: ModelRuntimeParams
|
||||
},
|
||||
controller?: AbortController
|
||||
): Observable<string> {
|
||||
return new Observable((subscriber) => {
|
||||
const requestBody = JSON.stringify({
|
||||
messages: recentMessages,
|
||||
model: model.id,
|
||||
stream: true,
|
||||
...model.parameters,
|
||||
})
|
||||
fetch(inferenceUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Accept': model.parameters.stream ? 'text/event-stream' : 'application/json',
|
||||
},
|
||||
body: requestBody,
|
||||
signal: controller?.signal,
|
||||
})
|
||||
.then(async (response) => {
|
||||
if (model.parameters.stream === false) {
|
||||
const data = await response.json()
|
||||
subscriber.next(data.choices[0]?.message?.content ?? '')
|
||||
} else {
|
||||
const stream = response.body
|
||||
const decoder = new TextDecoder('utf-8')
|
||||
const reader = stream?.getReader()
|
||||
let content = ''
|
||||
|
||||
while (true && reader) {
|
||||
const { done, value } = await reader.read()
|
||||
if (done) {
|
||||
break
|
||||
}
|
||||
const text = decoder.decode(value)
|
||||
const lines = text.trim().split('\n')
|
||||
for (const line of lines) {
|
||||
if (line.startsWith('data: ') && !line.includes('data: [DONE]')) {
|
||||
const data = JSON.parse(line.replace('data: ', ''))
|
||||
content += data.choices[0]?.delta?.content ?? ''
|
||||
if (content.startsWith('assistant: ')) {
|
||||
content = content.replace('assistant: ', '')
|
||||
}
|
||||
subscriber.next(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
subscriber.complete()
|
||||
})
|
||||
.catch((err) => subscriber.error(err))
|
||||
})
|
||||
}
|
||||
3
core/src/extensions/ai-engines/index.ts
Normal file
3
core/src/extensions/ai-engines/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './AIEngine'
|
||||
export * from './OAIEngine'
|
||||
export * from './LocalOAIEngine'
|
||||
@ -28,3 +28,8 @@ export { ModelExtension } from './model'
|
||||
* Hugging Face extension for converting HF models to GGUF.
|
||||
*/
|
||||
export { HuggingFaceExtension } from './huggingface'
|
||||
|
||||
/**
|
||||
* Base AI Engines.
|
||||
*/
|
||||
export * from './ai-engines'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { BaseExtension, ExtensionTypeEnum } from '../extension'
|
||||
import { ImportingModel, Model, ModelInterface, OptionType } from '../index'
|
||||
import { GpuSetting, ImportingModel, Model, ModelInterface, OptionType } from '../index'
|
||||
|
||||
/**
|
||||
* Model extension for managing models.
|
||||
@ -14,6 +14,7 @@ export abstract class ModelExtension extends BaseExtension implements ModelInter
|
||||
|
||||
abstract downloadModel(
|
||||
model: Model,
|
||||
gpuSettings?: GpuSetting,
|
||||
network?: { proxy: string; ignoreSSL?: boolean }
|
||||
): Promise<void>
|
||||
abstract cancelModelDownload(modelId: string): Promise<void>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { BaseExtension, ExtensionTypeEnum } from '../extension'
|
||||
import { MonitoringInterface } from '../index'
|
||||
import { GpuSetting, MonitoringInterface } from '../index'
|
||||
|
||||
/**
|
||||
* Monitoring extension for system monitoring.
|
||||
@ -13,6 +13,7 @@ export abstract class MonitoringExtension extends BaseExtension implements Monit
|
||||
return ExtensionTypeEnum.SystemMonitoring
|
||||
}
|
||||
|
||||
abstract getGpuSetting(): Promise<GpuSetting>
|
||||
abstract getResourcesInfo(): Promise<any>
|
||||
abstract getCurrentLoad(): Promise<any>
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@ import { getJanDataFolderPath } from '../../helper'
|
||||
import { DownloadManager } from '../../helper/download'
|
||||
import { createWriteStream, renameSync } from 'fs'
|
||||
import { Processor } from './Processor'
|
||||
import { DownloadState } from '../../../types'
|
||||
import { DownloadRequest, DownloadState, NetworkConfig } from '../../../types'
|
||||
|
||||
export class Downloader implements Processor {
|
||||
observer?: Function
|
||||
@ -20,24 +20,27 @@ export class Downloader implements Processor {
|
||||
return func(this.observer, ...args)
|
||||
}
|
||||
|
||||
downloadFile(observer: any, url: string, localPath: string, network: any) {
|
||||
downloadFile(observer: any, downloadRequest: DownloadRequest, network?: NetworkConfig) {
|
||||
const request = require('request')
|
||||
const progress = require('request-progress')
|
||||
|
||||
const strictSSL = !network?.ignoreSSL
|
||||
const proxy = network?.proxy?.startsWith('http') ? network.proxy : undefined
|
||||
|
||||
const { localPath, url } = downloadRequest
|
||||
let normalizedPath = localPath
|
||||
if (typeof localPath === 'string') {
|
||||
localPath = normalizeFilePath(localPath)
|
||||
normalizedPath = normalizeFilePath(localPath)
|
||||
}
|
||||
const array = localPath.split(sep)
|
||||
const array = normalizedPath.split(sep)
|
||||
const fileName = array.pop() ?? ''
|
||||
const modelId = array.pop() ?? ''
|
||||
|
||||
const destination = resolve(getJanDataFolderPath(), localPath)
|
||||
const destination = resolve(getJanDataFolderPath(), normalizedPath)
|
||||
const rq = request({ url, strictSSL, proxy })
|
||||
|
||||
// Put request to download manager instance
|
||||
DownloadManager.instance.setRequest(localPath, rq)
|
||||
DownloadManager.instance.setRequest(normalizedPath, rq)
|
||||
|
||||
// Downloading file to a temp file first
|
||||
const downloadingTempFile = `${destination}.download`
|
||||
@ -56,16 +59,25 @@ export class Downloader implements Processor {
|
||||
total: 0,
|
||||
transferred: 0,
|
||||
},
|
||||
children: [],
|
||||
downloadState: 'downloading',
|
||||
extensionId: downloadRequest.extensionId,
|
||||
downloadType: downloadRequest.downloadType,
|
||||
localPath: normalizedPath,
|
||||
}
|
||||
DownloadManager.instance.downloadProgressMap[modelId] = initialDownloadState
|
||||
|
||||
if (downloadRequest.downloadType === 'extension') {
|
||||
observer?.(DownloadEvent.onFileDownloadUpdate, initialDownloadState)
|
||||
}
|
||||
|
||||
progress(rq, {})
|
||||
.on('progress', (state: any) => {
|
||||
const currentDownloadState = DownloadManager.instance.downloadProgressMap[modelId]
|
||||
const downloadState: DownloadState = {
|
||||
...currentDownloadState,
|
||||
...state,
|
||||
modelId,
|
||||
fileName,
|
||||
fileName: fileName,
|
||||
downloadState: 'downloading',
|
||||
}
|
||||
console.debug('progress: ', downloadState)
|
||||
@ -76,22 +88,22 @@ export class Downloader implements Processor {
|
||||
const currentDownloadState = DownloadManager.instance.downloadProgressMap[modelId]
|
||||
const downloadState: DownloadState = {
|
||||
...currentDownloadState,
|
||||
fileName: fileName,
|
||||
error: error.message,
|
||||
downloadState: 'error',
|
||||
}
|
||||
if (currentDownloadState) {
|
||||
DownloadManager.instance.downloadProgressMap[modelId] = downloadState
|
||||
}
|
||||
|
||||
observer?.(DownloadEvent.onFileDownloadError, downloadState)
|
||||
DownloadManager.instance.downloadProgressMap[modelId] = downloadState
|
||||
})
|
||||
.on('end', () => {
|
||||
const currentDownloadState = DownloadManager.instance.downloadProgressMap[modelId]
|
||||
if (currentDownloadState && DownloadManager.instance.networkRequests[localPath]) {
|
||||
if (currentDownloadState && DownloadManager.instance.networkRequests[normalizedPath]) {
|
||||
// Finished downloading, rename temp file to actual file
|
||||
renameSync(downloadingTempFile, destination)
|
||||
const downloadState: DownloadState = {
|
||||
...currentDownloadState,
|
||||
fileName: fileName,
|
||||
downloadState: 'end',
|
||||
}
|
||||
observer?.(DownloadEvent.onFileDownloadSuccess, downloadState)
|
||||
|
||||
@ -1,7 +1,16 @@
|
||||
import fs from 'fs'
|
||||
import {
|
||||
existsSync,
|
||||
readdirSync,
|
||||
readFileSync,
|
||||
writeFileSync,
|
||||
mkdirSync,
|
||||
appendFileSync,
|
||||
createWriteStream,
|
||||
rmdirSync,
|
||||
} from 'fs'
|
||||
import { JanApiRouteConfiguration, RouteConfiguration } from './configuration'
|
||||
import { join } from 'path'
|
||||
import { ContentType, MessageStatus, Model, ThreadMessage } from '../../../../index'
|
||||
import { ContentType, MessageStatus, Model, ThreadMessage } from '../../../../types'
|
||||
import { getEngineConfiguration, getJanDataFolderPath } from '../../../helper'
|
||||
import { DEFAULT_CHAT_COMPLETION_URL } from './consts'
|
||||
|
||||
@ -9,12 +18,12 @@ import { DEFAULT_CHAT_COMPLETION_URL } from './consts'
|
||||
export const getBuilder = async (configuration: RouteConfiguration) => {
|
||||
const directoryPath = join(getJanDataFolderPath(), configuration.dirName)
|
||||
try {
|
||||
if (!fs.existsSync(directoryPath)) {
|
||||
if (!existsSync(directoryPath)) {
|
||||
console.debug('model folder not found')
|
||||
return []
|
||||
}
|
||||
|
||||
const files: string[] = fs.readdirSync(directoryPath)
|
||||
const files: string[] = readdirSync(directoryPath)
|
||||
|
||||
const allDirectories: string[] = []
|
||||
for (const file of files) {
|
||||
@ -46,8 +55,8 @@ export const getBuilder = async (configuration: RouteConfiguration) => {
|
||||
}
|
||||
|
||||
const readModelMetadata = (path: string): string | undefined => {
|
||||
if (fs.existsSync(path)) {
|
||||
return fs.readFileSync(path, 'utf-8')
|
||||
if (existsSync(path)) {
|
||||
return readFileSync(path, 'utf-8')
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
@ -81,7 +90,7 @@ export const deleteBuilder = async (configuration: RouteConfiguration, id: strin
|
||||
}
|
||||
|
||||
const objectPath = join(directoryPath, id)
|
||||
fs.rmdirSync(objectPath, { recursive: true })
|
||||
rmdirSync(objectPath, { recursive: true })
|
||||
return {
|
||||
id: id,
|
||||
object: configuration.delete.object,
|
||||
@ -96,20 +105,19 @@ export const getMessages = async (threadId: string): Promise<ThreadMessage[]> =>
|
||||
const threadDirPath = join(getJanDataFolderPath(), 'threads', threadId)
|
||||
const messageFile = 'messages.jsonl'
|
||||
try {
|
||||
const files: string[] = fs.readdirSync(threadDirPath)
|
||||
const files: string[] = readdirSync(threadDirPath)
|
||||
if (!files.includes(messageFile)) {
|
||||
console.error(`${threadDirPath} not contains message file`)
|
||||
return []
|
||||
}
|
||||
|
||||
const messageFilePath = join(threadDirPath, messageFile)
|
||||
if (!fs.existsSync(messageFilePath)) {
|
||||
if (!existsSync(messageFilePath)) {
|
||||
console.debug('message file not found')
|
||||
return []
|
||||
}
|
||||
|
||||
const lines = fs
|
||||
.readFileSync(messageFilePath, 'utf-8')
|
||||
const lines = readFileSync(messageFilePath, 'utf-8')
|
||||
.toString()
|
||||
.split('\n')
|
||||
.filter((line: any) => line !== '')
|
||||
@ -157,11 +165,11 @@ export const createThread = async (thread: any) => {
|
||||
const threadDirPath = join(getJanDataFolderPath(), 'threads', updatedThread.id)
|
||||
const threadJsonPath = join(threadDirPath, threadMetadataFileName)
|
||||
|
||||
if (!fs.existsSync(threadDirPath)) {
|
||||
fs.mkdirSync(threadDirPath)
|
||||
if (!existsSync(threadDirPath)) {
|
||||
mkdirSync(threadDirPath)
|
||||
}
|
||||
|
||||
await fs.writeFileSync(threadJsonPath, JSON.stringify(updatedThread, null, 2))
|
||||
await writeFileSync(threadJsonPath, JSON.stringify(updatedThread, null, 2))
|
||||
return updatedThread
|
||||
} catch (err) {
|
||||
return {
|
||||
@ -191,7 +199,7 @@ export const updateThread = async (threadId: string, thread: any) => {
|
||||
const threadDirPath = join(getJanDataFolderPath(), 'threads', updatedThread.id)
|
||||
const threadJsonPath = join(threadDirPath, threadMetadataFileName)
|
||||
|
||||
await fs.writeFileSync(threadJsonPath, JSON.stringify(updatedThread, null, 2))
|
||||
await writeFileSync(threadJsonPath, JSON.stringify(updatedThread, null, 2))
|
||||
return updatedThread
|
||||
} catch (err) {
|
||||
return {
|
||||
@ -233,10 +241,10 @@ export const createMessage = async (threadId: string, message: any) => {
|
||||
const threadDirPath = join(getJanDataFolderPath(), 'threads', threadId)
|
||||
const threadMessagePath = join(threadDirPath, threadMessagesFileName)
|
||||
|
||||
if (!fs.existsSync(threadDirPath)) {
|
||||
fs.mkdirSync(threadDirPath)
|
||||
if (!existsSync(threadDirPath)) {
|
||||
mkdirSync(threadDirPath)
|
||||
}
|
||||
fs.appendFileSync(threadMessagePath, JSON.stringify(threadMessage) + '\n')
|
||||
appendFileSync(threadMessagePath, JSON.stringify(threadMessage) + '\n')
|
||||
return threadMessage
|
||||
} catch (err) {
|
||||
return {
|
||||
@ -259,8 +267,8 @@ export const downloadModel = async (
|
||||
}
|
||||
|
||||
const directoryPath = join(getJanDataFolderPath(), 'models', modelId)
|
||||
if (!fs.existsSync(directoryPath)) {
|
||||
fs.mkdirSync(directoryPath)
|
||||
if (!existsSync(directoryPath)) {
|
||||
mkdirSync(directoryPath)
|
||||
}
|
||||
|
||||
// path to model binary
|
||||
@ -281,7 +289,7 @@ export const downloadModel = async (
|
||||
.on('end', function () {
|
||||
console.debug('end')
|
||||
})
|
||||
.pipe(fs.createWriteStream(modelBinaryPath))
|
||||
.pipe(createWriteStream(modelBinaryPath))
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@ -4,13 +4,13 @@ import fs from 'fs'
|
||||
import os from 'os'
|
||||
import childProcess from 'child_process'
|
||||
|
||||
// TODO: move this to core
|
||||
const configurationFileName = 'settings.json'
|
||||
|
||||
// TODO: do no specify app name in framework module
|
||||
const defaultJanDataFolder = join(os.homedir(), 'jan')
|
||||
const defaultAppConfig: AppConfiguration = {
|
||||
data_folder: defaultJanDataFolder,
|
||||
quick_ask: false,
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
export type AppConfiguration = {
|
||||
data_folder: string
|
||||
quick_ask: boolean
|
||||
}
|
||||
|
||||
@ -4,16 +4,43 @@ export type FileStat = {
|
||||
}
|
||||
|
||||
export type DownloadState = {
|
||||
modelId: string
|
||||
modelId: string // TODO: change to download id
|
||||
fileName: string
|
||||
time: DownloadTime
|
||||
speed: number
|
||||
percent: number
|
||||
|
||||
percent: number
|
||||
size: DownloadSize
|
||||
children?: DownloadState[]
|
||||
error?: string
|
||||
downloadState: 'downloading' | 'error' | 'end'
|
||||
children?: DownloadState[]
|
||||
|
||||
error?: string
|
||||
extensionId?: string
|
||||
downloadType?: DownloadType
|
||||
localPath?: string
|
||||
}
|
||||
|
||||
export type DownloadType = 'model' | 'extension'
|
||||
|
||||
export type DownloadRequest = {
|
||||
/**
|
||||
* The URL to download the file from.
|
||||
*/
|
||||
url: string
|
||||
|
||||
/**
|
||||
* The local path to save the file to.
|
||||
*/
|
||||
localPath: string
|
||||
|
||||
/**
|
||||
* The extension ID of the extension that initiated the download.
|
||||
*
|
||||
* Can be extension name.
|
||||
*/
|
||||
extensionId?: string
|
||||
|
||||
downloadType?: DownloadType
|
||||
}
|
||||
|
||||
type DownloadTime = {
|
||||
|
||||
8
core/src/types/miscellaneous/fileDownloadRequest.ts
Normal file
8
core/src/types/miscellaneous/fileDownloadRequest.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export type FileDownloadRequest = {
|
||||
downloadId: string
|
||||
url: string
|
||||
localPath: string
|
||||
fileName: string
|
||||
displayName: string
|
||||
metadata: Record<string, string | number>
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
export * from './systemResourceInfo'
|
||||
export * from './promptTemplate'
|
||||
export * from './appUpdate'
|
||||
export * from './fileDownloadRequest'
|
||||
export * from './networkConfig'
|
||||
4
core/src/types/miscellaneous/networkConfig.ts
Normal file
4
core/src/types/miscellaneous/networkConfig.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export type NetworkConfig = {
|
||||
proxy?: string
|
||||
ignoreSSL?: boolean
|
||||
}
|
||||
@ -2,3 +2,31 @@ export type SystemResourceInfo = {
|
||||
numCpuPhysicalCore: number
|
||||
memAvailable: number
|
||||
}
|
||||
|
||||
export type RunMode = 'cpu' | 'gpu'
|
||||
|
||||
export type GpuSetting = {
|
||||
notify: boolean
|
||||
run_mode: RunMode
|
||||
nvidia_driver: {
|
||||
exist: boolean
|
||||
version: string
|
||||
}
|
||||
cuda: {
|
||||
exist: boolean
|
||||
version: string
|
||||
}
|
||||
gpus: GpuSettingInfo[]
|
||||
gpu_highest_vram: string
|
||||
gpus_in_use: string[]
|
||||
is_initial: boolean
|
||||
// TODO: This needs to be set based on user toggle in settings
|
||||
vulkan: boolean
|
||||
}
|
||||
|
||||
export type GpuSettingInfo = {
|
||||
id: string
|
||||
vram: string
|
||||
name: string
|
||||
arch?: string
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ export enum InferenceEngine {
|
||||
nitro = 'nitro',
|
||||
openai = 'openai',
|
||||
triton_trtllm = 'triton_trtllm',
|
||||
nitro_tensorrt_llm = 'nitro-tensorrt-llm',
|
||||
|
||||
tool_retrieval_enabled = 'tool_retrieval_enabled',
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { GpuSetting } from '../miscellaneous'
|
||||
import { Model } from './modelEntity'
|
||||
|
||||
/**
|
||||
@ -10,7 +11,11 @@ export interface ModelInterface {
|
||||
* @param network - Optional object to specify proxy/whether to ignore SSL certificates.
|
||||
* @returns A Promise that resolves when the model has been downloaded.
|
||||
*/
|
||||
downloadModel(model: Model, network?: { ignoreSSL?: boolean; proxy?: string }): Promise<void>
|
||||
downloadModel(
|
||||
model: Model,
|
||||
gpuSettings?: GpuSetting,
|
||||
network?: { ignoreSSL?: boolean; proxy?: string }
|
||||
): Promise<void>
|
||||
|
||||
/**
|
||||
* Cancels the download of a specific model.
|
||||
|
||||
@ -1 +1,2 @@
|
||||
export * from './monitoringInterface'
|
||||
export * from './resourceInfo'
|
||||
|
||||
6
core/src/types/monitoring/resourceInfo.ts
Normal file
6
core/src/types/monitoring/resourceInfo.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export type ResourceInfo = {
|
||||
mem: {
|
||||
totalMemory: number
|
||||
usedMemory: number
|
||||
}
|
||||
}
|
||||
@ -13,7 +13,7 @@
|
||||
"declarationDir": "dist/types",
|
||||
"outDir": "dist/lib",
|
||||
"importHelpers": true,
|
||||
"types": ["@types/jest"]
|
||||
"types": ["@types/jest"],
|
||||
},
|
||||
"include": ["src"]
|
||||
"include": ["src"],
|
||||
}
|
||||
|
||||
@ -1,18 +1,20 @@
|
||||
# Website
|
||||
# Website & Docs
|
||||
|
||||
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
|
||||
This website is built using [Docusaurus 3.0](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
## Information Architecture
|
||||
### Information Architecture
|
||||
|
||||
We try to **keep routes consistent** to maintain SEO.
|
||||
|
||||
- `/guides`: Guides on how to use the Jan application, with GIFs. For end users who are directly using Jan. Always assume users are not technical.
|
||||
- **`/guides/`**: Guides on how to use the Jan application. For end users who are directly using Jan.
|
||||
|
||||
- `/developer`: Developer docs on how to extend Jan. These pages are about what people can build with our software. We must hide the complexity of HOW the app is built, but explain just enough of the high level architecture so devs know enough to build on top of it.
|
||||
- **`/developer/`**: Developer docs on how to extend Jan. These pages are about what people can build with our software.
|
||||
|
||||
- `/api-reference`: Reference documentation, written in Swagger/OpenAPI format.
|
||||
- **`/api-reference/`**: Reference documentation for the Jan API server, written in Swagger/OpenAPI format.
|
||||
|
||||
- `/docs`: Engineering specs and product specs, i.e. HOW the app is built. Mostly for internal reference and for our core contributors who are building the SDK itself.
|
||||
- **`/changelog/`**: A list of changes made to the Jan application with each release.
|
||||
|
||||
- **`/blog/`**: A blog for the Jan application.
|
||||
|
||||
### Sidebar Autogeneration
|
||||
|
||||
@ -20,34 +22,36 @@ The order of each page is either explicitly defined in `sidebar.js` or follows t
|
||||
|
||||
Important slugs are hardcoded at the document level (and shouldn't be rerouted):
|
||||
|
||||
```md
|
||||
```
|
||||
---
|
||||
title: Overview
|
||||
slug: /docs
|
||||
---
|
||||
```
|
||||
|
||||
## Contributing
|
||||
## How to Contribute
|
||||
|
||||
### Installation
|
||||
Refer to the [Contributing Guide](https://github.com/janhq/jan/blob/dev/CONTRIBUTING.md) for more comprehensive information on how to contribute to the Jan project.
|
||||
|
||||
```
|
||||
$ yarn
|
||||
```
|
||||
### Pre-requisites and Installation
|
||||
|
||||
### Local Development
|
||||
- [Node.js](https://nodejs.org/en/) (version 20.0.0 or higher)
|
||||
- [yarn](https://yarnpkg.com/) (version 1.22.0 or higher)
|
||||
|
||||
```
|
||||
$ cp .env.example .env
|
||||
$ yarn start
|
||||
#### Installation
|
||||
|
||||
```bash
|
||||
cd jan/docs
|
||||
yarn install
|
||||
yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
#### Build
|
||||
|
||||
```
|
||||
$ yarn build
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
@ -56,25 +60,27 @@ This command generates static content into the `build` directory and can be serv
|
||||
|
||||
Using SSH:
|
||||
|
||||
```
|
||||
$ USE_SSH=true yarn deploy
|
||||
```bash
|
||||
USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```
|
||||
$ GIT_USER=<Your GitHub username> yarn deploy
|
||||
```bash
|
||||
GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
||||
### Preview URL, Pre-release and Publishing Documentation
|
||||
|
||||
When a PR is created, the preview URL will be automatically commented on the PR.
|
||||
- When a pull request is created, the preview URL will be automatically commented on the pull request.
|
||||
|
||||
The documentation will then be published to [https://jan.ai/](https://jan.ai/) when the PR is merged to `main`.
|
||||
- The documentation will then be published to [https://dev.jan.ai/](https://dev.jan.ai/) when the pull request is merged to `dev`.
|
||||
|
||||
- Our open-source maintainers will sync the updated content from `dev` to `docs` branch, which will then be published to [https://jan.ai/](https://jan.ai/).
|
||||
|
||||
### Additional Plugins
|
||||
|
||||
- @docusaurus/theme-live-codeblock
|
||||
- [Redocusaurus](https://redocusaurus.vercel.app/): manually upload swagger files at `/openapi/OpenAPISpec.json`
|
||||
- [Redocusaurus](https://redocusaurus.vercel.app/): manually upload swagger files at `/openapi/jan.yaml` to update the API reference documentation.
|
||||
|
||||
@ -18,7 +18,7 @@ keywords:
|
||||
]
|
||||
---
|
||||
|
||||
Jan turns computers into a thinking machine to change how you use computers.
|
||||
Jan turns computers into thinking machines to change how we use them.
|
||||
Jan is created and maintained by Jan Labs, a robotics company.
|
||||
|
||||
With Jan, you can:
|
||||
|
||||
8
docs/docs/guides/providers/README.mdx
Normal file
8
docs/docs/guides/providers/README.mdx
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Inference Providers
|
||||
slug: /guides/providers
|
||||
---
|
||||
|
||||
import DocCardList from "@theme/DocCardList";
|
||||
|
||||
<DocCardList />
|
||||
BIN
docs/docs/guides/providers/image.png
Normal file
BIN
docs/docs/guides/providers/image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
10
docs/docs/guides/providers/llama-cpp.md
Normal file
10
docs/docs/guides/providers/llama-cpp.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
title: llama.cpp
|
||||
slug: /guides/providers/llama-cpp
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
[Nitro](https://github.com/janhq/nitro) is an inference server on top of [llama.cpp](https://github.com/ggerganov/llama.cpp). It provides an OpenAI-compatible API, queue, & scaling.
|
||||
|
||||
Nitro is the default AI engine downloaded with Jan. There is no additional setup needed.
|
||||
87
docs/docs/guides/providers/tensorrt-llm.md
Normal file
87
docs/docs/guides/providers/tensorrt-llm.md
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
title: TensorRT-LLM
|
||||
slug: /guides/providers/tensorrt-llm
|
||||
---
|
||||
|
||||
Users with Nvidia GPUs can get **20-40% faster\* token speeds** on their laptop or desktops by using [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM). The greater implication is that you are running FP16, which is also more accurate than quantized models.
|
||||
|
||||
This guide walks you through how to install Jan's official [TensorRT-LLM Extension](https://github.com/janhq/nitro-tensorrt-llm). This extension uses [Nitro-TensorRT-LLM](https://github.com/janhq/nitro-tensorrt-llm) as the AI engine, instead of the default [Nitro-Llama-CPP](https://github.com/janhq/nitro). It includes an efficient C++ server to natively execute the [TRT-LLM C++ runtime](https://nvidia.github.io/TensorRT-LLM/gpt_runtime.html). It also comes with additional feature and performance improvements like OpenAI compatibility, tokenizer improvements, and queues.
|
||||
|
||||
*Compared to using LlamaCPP engine.
|
||||
|
||||
:::warning
|
||||
This feature is only available for Windows users. Linux is coming soon.
|
||||
|
||||
Additionally, we only prebuilt a few demo models. You can always build your desired models directly on your machine. [Read here](#build-your-own-tensorrt-models).
|
||||
|
||||
:::
|
||||
|
||||
## Requirements
|
||||
|
||||
- A Windows PC
|
||||
- Nvidia GPU(s): Ada or Ampere series (i.e. RTX 4000s & 3000s). More will be supported soon.
|
||||
- 3GB+ of disk space to download TRT-LLM artifacts and a Nitro binary
|
||||
- Jan v0.4.9+ or Jan v0.4.8-321+ (nightly)
|
||||
- Nvidia Driver v535+ ([installation guide](https://jan.ai/guides/common-error/not-using-gpu/#1-ensure-gpu-mode-requirements))
|
||||
- CUDA Toolkit v12.2+ ([installation guide](https://jan.ai/guides/common-error/not-using-gpu/#1-ensure-gpu-mode-requirements))
|
||||
|
||||
## Install TensorRT-Extension
|
||||
|
||||
1. Go to Settings > Extensions
|
||||
2. Click install next to the TensorRT-LLM Extension
|
||||
3. Check that files are correctly downloaded
|
||||
|
||||
```sh
|
||||
ls ~\jan\extensions\@janhq\tensorrt-llm-extension\dist\bin
|
||||
# Your Extension Folder should now include `nitro.exe`, among other artifacts needed to run TRT-LLM
|
||||
```
|
||||
|
||||
## Download a Compatible Model
|
||||
TensorRT-LLM can only run models in `TensorRT` format. These models, aka "TensorRT Engines", are prebuilt specifically for each target OS+GPU architecture.
|
||||
|
||||
We offer a handful of precompiled models for Ampere and Ada cards that you can immediately download and play with:
|
||||
|
||||
1. Restart the application and go to the Hub
|
||||
2. Look for models with the `TensorRT-LLM` label in the recommended models list. Click download. This step might take some time. 🙏
|
||||
|
||||

|
||||
|
||||
3. Click use and start chatting!
|
||||
4. You may need to allow Nitro in your network
|
||||
|
||||

|
||||
|
||||
:::warning
|
||||
If you are our nightly builds, you may have to reinstall the TensorRT-LLM extension each time you update the app. We're working on better extension lifecyles - stay tuned.
|
||||
:::
|
||||
|
||||
## Configure Settings
|
||||
|
||||
You can customize the default parameters for how Jan runs TensorRT-LLM.
|
||||
|
||||
:::info
|
||||
coming soon
|
||||
:::
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Incompatible Extension vs Engine versions
|
||||
|
||||
For now, the model versions are pinned to the extension versions.
|
||||
|
||||
### Uninstall Extension
|
||||
|
||||
1. Quit the app
|
||||
2. Go to Settings > Extensions
|
||||
3. Delete the entire Extensions folder.
|
||||
4. Reopen the app, only the default extensions should be restored.
|
||||
|
||||
### Install Nitro-TensorRT-LLM manually
|
||||
|
||||
To manually build the artifacts needed to run the server and TensorRT-LLM, you can reference the source code. [Read here](https://github.com/janhq/nitro-tensorrt-llm?tab=readme-ov-file#quickstart).
|
||||
|
||||
### Build your own TensorRT models
|
||||
|
||||
:::info
|
||||
coming soon
|
||||
:::
|
||||
@ -1,3 +1,88 @@
|
||||
---
|
||||
title: Website & Docs
|
||||
---
|
||||
---
|
||||
|
||||
This website is built using [Docusaurus 3.0](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Information Architecture
|
||||
|
||||
We try to **keep routes consistent** to maintain SEO.
|
||||
|
||||
- **`/guides/`**: Guides on how to use the Jan application. For end users who are directly using Jan.
|
||||
|
||||
- **`/developer/`**: Developer docs on how to extend Jan. These pages are about what people can build with our software.
|
||||
|
||||
- **`/api-reference/`**: Reference documentation for the Jan API server, written in Swagger/OpenAPI format.
|
||||
|
||||
- **`/changelog/`**: A list of changes made to the Jan application with each release.
|
||||
|
||||
- **`/blog/`**: A blog for the Jan application.
|
||||
|
||||
### Sidebar Autogeneration
|
||||
|
||||
The order of each page is either explicitly defined in `sidebar.js` or follows the [Docusaurus autogenerated](https://docusaurus.io/docs/next/sidebar/autogenerated) naming format, `##-path-name.md`.
|
||||
|
||||
Important slugs are hardcoded at the document level (and shouldn't be rerouted):
|
||||
|
||||
```
|
||||
---
|
||||
title: Overview
|
||||
slug: /docs
|
||||
---
|
||||
```
|
||||
|
||||
## How to Contribute
|
||||
|
||||
Refer to the [Contributing Guide](https://github.com/janhq/jan/blob/dev/CONTRIBUTING.md) for more comprehensive information on how to contribute to the Jan project.
|
||||
|
||||
### Pre-requisites and Installation
|
||||
|
||||
- [Node.js](https://nodejs.org/en/) (version 20.0.0 or higher)
|
||||
- [yarn](https://yarnpkg.com/) (version 1.22.0 or higher)
|
||||
|
||||
#### Installation
|
||||
|
||||
```bash
|
||||
cd jan/docs
|
||||
yarn install
|
||||
yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
#### Build
|
||||
|
||||
```bash
|
||||
yarn build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
### Deployment
|
||||
|
||||
Using SSH:
|
||||
|
||||
```bash
|
||||
USE_SSH=true yarn deploy
|
||||
```
|
||||
|
||||
Not using SSH:
|
||||
|
||||
```bash
|
||||
GIT_USER=<Your GitHub username> yarn deploy
|
||||
```
|
||||
|
||||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
|
||||
|
||||
### Preview URL, Pre-release and Publishing Documentation
|
||||
|
||||
- When a pull request is created, the preview URL will be automatically commented on the pull request.
|
||||
|
||||
- The documentation will then be published to [https://dev.jan.ai/](https://dev.jan.ai/) when the pull request is merged to `dev`.
|
||||
|
||||
- Our open-source maintainers will sync the updated content from `dev` to `docs` branch, which will then be published to [https://jan.ai/](https://jan.ai/).
|
||||
|
||||
### Additional Plugins
|
||||
|
||||
- @docusaurus/theme-live-codeblock
|
||||
- [Redocusaurus](https://redocusaurus.vercel.app/): manually upload swagger files at `/openapi/jan.yaml` to update the API reference documentation.
|
||||
|
||||
@ -8,40 +8,40 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2
|
||||
|
||||
Highlighted Issue: [Issue #342: feat: Add Jan Hacker House event page to Docs](https://github.com/janhq/jan/pull/342)
|
||||
|
||||
## Changes
|
||||
|
||||
- feat: Add Jan Hacker House event page to Docs @dan-jan (#342)
|
||||
- feat: Hide incomplete Hardware section from Docs site @dan-jan (#341)
|
||||
- style: better chatbox ui @0xSage (#338)
|
||||
- feat: allowing user to fetch models from github @namchuai (#319)
|
||||
- fixes: #247 - inference plugin should check nitro service available @louis-jan (#313)
|
||||
- Fix icon error for linux app @hiento09 (#316)
|
||||
- docs: initial hardware content @Its-Alamin-H (#240)
|
||||
- fixes #277 - bug: memory utilization always at 99% @louis-jan (#309)
|
||||
- Docusaurus parser string from githubapi to get latest release @hiento09 (#312)
|
||||
- Footer background, CTA \& Highlight colors @drakehere (#288)
|
||||
- Fix CI Test run failed on ubuntu and change release file app name @hiento09 (#307)
|
||||
- Add docusaurus test build pipeline @hiento09 (#302)
|
||||
- fix: #271 Cannot read properties of undefined (reading 'map') @louis-jan (#300)
|
||||
- Fix Docusaurus server side render error @hiento09 (#301)
|
||||
- fix #283: small ui fixes @namchuai (#299)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Fix #290: Add description in package.json and rename to jan @hiento09 (#333)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add Documentation category to release note template @hiento09 (#332)
|
||||
- Chore/release note template @hiento09 (#323)
|
||||
- Add release note template @hiento09 (#322)
|
||||
|
||||
## 📖 Documentaion
|
||||
|
||||
- Add auto update app download url on jan.ai @hiento09 (#311)
|
||||
- docs: update per v0.1.3 @0xSage (#280)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Its-Alamin-H, @dan-jan, @drakehere, @hiento09, @hientominh, @louis-jan, @namchuai, Hien To and James
|
||||
## Changes
|
||||
|
||||
- feat: Add Jan Hacker House event page to Docs @dan-jan (#342)
|
||||
- feat: Hide incomplete Hardware section from Docs site @dan-jan (#341)
|
||||
- style: better chatbox ui @0xSage (#338)
|
||||
- feat: allowing user to fetch models from github @namchuai (#319)
|
||||
- fixes: #247 - inference plugin should check nitro service available @louis-jan (#313)
|
||||
- Fix icon error for linux app @hiento09 (#316)
|
||||
- docs: initial hardware content @Its-Alamin-H (#240)
|
||||
- fixes #277 - bug: memory utilization always at 99% @louis-jan (#309)
|
||||
- Docusaurus parser string from githubapi to get latest release @hiento09 (#312)
|
||||
- Footer background, CTA \& Highlight colors @drakehere (#288)
|
||||
- Fix CI Test run failed on ubuntu and change release file app name @hiento09 (#307)
|
||||
- Add docusaurus test build pipeline @hiento09 (#302)
|
||||
- fix: #271 Cannot read properties of undefined (reading 'map') @louis-jan (#300)
|
||||
- Fix Docusaurus server side render error @hiento09 (#301)
|
||||
- fix #283: small ui fixes @namchuai (#299)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Fix #290: Add description in package.json and rename to jan @hiento09 (#333)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add Documentation category to release note template @hiento09 (#332)
|
||||
- Chore/release note template @hiento09 (#323)
|
||||
- Add release note template @hiento09 (#322)
|
||||
|
||||
## 📖 Documentaion
|
||||
|
||||
- Add auto update app download url on jan.ai @hiento09 (#311)
|
||||
- docs: update per v0.1.3 @0xSage (#280)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Its-Alamin-H, @dan-jan, @drakehere, @hiento09, @hientominh, @louis-jan, @namchuai, Hien To and James
|
||||
|
||||
|
||||
@ -8,86 +8,86 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2
|
||||
|
||||
Highlighted Issue: [Issue #446: fix: model is started but the indicator is not stopped loading](https://github.com/janhq/jan/pull/446)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: model is started but the indicator is not stopped loading @louis-jan (#446)
|
||||
- fix: bring back install plugin manually function @louis-jan (#448)
|
||||
- fix: duplicated messages when user switch between conversations @namchuai (#441)
|
||||
- chore: added loader starting and stopping model @urmauur (#438)
|
||||
- chore: Change license to AGPL @dan-jan (#442)
|
||||
- fix: plugin \& model catalog import cache are not cleared properly @louis-jan (#437)
|
||||
- fix error codesign @hiento09 (#439)
|
||||
- fix: app version and cleanup unused code @urmauur (#434)
|
||||
- chore: update core service - get plugin manifest @louis-jan (#432)
|
||||
- ui: interface revamp @urmauur (#429)
|
||||
- fix: scroll on explore models does not work @namchuai (#427)
|
||||
- feat: adding create bot functionality @namchuai (#368)
|
||||
- chore: install or update a plugin should not interrupt dev process @louis-jan (#420)
|
||||
- chore: Update nitro 0.1.2 windows/ linux @vuonghoainam (#421)
|
||||
- chore: update core service enums @louis-jan (#414)
|
||||
- feat: chat with documents plugin @louis-jan (#417)
|
||||
- misc: setup prettier @urmauur (#412)
|
||||
- adr: 007 - Jan Plugin Catalog @louis-jan (#408)
|
||||
- adr: 006 - Jan Core Module @louis-jan (#404)
|
||||
- feat: Support for nitro release 0.1.2 @vuonghoainam (#409)
|
||||
- feat: explore plugins from the npm repository and install them remotely @louis-jan (#399)
|
||||
- feat: fix event description @dan-jan (#400)
|
||||
- fix: high cpu usage @louis-jan (#401)
|
||||
- docs: model installation ADR @0xSage (#390)
|
||||
- chore: update core events module @louis-jan (#394)
|
||||
- feat: Update Social OG Image and Meta Description @dan-jan (#387)
|
||||
- misc: UI home @urmauur (#392)
|
||||
- Update hcmc-oct23.md @0xSage (#389)
|
||||
- chore: remove deprecated extension functions @louis-jan (#388)
|
||||
- Fix bugs image overlap dropdown button download @urmauur (#384)
|
||||
- chore: resolve fetch models api limit rate @louis-jan (#383)
|
||||
- chore: update convo summary @louis-jan (#378)
|
||||
- Update interface landing page @urmauur (#381)
|
||||
- Add simple copywriting changes @dan-jan (#382)
|
||||
- chore: update core services and module export @louis-jan (#376)
|
||||
- chore: #371 - reference to plugin name and module path as variables @louis-jan (#372)
|
||||
- feat: Edit event details, hide all unnecessary website sections @dan-jan (#369)
|
||||
- docs: UI Service ADR @0xSage (#318)
|
||||
- Feat/issue 255 adr 001 jand cloud native @nam-john-ho (#262)
|
||||
- Move plugins folder from electron to root folder @hiento09 (#366)
|
||||
- feature: core plugin support events \& preferences modules @louis-jan (#365)
|
||||
- Fix/250 @namchuai (#349)
|
||||
- Change License and update README @dan-jan (#356)
|
||||
- Jan 339 @dan-jan (#348)
|
||||
- feat: Jan 339 @dan-jan (#347)
|
||||
- Add social og:image @dan-jan (#346)
|
||||
- feat(ard): Add adr 002 @vuonghoainam (#261)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- #357 plugin \& app can subscribe and emit events @louis-jan (#358)
|
||||
- feature: @janhq/plugin-core module \& usage @louis-jan (#321)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Change to load nitron on windows and linux from bash/shell script @hiento09 (#451)
|
||||
- Fix data-plugin install failed on mac silicon from npm @hiento09 (#413)
|
||||
- Correct version of plugins @hiento09 (#374)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- upgrade leveldown to newest version @hiento09 (#447)
|
||||
- Update auto-sign plugin by search file permission 664 @hiento09 (#445)
|
||||
- Change codesign plugin folder in ci @hiento09 (#440)
|
||||
- Add continue on error for import cert @hiento09 (#436)
|
||||
- Update code siging for new data plugin @hiento09 (#433)
|
||||
- Add readme inference plugin @hiento09 (#426)
|
||||
- Add username to remote origin @hiento09 (#425)
|
||||
- Add auto create PR to plugin-catalog when a new version of plugin is … @hiento09 (#416)
|
||||
- Fix data-plugin install failed on mac silicon from npm @hiento09 (#413)
|
||||
- Chore/remove package lock @hiento09 (#398)
|
||||
- Refactor cicd @hiento09 (#397)
|
||||
- Correct version of plugins @hiento09 (#374)
|
||||
- Rename plugin-core to core @hiento09 (#370)
|
||||
- Fix error check change in plugins folder @hiento09 (#367)
|
||||
- chore: jan.ai nits @0xSage (#354)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @dan-jan, @hiento09, @jan-service-account, @louis-jan, @nam-john-ho, @namchuai, @tikikun, @urmauur, @vuonghoainam and Hien To
|
||||
## Changes
|
||||
|
||||
- fix: model is started but the indicator is not stopped loading @louis-jan (#446)
|
||||
- fix: bring back install plugin manually function @louis-jan (#448)
|
||||
- fix: duplicated messages when user switch between conversations @namchuai (#441)
|
||||
- chore: added loader starting and stopping model @urmauur (#438)
|
||||
- chore: Change license to AGPL @dan-jan (#442)
|
||||
- fix: plugin \& model catalog import cache are not cleared properly @louis-jan (#437)
|
||||
- fix error codesign @hiento09 (#439)
|
||||
- fix: app version and cleanup unused code @urmauur (#434)
|
||||
- chore: update core service - get plugin manifest @louis-jan (#432)
|
||||
- ui: interface revamp @urmauur (#429)
|
||||
- fix: scroll on explore models does not work @namchuai (#427)
|
||||
- feat: adding create bot functionality @namchuai (#368)
|
||||
- chore: install or update a plugin should not interrupt dev process @louis-jan (#420)
|
||||
- chore: Update nitro 0.1.2 windows/ linux @vuonghoainam (#421)
|
||||
- chore: update core service enums @louis-jan (#414)
|
||||
- feat: chat with documents plugin @louis-jan (#417)
|
||||
- misc: setup prettier @urmauur (#412)
|
||||
- adr: 007 - Jan Plugin Catalog @louis-jan (#408)
|
||||
- adr: 006 - Jan Core Module @louis-jan (#404)
|
||||
- feat: Support for nitro release 0.1.2 @vuonghoainam (#409)
|
||||
- feat: explore plugins from the npm repository and install them remotely @louis-jan (#399)
|
||||
- feat: fix event description @dan-jan (#400)
|
||||
- fix: high cpu usage @louis-jan (#401)
|
||||
- docs: model installation ADR @0xSage (#390)
|
||||
- chore: update core events module @louis-jan (#394)
|
||||
- feat: Update Social OG Image and Meta Description @dan-jan (#387)
|
||||
- misc: UI home @urmauur (#392)
|
||||
- Update hcmc-oct23.md @0xSage (#389)
|
||||
- chore: remove deprecated extension functions @louis-jan (#388)
|
||||
- Fix bugs image overlap dropdown button download @urmauur (#384)
|
||||
- chore: resolve fetch models api limit rate @louis-jan (#383)
|
||||
- chore: update convo summary @louis-jan (#378)
|
||||
- Update interface landing page @urmauur (#381)
|
||||
- Add simple copywriting changes @dan-jan (#382)
|
||||
- chore: update core services and module export @louis-jan (#376)
|
||||
- chore: #371 - reference to plugin name and module path as variables @louis-jan (#372)
|
||||
- feat: Edit event details, hide all unnecessary website sections @dan-jan (#369)
|
||||
- docs: UI Service ADR @0xSage (#318)
|
||||
- Feat/issue 255 adr 001 jand cloud native @nam-john-ho (#262)
|
||||
- Move plugins folder from electron to root folder @hiento09 (#366)
|
||||
- feature: core plugin support events \& preferences modules @louis-jan (#365)
|
||||
- Fix/250 @namchuai (#349)
|
||||
- Change License and update README @dan-jan (#356)
|
||||
- Jan 339 @dan-jan (#348)
|
||||
- feat: Jan 339 @dan-jan (#347)
|
||||
- Add social og:image @dan-jan (#346)
|
||||
- feat(ard): Add adr 002 @vuonghoainam (#261)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- #357 plugin \& app can subscribe and emit events @louis-jan (#358)
|
||||
- feature: @janhq/plugin-core module \& usage @louis-jan (#321)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Change to load nitron on windows and linux from bash/shell script @hiento09 (#451)
|
||||
- Fix data-plugin install failed on mac silicon from npm @hiento09 (#413)
|
||||
- Correct version of plugins @hiento09 (#374)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- upgrade leveldown to newest version @hiento09 (#447)
|
||||
- Update auto-sign plugin by search file permission 664 @hiento09 (#445)
|
||||
- Change codesign plugin folder in ci @hiento09 (#440)
|
||||
- Add continue on error for import cert @hiento09 (#436)
|
||||
- Update code siging for new data plugin @hiento09 (#433)
|
||||
- Add readme inference plugin @hiento09 (#426)
|
||||
- Add username to remote origin @hiento09 (#425)
|
||||
- Add auto create PR to plugin-catalog when a new version of plugin is … @hiento09 (#416)
|
||||
- Fix data-plugin install failed on mac silicon from npm @hiento09 (#413)
|
||||
- Chore/remove package lock @hiento09 (#398)
|
||||
- Refactor cicd @hiento09 (#397)
|
||||
- Correct version of plugins @hiento09 (#374)
|
||||
- Rename plugin-core to core @hiento09 (#370)
|
||||
- Fix error check change in plugins folder @hiento09 (#367)
|
||||
- chore: jan.ai nits @0xSage (#354)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @dan-jan, @hiento09, @jan-service-account, @louis-jan, @nam-john-ho, @namchuai, @tikikun, @urmauur, @vuonghoainam and Hien To
|
||||
|
||||
|
||||
@ -8,36 +8,36 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2
|
||||
|
||||
Highlighted Issue: [Issue #469: chore: plugin and app version dependency](https://github.com/janhq/jan/pull/469)
|
||||
|
||||
## Changes
|
||||
|
||||
- chore: plugin and app version dependency @louis-jan (#469)
|
||||
- bug: showing a modal when user start conf but model not active @urmauur (#466)
|
||||
- fix: duplicated modal and loading state @louis-jan (#465)
|
||||
- bug: fix overflow scroll horizontal message @urmauur (#464)
|
||||
- bug: avoid chat body scroll horizontal @urmauur (#462)
|
||||
- bug: fix logic plugin update plugin and show installed version @urmauur (#459)
|
||||
- bug: chat view drops enumeration @urmauur (#456)
|
||||
- fix: allow switching models when switch between conversations @namchuai (#458)
|
||||
- fix: CI run fails on windows @louis-jan (#463)
|
||||
- fix: failed to build electron app @louis-jan (#461)
|
||||
- fix: correct app version display @louis-jan (#452)
|
||||
- fix: enable link color blue on docusaurus markdown @urmauur (#449)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add ADR-008 for extensible Jan @vuonghoainam (#431)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- data-plugin force leveldown to 6.1.1 @hiento09 (#453)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Use electron-rebuild to build leveldown@5.6.0 for darwin arm64 @hiento09 (#455)
|
||||
- data-plugin force leveldown back to 5.6.0 and rebuild for darwin arm64 @hiento09 (#454)
|
||||
- data-plugin force leveldown to 6.1.1 @hiento09 (#453)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @jan-service-account, @louis-jan, @namchuai, @urmauur and @vuonghoainam
|
||||
## Changes
|
||||
|
||||
- chore: plugin and app version dependency @louis-jan (#469)
|
||||
- bug: showing a modal when user start conf but model not active @urmauur (#466)
|
||||
- fix: duplicated modal and loading state @louis-jan (#465)
|
||||
- bug: fix overflow scroll horizontal message @urmauur (#464)
|
||||
- bug: avoid chat body scroll horizontal @urmauur (#462)
|
||||
- bug: fix logic plugin update plugin and show installed version @urmauur (#459)
|
||||
- bug: chat view drops enumeration @urmauur (#456)
|
||||
- fix: allow switching models when switch between conversations @namchuai (#458)
|
||||
- fix: CI run fails on windows @louis-jan (#463)
|
||||
- fix: failed to build electron app @louis-jan (#461)
|
||||
- fix: correct app version display @louis-jan (#452)
|
||||
- fix: enable link color blue on docusaurus markdown @urmauur (#449)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add ADR-008 for extensible Jan @vuonghoainam (#431)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- data-plugin force leveldown to 6.1.1 @hiento09 (#453)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Use electron-rebuild to build leveldown@5.6.0 for darwin arm64 @hiento09 (#455)
|
||||
- data-plugin force leveldown back to 5.6.0 and rebuild for darwin arm64 @hiento09 (#454)
|
||||
- data-plugin force leveldown to 6.1.1 @hiento09 (#453)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @jan-service-account, @louis-jan, @namchuai, @urmauur and @vuonghoainam
|
||||
|
||||
|
||||
@ -8,23 +8,23 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.2
|
||||
|
||||
Highlighted Issue: [Issue #482: fix: hide preferences section if empty](https://github.com/janhq/jan/pull/482)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: hide preferences section if empty @louis-jan (#482)
|
||||
- chore: fix conversation summary @louis-jan (#480)
|
||||
- chore: missing create conversation button when there is no conversation is selected @louis-jan (#478)
|
||||
- fix: download now change state immediately @namchuai (#475)
|
||||
- chore: add required app version to edge release plugin @louis-jan (#471)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- add rebuild for mac x64 @hiento09 (#473)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add build deps for data-plugin in CI @hiento09 (#472)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @hientominh, @jan-service-account, @louis-jan and @namchuai
|
||||
## Changes
|
||||
|
||||
- fix: hide preferences section if empty @louis-jan (#482)
|
||||
- chore: fix conversation summary @louis-jan (#480)
|
||||
- chore: missing create conversation button when there is no conversation is selected @louis-jan (#478)
|
||||
- fix: download now change state immediately @namchuai (#475)
|
||||
- chore: add required app version to edge release plugin @louis-jan (#471)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- add rebuild for mac x64 @hiento09 (#473)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add build deps for data-plugin in CI @hiento09 (#472)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @hientominh, @jan-service-account, @louis-jan and @namchuai
|
||||
|
||||
|
||||
@ -8,23 +8,23 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.3
|
||||
|
||||
Highlighted Issue: [Issue #482: fix: hide preferences section if empty](https://github.com/janhq/jan/pull/482)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: hide preferences section if empty @louis-jan (#482)
|
||||
- chore: fix conversation summary @louis-jan (#480)
|
||||
- chore: missing create conversation button when there is no conversation is selected @louis-jan (#478)
|
||||
- fix: download now change state immediately @namchuai (#475)
|
||||
- chore: add required app version to edge release plugin @louis-jan (#471)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- add rebuild for mac x64 @hiento09 (#473)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add build deps for data-plugin in CI @hiento09 (#472)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @hientominh, @jan-service-account, @louis-jan and @namchuai
|
||||
## Changes
|
||||
|
||||
- fix: hide preferences section if empty @louis-jan (#482)
|
||||
- chore: fix conversation summary @louis-jan (#480)
|
||||
- chore: missing create conversation button when there is no conversation is selected @louis-jan (#478)
|
||||
- fix: download now change state immediately @namchuai (#475)
|
||||
- chore: add required app version to edge release plugin @louis-jan (#471)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- add rebuild for mac x64 @hiento09 (#473)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Add build deps for data-plugin in CI @hiento09 (#472)
|
||||
|
||||
## Contributor
|
||||
|
||||
@hiento09, @hientominh, @jan-service-account, @louis-jan and @namchuai
|
||||
|
||||
|
||||
@ -8,71 +8,71 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.3
|
||||
|
||||
Highlighted Issue: [Issue #580: fix: preformatted text indents the first line strangely](https://github.com/janhq/jan/pull/580)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: preformatted text indents the first line strangely @louis-jan (#580)
|
||||
- fix: failed to package app since core and uikit are not being built @louis-jan (#575)
|
||||
- cleanup: remove component folder and cleanup conversation screen @urmauur (#574)
|
||||
- bug: update convo state when user change model @urmauur (#571)
|
||||
- fix(#566): jan cannot retrieve the conversations @namchuai (#570)
|
||||
- bug: Toast messages shows [object object] @urmauur (#569)
|
||||
- ui: improve state of welcome screen @urmauur (#563)
|
||||
- chore: fixed an issue where app does not yield message result @louis-jan (#561)
|
||||
- Update readme @urmauur (#560)
|
||||
- ui: standalone UIKit and refactor @urmauur (#557)
|
||||
- Small description changes @dan-jan (#558)
|
||||
- add 'change download button based on OS' feature @Vikram-2004 (#551)
|
||||
- feat: revamp plugin architecture @louis-jan (#535)
|
||||
- Fix mobile padding @imtuyethan (#550)
|
||||
- chore: Update Readme @dan-jan (#549)
|
||||
- Update Homepage and README with 1-line pitch @dan-jan (#548)
|
||||
- docs: Add About, Events, Blog @dan-jan (#546)
|
||||
- Ashley/update website content @imtuyethan (#545)
|
||||
- Add guides @hahuyhoang411 (#488)
|
||||
- Structure Docs @dan-jan (#536)
|
||||
- Update README.md @imtuyethan (#533)
|
||||
- Chore: Setup "Jan Improvements Proposal" workflow @dan-jan (#534)
|
||||
- Update website tag line @imtuyethan (#527)
|
||||
- fix: #396 - allow user to cancel a model download @louis-jan (#530)
|
||||
- fix: #479 - Toggle plugin is now experimental feature @louis-jan (#531)
|
||||
- chore: disable app update on test @louis-jan (#521)
|
||||
- bug: chat UI is not consistent @urmauur (#520)
|
||||
- refactor: plugin manager and execution as ts @louis-jan (#504)
|
||||
- fix: app toolbar is gone on windows @louis-jan (#503)
|
||||
- Chore: refactor code, hide plugin menu in web @ghost (#502)
|
||||
- fix: dest.end is not a function @louis-jan (#501)
|
||||
- #255: Jan cloud native @ghost (#320)
|
||||
- bug: download new version should show in status bar @urmauur (#500)
|
||||
- feat: add New Conversation button on the conversation sidebar @urmauur (#499)
|
||||
- chore: update plugin readme @louis-jan (#497)
|
||||
- chore: update plugins license @louis-jan (#496)
|
||||
- #255: Read plugins manifest from CDN @ghost (#495)
|
||||
- chore: update plugin sdk - add appDataPath @louis-jan (#492)
|
||||
- chore: enable back bot function for edge-release @louis-jan (#474)
|
||||
- chore: attempt to kill Nitro subprocesses @louis-jan (#484)
|
||||
- docs: new dev hub @0xSage (#450)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Experimental Feature Toggle @louis-jan (#525)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Add rebuild leveldown for arm on mac intel @hiento09 (#487)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Bump nitro version from 0.1.4 to 0.1.6 @hiento09 (#581)
|
||||
- Add set yarn network timeout for uikit @hiento09 (#579)
|
||||
- Fix error CI e2e run failed on windows @hiento09 (#578)
|
||||
- Fix build plugins macos codesiging error @hiento09 (#576)
|
||||
- Add install nitro mac intel inference plugin build locally @hiento09 (#542)
|
||||
- Bump nitro version to 0.1.4 @hiento09 (#532)
|
||||
- Chore/update yarn dev script @hiento09 (#529)
|
||||
- Inference Plugin pull nitro binary from release @hiento09 (#524)
|
||||
- Correct version and license @hiento09 (#498)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Vikram-2004, @dan-jan, @hahuyhoang411, @hiento09, @imtuyethan, @jan-service-account, @louis-jan, @namchuai, @tikikun, @urmauur, Han, James, John and nam-john-ho
|
||||
## Changes
|
||||
|
||||
- fix: preformatted text indents the first line strangely @louis-jan (#580)
|
||||
- fix: failed to package app since core and uikit are not being built @louis-jan (#575)
|
||||
- cleanup: remove component folder and cleanup conversation screen @urmauur (#574)
|
||||
- bug: update convo state when user change model @urmauur (#571)
|
||||
- fix(#566): jan cannot retrieve the conversations @namchuai (#570)
|
||||
- bug: Toast messages shows [object object] @urmauur (#569)
|
||||
- ui: improve state of welcome screen @urmauur (#563)
|
||||
- chore: fixed an issue where app does not yield message result @louis-jan (#561)
|
||||
- Update readme @urmauur (#560)
|
||||
- ui: standalone UIKit and refactor @urmauur (#557)
|
||||
- Small description changes @dan-jan (#558)
|
||||
- add 'change download button based on OS' feature @Vikram-2004 (#551)
|
||||
- feat: revamp plugin architecture @louis-jan (#535)
|
||||
- Fix mobile padding @imtuyethan (#550)
|
||||
- chore: Update Readme @dan-jan (#549)
|
||||
- Update Homepage and README with 1-line pitch @dan-jan (#548)
|
||||
- docs: Add About, Events, Blog @dan-jan (#546)
|
||||
- Ashley/update website content @imtuyethan (#545)
|
||||
- Add guides @hahuyhoang411 (#488)
|
||||
- Structure Docs @dan-jan (#536)
|
||||
- Update README.md @imtuyethan (#533)
|
||||
- Chore: Setup "Jan Improvements Proposal" workflow @dan-jan (#534)
|
||||
- Update website tag line @imtuyethan (#527)
|
||||
- fix: #396 - allow user to cancel a model download @louis-jan (#530)
|
||||
- fix: #479 - Toggle plugin is now experimental feature @louis-jan (#531)
|
||||
- chore: disable app update on test @louis-jan (#521)
|
||||
- bug: chat UI is not consistent @urmauur (#520)
|
||||
- refactor: plugin manager and execution as ts @louis-jan (#504)
|
||||
- fix: app toolbar is gone on windows @louis-jan (#503)
|
||||
- Chore: refactor code, hide plugin menu in web @ghost (#502)
|
||||
- fix: dest.end is not a function @louis-jan (#501)
|
||||
- #255: Jan cloud native @ghost (#320)
|
||||
- bug: download new version should show in status bar @urmauur (#500)
|
||||
- feat: add New Conversation button on the conversation sidebar @urmauur (#499)
|
||||
- chore: update plugin readme @louis-jan (#497)
|
||||
- chore: update plugins license @louis-jan (#496)
|
||||
- #255: Read plugins manifest from CDN @ghost (#495)
|
||||
- chore: update plugin sdk - add appDataPath @louis-jan (#492)
|
||||
- chore: enable back bot function for edge-release @louis-jan (#474)
|
||||
- chore: attempt to kill Nitro subprocesses @louis-jan (#484)
|
||||
- docs: new dev hub @0xSage (#450)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Experimental Feature Toggle @louis-jan (#525)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Add rebuild leveldown for arm on mac intel @hiento09 (#487)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Bump nitro version from 0.1.4 to 0.1.6 @hiento09 (#581)
|
||||
- Add set yarn network timeout for uikit @hiento09 (#579)
|
||||
- Fix error CI e2e run failed on windows @hiento09 (#578)
|
||||
- Fix build plugins macos codesiging error @hiento09 (#576)
|
||||
- Add install nitro mac intel inference plugin build locally @hiento09 (#542)
|
||||
- Bump nitro version to 0.1.4 @hiento09 (#532)
|
||||
- Chore/update yarn dev script @hiento09 (#529)
|
||||
- Inference Plugin pull nitro binary from release @hiento09 (#524)
|
||||
- Correct version and license @hiento09 (#498)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Vikram-2004, @dan-jan, @hahuyhoang411, @hiento09, @imtuyethan, @jan-service-account, @louis-jan, @namchuai, @tikikun, @urmauur, Han, James, John and nam-john-ho
|
||||
|
||||
|
||||
@ -8,39 +8,39 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.3
|
||||
|
||||
Highlighted Issue: [Issue #612: fix: disabled required env](https://github.com/janhq/jan/pull/612)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix: disabled required env @urmauur (#612)
|
||||
- Install Posthog snippet @imtuyethan (#573)
|
||||
- web: google tag manager @urmauur (#562)
|
||||
- docs: fix syntax highlighting @0xSage (#602)
|
||||
- chore: remove past event @0xSage (#600)
|
||||
- docs: new docs @0xSage (#599)
|
||||
- [chore]: Update docs @dan-jan (#597)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- refactor: main electron with managers and handlers @louis-jan (#610)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Fix: Failed to load model - unload model nitro @louis-jan (#616)
|
||||
- Restore cpx nitro step in yarn script @hiento09 (#617)
|
||||
- fix(#591): prevent duplicate message id issue @namchuai (#595)
|
||||
- bug: cancelling a model download should be delete the model file on user data @urmauur (#613)
|
||||
- bug: fix weird padding vertical snippet code @urmauur (#608)
|
||||
- bug: Fix button download detect intel or apple silicon @urmauur (#609)
|
||||
- bug: enable delete conversation after deleted model @urmauur (#594)
|
||||
- bug: download modal should truncate model name @urmauur (#592)
|
||||
- bug: support multiple line input chat using Textarea instead @urmauur (#593)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- refactor: main electron with managers and handlers @louis-jan (#610)
|
||||
- Chore/refactor yarn script @hiento09 (#615)
|
||||
- fix: line height and update typography component @urmauur (#611)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @dan-jan, @hiento09, @imtuyethan, @jan-service-account, @louis-jan, @namchuai and @urmauur
|
||||
## Changes
|
||||
|
||||
- fix: disabled required env @urmauur (#612)
|
||||
- Install Posthog snippet @imtuyethan (#573)
|
||||
- web: google tag manager @urmauur (#562)
|
||||
- docs: fix syntax highlighting @0xSage (#602)
|
||||
- chore: remove past event @0xSage (#600)
|
||||
- docs: new docs @0xSage (#599)
|
||||
- [chore]: Update docs @dan-jan (#597)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- refactor: main electron with managers and handlers @louis-jan (#610)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- Fix: Failed to load model - unload model nitro @louis-jan (#616)
|
||||
- Restore cpx nitro step in yarn script @hiento09 (#617)
|
||||
- fix(#591): prevent duplicate message id issue @namchuai (#595)
|
||||
- bug: cancelling a model download should be delete the model file on user data @urmauur (#613)
|
||||
- bug: fix weird padding vertical snippet code @urmauur (#608)
|
||||
- bug: Fix button download detect intel or apple silicon @urmauur (#609)
|
||||
- bug: enable delete conversation after deleted model @urmauur (#594)
|
||||
- bug: download modal should truncate model name @urmauur (#592)
|
||||
- bug: support multiple line input chat using Textarea instead @urmauur (#593)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- refactor: main electron with managers and handlers @louis-jan (#610)
|
||||
- Chore/refactor yarn script @hiento09 (#615)
|
||||
- fix: line height and update typography component @urmauur (#611)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @dan-jan, @hiento09, @imtuyethan, @jan-service-account, @louis-jan, @namchuai and @urmauur
|
||||
|
||||
|
||||
@ -8,94 +8,94 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.3
|
||||
|
||||
Highlighted Issue: [Issue #719: docs: cleanup](https://github.com/janhq/jan/pull/719)
|
||||
|
||||
## Changes
|
||||
|
||||
- docs: cleanup @0xSage (#719)
|
||||
- docs: threads and messages @0xSage (#681)
|
||||
- Updating Onboarding Kit @Diane0111 (#675)
|
||||
- Update issue templates @0xSage (#685)
|
||||
- docs: polish models spec @0xSage (#680)
|
||||
- Feature: Preview URL for each PR and add pre-release.jan.ai as staging of Jan Docs @hiento09 (#669)
|
||||
- Migrate Model definitions to Swagger/OpenAPI @dan-jan (#659)
|
||||
- [docs] Add Introduction and refactor Models Spec @dan-jan (#657)
|
||||
- docs: Add model methods to swagger @0xSage (#660)
|
||||
- Models Spec: Delete broken Markdown links @dan-jan (#648)
|
||||
- docs: assistants and threads specs @0xSage (#646)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- improvement: styling message action toolbar @urmauur (#737)
|
||||
- experimental: allow user to give instruction for the conversation @louis-jan (#714)
|
||||
- docs/enable-seo-docusaurus @hieu-jan (#725)
|
||||
- Add windows code sign to CI @hiento09 (#712)
|
||||
- docs: update installation guide @hieu-jan (#664)
|
||||
- chore: Update based on team discussion on Nov 20 @vuonghoainam (#673)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Update landing page Jan @urmauur (#638)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- chore: open app data should lead user to jan root @louis-jan (#749)
|
||||
- fix: cancel download does not work @louis-jan (#746)
|
||||
- fix: error when switching between threads @louis-jan (#736)
|
||||
- chore: app raises error when attempting to start a model that is already starting @louis-jan (#721)
|
||||
- bug: fix filter list menu from command base on search type and make a symbol base on OS @urmauur (#723)
|
||||
- bug: fix clickable small download button on chat screen @urmauur (#722)
|
||||
- fix: incorrect update progress bar visibility check @louis-jan (#713)
|
||||
- fix: app shows wrong performance tag, all say not enough ram on windows @louis-jan (#699)
|
||||
- bug: fix padding quotations and numbering list @urmauur (#695)
|
||||
- fix: local npm module update does not reflect web app @louis-jan (#677)
|
||||
- [bug] fix markdown todo items shifted to the left and remove the dots @urmauur (#694)
|
||||
- bug: fix footer and section spacing landing page @urmauur (#683)
|
||||
- bug: fix anchor link sidebar openapi @urmauur (#668)
|
||||
- refactor: remove unused hooks and resolve no-explicit-any @louis-jan (#647)
|
||||
- bug: fix titles should have spaces in between @urmauur (#652)
|
||||
- bug: fix compatibility content not fully display @urmauur (#653)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: fix app grammar @0xSage (#750)
|
||||
- chore: bumb nitro version @louis-jan (#740)
|
||||
- chore: fs module should not cover app logic @louis-jan (#720)
|
||||
- API Reference for Models, Messages, Threads @hahuyhoang411 (#679)
|
||||
- docs: upgrade mdx-js package @hieu-jan (#705)
|
||||
- [docs] Update Docusaurus to 3.0 and fix closing tag issue in Handbook @dan-jan (#704)
|
||||
- Fix error docs pipeline run failed @hiento09 (#702)
|
||||
- Revert docs CICD trigger on push to main instead of tag-based @hiento09 (#698)
|
||||
- fix: local npm module update does not reflect web app @louis-jan (#677)
|
||||
- Chore: refactor to makefile @hiento09 (#691)
|
||||
- Add Instruction to publish docs @hiento09 (#687)
|
||||
- chore/add-mermaid @hieu-jan (#672)
|
||||
- chore/update package docs @hieu-jan (#670)
|
||||
- Enhance Cross-Platform Argument Handling for Nitro Startup Scripts @hiento09 (#674)
|
||||
- refactor: remove unused hooks and resolve no-explicit-any @louis-jan (#647)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Preliminary Restructure of Docs @dan-jan (#655)
|
||||
- Model specs @vuonghoainam (#641)
|
||||
- refactor: refactor app entities @louis-jan (#626)
|
||||
- refactor: move file to jan root @namchuai (#598)
|
||||
- Add run-script-os @linhtran174 (#620)
|
||||
- Refactor Jan Documentation @dan-jan (#625)
|
||||
|
||||
## 📖 Documentaion
|
||||
|
||||
- docs: update specs/product @0xSage (#744)
|
||||
- docs/enable-seo-docusaurus @hieu-jan (#725)
|
||||
- docs: assistant spec @vuonghoainam (#707)
|
||||
- docs: Refactor Jan Site Structure @dan-jan (#706)
|
||||
- docs/improve install docs @hieu-jan (#708)
|
||||
- API Reference for Models, Messages, Threads @hahuyhoang411 (#679)
|
||||
- [docs] Update Docusaurus to 3.0 and fix closing tag issue in Handbook @dan-jan (#704)
|
||||
- docs: update installation guide @hieu-jan (#664)
|
||||
- chore: Update based on team discussion on Nov 20 @vuonghoainam (#673)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Preliminary Restructure of Docs @dan-jan (#655)
|
||||
- Fix: specs revision @vuonghoainam (#649)
|
||||
- Model specs @vuonghoainam (#641)
|
||||
- Update README.md @imtuyethan (#629)
|
||||
- Refactor Jan Documentation @dan-jan (#625)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Diane0111, @dan-jan, @hahuyhoang411, @hiento09, @hieu-jan, @imtuyethan, @linhtran174, @louis-jan, @namchuai, @urmauur, @vuonghoainam and Le Tra Mi
|
||||
## Changes
|
||||
|
||||
- docs: cleanup @0xSage (#719)
|
||||
- docs: threads and messages @0xSage (#681)
|
||||
- Updating Onboarding Kit @Diane0111 (#675)
|
||||
- Update issue templates @0xSage (#685)
|
||||
- docs: polish models spec @0xSage (#680)
|
||||
- Feature: Preview URL for each PR and add pre-release.jan.ai as staging of Jan Docs @hiento09 (#669)
|
||||
- Migrate Model definitions to Swagger/OpenAPI @dan-jan (#659)
|
||||
- [docs] Add Introduction and refactor Models Spec @dan-jan (#657)
|
||||
- docs: Add model methods to swagger @0xSage (#660)
|
||||
- Models Spec: Delete broken Markdown links @dan-jan (#648)
|
||||
- docs: assistants and threads specs @0xSage (#646)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- improvement: styling message action toolbar @urmauur (#737)
|
||||
- experimental: allow user to give instruction for the conversation @louis-jan (#714)
|
||||
- docs/enable-seo-docusaurus @hieu-jan (#725)
|
||||
- Add windows code sign to CI @hiento09 (#712)
|
||||
- docs: update installation guide @hieu-jan (#664)
|
||||
- chore: Update based on team discussion on Nov 20 @vuonghoainam (#673)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Update landing page Jan @urmauur (#638)
|
||||
|
||||
## 🐛 Bug Fixes
|
||||
|
||||
- chore: open app data should lead user to jan root @louis-jan (#749)
|
||||
- fix: cancel download does not work @louis-jan (#746)
|
||||
- fix: error when switching between threads @louis-jan (#736)
|
||||
- chore: app raises error when attempting to start a model that is already starting @louis-jan (#721)
|
||||
- bug: fix filter list menu from command base on search type and make a symbol base on OS @urmauur (#723)
|
||||
- bug: fix clickable small download button on chat screen @urmauur (#722)
|
||||
- fix: incorrect update progress bar visibility check @louis-jan (#713)
|
||||
- fix: app shows wrong performance tag, all say not enough ram on windows @louis-jan (#699)
|
||||
- bug: fix padding quotations and numbering list @urmauur (#695)
|
||||
- fix: local npm module update does not reflect web app @louis-jan (#677)
|
||||
- [bug] fix markdown todo items shifted to the left and remove the dots @urmauur (#694)
|
||||
- bug: fix footer and section spacing landing page @urmauur (#683)
|
||||
- bug: fix anchor link sidebar openapi @urmauur (#668)
|
||||
- refactor: remove unused hooks and resolve no-explicit-any @louis-jan (#647)
|
||||
- bug: fix titles should have spaces in between @urmauur (#652)
|
||||
- bug: fix compatibility content not fully display @urmauur (#653)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: fix app grammar @0xSage (#750)
|
||||
- chore: bumb nitro version @louis-jan (#740)
|
||||
- chore: fs module should not cover app logic @louis-jan (#720)
|
||||
- API Reference for Models, Messages, Threads @hahuyhoang411 (#679)
|
||||
- docs: upgrade mdx-js package @hieu-jan (#705)
|
||||
- [docs] Update Docusaurus to 3.0 and fix closing tag issue in Handbook @dan-jan (#704)
|
||||
- Fix error docs pipeline run failed @hiento09 (#702)
|
||||
- Revert docs CICD trigger on push to main instead of tag-based @hiento09 (#698)
|
||||
- fix: local npm module update does not reflect web app @louis-jan (#677)
|
||||
- Chore: refactor to makefile @hiento09 (#691)
|
||||
- Add Instruction to publish docs @hiento09 (#687)
|
||||
- chore/add-mermaid @hieu-jan (#672)
|
||||
- chore/update package docs @hieu-jan (#670)
|
||||
- Enhance Cross-Platform Argument Handling for Nitro Startup Scripts @hiento09 (#674)
|
||||
- refactor: remove unused hooks and resolve no-explicit-any @louis-jan (#647)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Preliminary Restructure of Docs @dan-jan (#655)
|
||||
- Model specs @vuonghoainam (#641)
|
||||
- refactor: refactor app entities @louis-jan (#626)
|
||||
- refactor: move file to jan root @namchuai (#598)
|
||||
- Add run-script-os @linhtran174 (#620)
|
||||
- Refactor Jan Documentation @dan-jan (#625)
|
||||
|
||||
## 📖 Documentaion
|
||||
|
||||
- docs: update specs/product @0xSage (#744)
|
||||
- docs/enable-seo-docusaurus @hieu-jan (#725)
|
||||
- docs: assistant spec @vuonghoainam (#707)
|
||||
- docs: Refactor Jan Site Structure @dan-jan (#706)
|
||||
- docs/improve install docs @hieu-jan (#708)
|
||||
- API Reference for Models, Messages, Threads @hahuyhoang411 (#679)
|
||||
- [docs] Update Docusaurus to 3.0 and fix closing tag issue in Handbook @dan-jan (#704)
|
||||
- docs: update installation guide @hieu-jan (#664)
|
||||
- chore: Update based on team discussion on Nov 20 @vuonghoainam (#673)
|
||||
- docs: add OpenAI swagger file @hieu-jan (#623)
|
||||
- Preliminary Restructure of Docs @dan-jan (#655)
|
||||
- Fix: specs revision @vuonghoainam (#649)
|
||||
- Model specs @vuonghoainam (#641)
|
||||
- Update README.md @imtuyethan (#629)
|
||||
- Refactor Jan Documentation @dan-jan (#625)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Diane0111, @dan-jan, @hahuyhoang411, @hiento09, @hieu-jan, @imtuyethan, @linhtran174, @louis-jan, @namchuai, @urmauur, @vuonghoainam and Le Tra Mi
|
||||
|
||||
|
||||
@ -8,68 +8,68 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #878: bug: fix tag description showing a title and fix card right panel](https://github.com/janhq/jan/pull/878)
|
||||
|
||||
## Changes
|
||||
|
||||
- bug: fix tag description showing a title and fix card right panel @urmauur (#878)
|
||||
- fix/no-assistant-available-fresh-install @louis-jan (#876)
|
||||
- Model.json update @hahuyhoang411 (#870)
|
||||
- Hotfix desc for openhermes @hahuyhoang411 (#864)
|
||||
- Openhermes update v1 @hahuyhoang411 (#863)
|
||||
- update deepseek 1.3b @hahuyhoang411 (#858)
|
||||
- Update tags @hahuyhoang411 (#857)
|
||||
- Update model hub @hahuyhoang411 (#829)
|
||||
- hotfix: fix typo @tikikun (#836)
|
||||
- chore: pre-populate Jan's /models folder with model.jsons @hahuyhoang411 (#775)
|
||||
- chore: clarification changes to the model settings and model parameters @tikikun (#742)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: revamp landing page @urmauur (#745)
|
||||
- feat : add cover image model hub screen @urmauur (#872)
|
||||
- feat: boilerplate for express server localhost 1337 @linhtran174 (#803)
|
||||
- enhancement: revamp hub screen @urmauur (#825)
|
||||
- feat: revamp thread screen @urmauur (#802)
|
||||
- docs/update-api-reference @hieu-jan (#739)
|
||||
- refactor: model plugin to follow new specs @namchuai (#682)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: Nitro interface update to prevent warning @vuonghoainam (#877)
|
||||
- fix: delete message break the entire thread @louis-jan (#869)
|
||||
- fix: can not download multiple models at once @louis-jan (#867)
|
||||
- fix: production CI workflow does not populate models @louis-jan (#862)
|
||||
- fix: update wrong main view state when use a model @namchuai (#861)
|
||||
- fix: handle crash issue on hljs highlighting @louis-jan (#859)
|
||||
- fix: empty assistant instruction by default @louis-jan (#855)
|
||||
- bug: fix broken banner position hub screen @urmauur (#846)
|
||||
- fix: not update active model when using resend button @namchuai (#834)
|
||||
- Hotfix jan windows download nitro failed @hiento09 (#838)
|
||||
- Switch to download nitro .tar.gz file instead of .zip file on windows @hiento09 (#832)
|
||||
- fix/docusaurus-seo @hieu-jan (#818)
|
||||
- fix: CI script - reorder copy models action @louis-jan (#819)
|
||||
- fix: messages sync is not threadsafe @louis-jan (#784)
|
||||
- Fix Makefile Indentation Issue @hiento09 (#788)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: update model ranking @louis-jan (#874)
|
||||
- Bump nitro version to 0.1.21 - nitro has windows codesign @hiento09 (#843)
|
||||
- Hotfix jan windows download nitro failed @hiento09 (#838)
|
||||
- 810 docs add modeljson and revamp models specs page @tikikun (#816)
|
||||
- Add document for nightly build and update message for manual build @hiento09 (#831)
|
||||
- chore: Bump nitro to 0.1.20 @vuonghoainam (#830)
|
||||
- Refactor build:extension command @hiento09 (#822)
|
||||
- feat: pre-populate Jan's /models folder @namchuai (#796)
|
||||
- chore: fix pr auto labeling @0xSage (#812)
|
||||
- chore: add gi automations @0xSage (#809)
|
||||
- refactor: jan extensions @louis-jan (#799)
|
||||
- Remove .zip in artifact name @hiento09 (#800)
|
||||
- docs/update-api-reference @hieu-jan (#739)
|
||||
- Add nightly build ci @hiento09 (#794)
|
||||
- Fix Makefile Indentation Issue @hiento09 (#788)
|
||||
- Switch from .zip to .tar.gz for nitro url inference plugin @hiento09 (#781)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @linhtran174, @louis-jan, @namchuai, @tikikun, @urmauur and @vuonghoainam
|
||||
## Changes
|
||||
|
||||
- bug: fix tag description showing a title and fix card right panel @urmauur (#878)
|
||||
- fix/no-assistant-available-fresh-install @louis-jan (#876)
|
||||
- Model.json update @hahuyhoang411 (#870)
|
||||
- Hotfix desc for openhermes @hahuyhoang411 (#864)
|
||||
- Openhermes update v1 @hahuyhoang411 (#863)
|
||||
- update deepseek 1.3b @hahuyhoang411 (#858)
|
||||
- Update tags @hahuyhoang411 (#857)
|
||||
- Update model hub @hahuyhoang411 (#829)
|
||||
- hotfix: fix typo @tikikun (#836)
|
||||
- chore: pre-populate Jan's /models folder with model.jsons @hahuyhoang411 (#775)
|
||||
- chore: clarification changes to the model settings and model parameters @tikikun (#742)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: revamp landing page @urmauur (#745)
|
||||
- feat : add cover image model hub screen @urmauur (#872)
|
||||
- feat: boilerplate for express server localhost 1337 @linhtran174 (#803)
|
||||
- enhancement: revamp hub screen @urmauur (#825)
|
||||
- feat: revamp thread screen @urmauur (#802)
|
||||
- docs/update-api-reference @hieu-jan (#739)
|
||||
- refactor: model plugin to follow new specs @namchuai (#682)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: Nitro interface update to prevent warning @vuonghoainam (#877)
|
||||
- fix: delete message break the entire thread @louis-jan (#869)
|
||||
- fix: can not download multiple models at once @louis-jan (#867)
|
||||
- fix: production CI workflow does not populate models @louis-jan (#862)
|
||||
- fix: update wrong main view state when use a model @namchuai (#861)
|
||||
- fix: handle crash issue on hljs highlighting @louis-jan (#859)
|
||||
- fix: empty assistant instruction by default @louis-jan (#855)
|
||||
- bug: fix broken banner position hub screen @urmauur (#846)
|
||||
- fix: not update active model when using resend button @namchuai (#834)
|
||||
- Hotfix jan windows download nitro failed @hiento09 (#838)
|
||||
- Switch to download nitro .tar.gz file instead of .zip file on windows @hiento09 (#832)
|
||||
- fix/docusaurus-seo @hieu-jan (#818)
|
||||
- fix: CI script - reorder copy models action @louis-jan (#819)
|
||||
- fix: messages sync is not threadsafe @louis-jan (#784)
|
||||
- Fix Makefile Indentation Issue @hiento09 (#788)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: update model ranking @louis-jan (#874)
|
||||
- Bump nitro version to 0.1.21 - nitro has windows codesign @hiento09 (#843)
|
||||
- Hotfix jan windows download nitro failed @hiento09 (#838)
|
||||
- 810 docs add modeljson and revamp models specs page @tikikun (#816)
|
||||
- Add document for nightly build and update message for manual build @hiento09 (#831)
|
||||
- chore: Bump nitro to 0.1.20 @vuonghoainam (#830)
|
||||
- Refactor build:extension command @hiento09 (#822)
|
||||
- feat: pre-populate Jan's /models folder @namchuai (#796)
|
||||
- chore: fix pr auto labeling @0xSage (#812)
|
||||
- chore: add gi automations @0xSage (#809)
|
||||
- refactor: jan extensions @louis-jan (#799)
|
||||
- Remove .zip in artifact name @hiento09 (#800)
|
||||
- docs/update-api-reference @hieu-jan (#739)
|
||||
- Add nightly build ci @hiento09 (#794)
|
||||
- Fix Makefile Indentation Issue @hiento09 (#788)
|
||||
- Switch from .zip to .tar.gz for nitro url inference plugin @hiento09 (#781)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @linhtran174, @louis-jan, @namchuai, @tikikun, @urmauur and @vuonghoainam
|
||||
|
||||
|
||||
@ -8,55 +8,55 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #903: Update README.md](https://github.com/janhq/jan/pull/903)
|
||||
|
||||
## Changes
|
||||
|
||||
- Update README.md @imtuyethan (#903)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Kill nitro process with API - nitro 0.1.27 @vuonghoainam (#975)
|
||||
- feat: Inference Nitro with Prompt Template @hahuyhoang411 (#952)
|
||||
- feat: Add NVIDIA triton trt-llm extension @vuonghoainam (#888)
|
||||
- feat: Hotfit for Nitro loading on CPU with hyper-threading support @vuonghoainam (#931)
|
||||
- feat: adding model params @namchuai (#886)
|
||||
- feat: Multiple inference engines for nitro and openai @vuonghoainam (#814)
|
||||
- docs: add json schema for engine and model parameters @tikikun (#840)
|
||||
- feat: improve SEO keywords @hieu-jan (#894)
|
||||
- enhancement: fix spacing landing page responsive @urmauur (#891)
|
||||
- bug: added label coming soon for windows and linux @urmauur (#881)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: 963 can not run openai models on windows @louis-jan (#974)
|
||||
- fix: Inference engine Nitro with Windows with/ without CUDA @vuonghoainam (#950)
|
||||
- Fix error Jan app linux crash @hiento09 (#958)
|
||||
- fix: windows bug - control buttons close,max,min hidden @linhtran174 (#949)
|
||||
- bug: fix ui landing page @urmauur (#937)
|
||||
- fix: model parameters for inference extensions @vuonghoainam (#935)
|
||||
- [bug] Fix floating border outside card right panel @urmauur (#934)
|
||||
- fix: import\_typescript.default.isTokenKind is not a function @louis-jan (#923)
|
||||
- bug: fix syntax formatting @urmauur (#899)
|
||||
- bug: update metadata title and desc @urmauur (#884)
|
||||
- fix: download button text color is blending into the background @louis-jan (#883)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: add desktop app analytics @louis-jan (#978)
|
||||
- refactor: clean types and interfaces @0xSage (#966)
|
||||
- docs: scaffold dev docs @0xSage (#856)
|
||||
- chore: Bump nitro to 0.1.26 @vuonghoainam (#960)
|
||||
- Update update-release-url.yml @hiento09 (#951)
|
||||
- Fix update release url pipeline run failed @hiento09 (#947)
|
||||
- chore: Bumpt nitro bin version to version 0.1.23 @vuonghoainam (#942)
|
||||
- Fix update release url pipeline @hiento09 (#941)
|
||||
- CI automatically update Update README with Nightly Build Information and stable download URL @hiento09 (#940)
|
||||
- refactor: deprecate invokers - auto proxying apis - strict types @louis-jan (#924)
|
||||
- docs: standardize yaml files @hieu-jan (#933)
|
||||
- chore: universal module definition @louis-jan (#902)
|
||||
- docs: add assistants api reference @hieu-jan (#801)
|
||||
- docs: add json schema for engine and model parameters @tikikun (#840)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @imtuyethan, @jan-service-account, @linhtran174, @louis-jan, @namchuai, @tikikun, @urmauur and @vuonghoainam
|
||||
## Changes
|
||||
|
||||
- Update README.md @imtuyethan (#903)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Kill nitro process with API - nitro 0.1.27 @vuonghoainam (#975)
|
||||
- feat: Inference Nitro with Prompt Template @hahuyhoang411 (#952)
|
||||
- feat: Add NVIDIA triton trt-llm extension @vuonghoainam (#888)
|
||||
- feat: Hotfit for Nitro loading on CPU with hyper-threading support @vuonghoainam (#931)
|
||||
- feat: adding model params @namchuai (#886)
|
||||
- feat: Multiple inference engines for nitro and openai @vuonghoainam (#814)
|
||||
- docs: add json schema for engine and model parameters @tikikun (#840)
|
||||
- feat: improve SEO keywords @hieu-jan (#894)
|
||||
- enhancement: fix spacing landing page responsive @urmauur (#891)
|
||||
- bug: added label coming soon for windows and linux @urmauur (#881)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: 963 can not run openai models on windows @louis-jan (#974)
|
||||
- fix: Inference engine Nitro with Windows with/ without CUDA @vuonghoainam (#950)
|
||||
- Fix error Jan app linux crash @hiento09 (#958)
|
||||
- fix: windows bug - control buttons close,max,min hidden @linhtran174 (#949)
|
||||
- bug: fix ui landing page @urmauur (#937)
|
||||
- fix: model parameters for inference extensions @vuonghoainam (#935)
|
||||
- [bug] Fix floating border outside card right panel @urmauur (#934)
|
||||
- fix: import\_typescript.default.isTokenKind is not a function @louis-jan (#923)
|
||||
- bug: fix syntax formatting @urmauur (#899)
|
||||
- bug: update metadata title and desc @urmauur (#884)
|
||||
- fix: download button text color is blending into the background @louis-jan (#883)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: add desktop app analytics @louis-jan (#978)
|
||||
- refactor: clean types and interfaces @0xSage (#966)
|
||||
- docs: scaffold dev docs @0xSage (#856)
|
||||
- chore: Bump nitro to 0.1.26 @vuonghoainam (#960)
|
||||
- Update update-release-url.yml @hiento09 (#951)
|
||||
- Fix update release url pipeline run failed @hiento09 (#947)
|
||||
- chore: Bumpt nitro bin version to version 0.1.23 @vuonghoainam (#942)
|
||||
- Fix update release url pipeline @hiento09 (#941)
|
||||
- CI automatically update Update README with Nightly Build Information and stable download URL @hiento09 (#940)
|
||||
- refactor: deprecate invokers - auto proxying apis - strict types @louis-jan (#924)
|
||||
- docs: standardize yaml files @hieu-jan (#933)
|
||||
- chore: universal module definition @louis-jan (#902)
|
||||
- docs: add assistants api reference @hieu-jan (#801)
|
||||
- docs: add json schema for engine and model parameters @tikikun (#840)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @imtuyethan, @jan-service-account, @linhtran174, @louis-jan, @namchuai, @tikikun, @urmauur and @vuonghoainam
|
||||
|
||||
|
||||
@ -8,43 +8,43 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #1033: Hotfix model hub](https://github.com/janhq/jan/pull/1033)
|
||||
|
||||
## Changes
|
||||
|
||||
- Hotfix model hub @hahuyhoang411 (#1033)
|
||||
- Update Model.json @hahuyhoang411 (#1005)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: app theme depend on local storage instead native theme electron @urmauur (#1014)
|
||||
- feat: move stop inference button into the send button @urmauur (#1011)
|
||||
- feat: loader when starting model @urmauur (#945)
|
||||
- fix: enable download app linux @urmauur (#993)
|
||||
- fix: remove coming soon windows @urmauur (#986)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: migrate new models @louis-jan (#1034)
|
||||
- fix: add input for api key remote model @urmauur (#1031)
|
||||
- fix bug #1013, enable posthog for release app version only @hiento09 (#1019)
|
||||
- fix: delete first message then regenerate again will break the thread @louis-jan (#1015)
|
||||
- fix: #995 - Fix onboarding state and model sorting @louis-jan (#1009)
|
||||
- fix: limit analytics events capture @louis-jan (#1012)
|
||||
- fix: wrong selected model right panel @urmauur (#1001)
|
||||
- fix: review finder and view as json @louis-jan (#1000)
|
||||
- fix: enable download app linux @urmauur (#993)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: remigrate if there is no models dir @louis-jan (#1038)
|
||||
- bump nitro version to 0.1.30 @hiento09 (#1036)
|
||||
- chore: in app copy fixes @0xSage (#1032)
|
||||
- Separate posthog project for jan app and docs @hiento09 (#1029)
|
||||
- Update posthog capture url list @hiento09 (#1022)
|
||||
- docs: second half of "import model docs" PR @0xSage (#1021)
|
||||
- docs: how to import models @0xSage (#1020)
|
||||
- fix bug #1013, enable posthog for release app version only @hiento09 (#1019)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @jan-service-account, @louis-jan and @urmauur
|
||||
## Changes
|
||||
|
||||
- Hotfix model hub @hahuyhoang411 (#1033)
|
||||
- Update Model.json @hahuyhoang411 (#1005)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: app theme depend on local storage instead native theme electron @urmauur (#1014)
|
||||
- feat: move stop inference button into the send button @urmauur (#1011)
|
||||
- feat: loader when starting model @urmauur (#945)
|
||||
- fix: enable download app linux @urmauur (#993)
|
||||
- fix: remove coming soon windows @urmauur (#986)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: migrate new models @louis-jan (#1034)
|
||||
- fix: add input for api key remote model @urmauur (#1031)
|
||||
- fix bug #1013, enable posthog for release app version only @hiento09 (#1019)
|
||||
- fix: delete first message then regenerate again will break the thread @louis-jan (#1015)
|
||||
- fix: #995 - Fix onboarding state and model sorting @louis-jan (#1009)
|
||||
- fix: limit analytics events capture @louis-jan (#1012)
|
||||
- fix: wrong selected model right panel @urmauur (#1001)
|
||||
- fix: review finder and view as json @louis-jan (#1000)
|
||||
- fix: enable download app linux @urmauur (#993)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: remigrate if there is no models dir @louis-jan (#1038)
|
||||
- bump nitro version to 0.1.30 @hiento09 (#1036)
|
||||
- chore: in app copy fixes @0xSage (#1032)
|
||||
- Separate posthog project for jan app and docs @hiento09 (#1029)
|
||||
- Update posthog capture url list @hiento09 (#1022)
|
||||
- docs: second half of "import model docs" PR @0xSage (#1021)
|
||||
- docs: how to import models @0xSage (#1020)
|
||||
- fix bug #1013, enable posthog for release app version only @hiento09 (#1019)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @jan-service-account, @louis-jan and @urmauur
|
||||
|
||||
|
||||
@ -8,62 +8,62 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #1159: Hotfix Prompt template for models on the Hub](https://github.com/janhq/jan/pull/1159)
|
||||
|
||||
## Changes
|
||||
|
||||
- Hotfix Prompt template for models on the Hub @hahuyhoang411 (#1159)
|
||||
- Update model list for new release @hahuyhoang411 (#1143)
|
||||
- fix(Thread): #1119 focus on the first thread to prevent blank chat screen @namchuai (#1127)
|
||||
- fix(Thread): #1064 message being added to wrong thread if switching thread @namchuai (#1108)
|
||||
- fix(Thread): #1042 allow create new thread by clicking Use in Jan Hub @namchuai (#1103)
|
||||
- feat(ModelSetting): #1065 update state of model setting between threads @namchuai (#1090)
|
||||
- Update model version @hahuyhoang411 (#1086)
|
||||
- fix: cache hallucinations and failed to load model due to race condition @louis-jan (#1071)
|
||||
- fix(thread): #1043 default model to prefer active model @namchuai (#1070)
|
||||
- Update issue templates @0xSage (#1058)
|
||||
- Update ctx\_len and max\_tokens @hahuyhoang411 (#1035)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add codeQL analysis for push main and pr main @hiro-v (#1128)
|
||||
- Feature autoupdater for nightly build @hiento09 (#1068)
|
||||
- feat: copy button for code block @urmauur (#1062)
|
||||
- Enhancements to Dependency Installation and App Testing @hiento09 (#965)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: error road map url @hieu-jan (#1153)
|
||||
- Fix token speed slow in machine has multi gpus @hiento09 (#1157)
|
||||
- fix: added dialog confirmation clean thread @urmauur (#1142)
|
||||
- fix: remove remote model from shortcut models dialog @urmauur (#1124)
|
||||
- fix: ui issue - all models are activated @louis-jan (#1120)
|
||||
- fix: should not hide empty message away @louis-jan (#1116)
|
||||
- fix: added tooltip for user cannot change model after starting thread @urmauur (#1115)
|
||||
- fix: remote model always active badges @urmauur (#1113)
|
||||
- fix: handle chat completion state with enter button @louis-jan (#1114)
|
||||
- fix: model active indicator only show when model activated @urmauur (#1110)
|
||||
- fix: #1096 yield error message upon thread switching @louis-jan (#1109)
|
||||
- fix: toaster success deleted thread showing id instead of active model @urmauur (#1111)
|
||||
- fix: update copy setting page @urmauur (#1105)
|
||||
- fix: search recommended model @urmauur (#1106)
|
||||
- fix: #1097 streaming response is replaced by error message @louis-jan (#1099)
|
||||
- Fix auto update windows Bug @hiento09 (#1102)
|
||||
- fix: added dialog confirmation when delete thread @urmauur (#1093)
|
||||
- fix: system monitor broken layout when responsive @urmauur (#1085)
|
||||
- bug: chatbox doesn't resize back down @urmauur (#1084)
|
||||
- fix: thread is broken after deleted first generated message @louis-jan (#1061)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- feat: Add codeQL analysis for push main and pr main @hiro-v (#1128)
|
||||
- docs: refactor dev docs, guides and specs @0xSage (#1092)
|
||||
- Correct jq command cause ci nightly build run failed @hiento09 (#1104)
|
||||
- Fix nightly build autoupdater @hiento09 (#1073)
|
||||
- Feature autoupdater for nightly build @hiento09 (#1068)
|
||||
- docs: Update product.md @0xSage (#1066)
|
||||
- Posthog disable click event and increase timeout for nitro load model… @hiento09 (#1060)
|
||||
- docs: improve quickstart docs @0xSage (#1047)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @namchuai and @urmauur
|
||||
## Changes
|
||||
|
||||
- Hotfix Prompt template for models on the Hub @hahuyhoang411 (#1159)
|
||||
- Update model list for new release @hahuyhoang411 (#1143)
|
||||
- fix(Thread): #1119 focus on the first thread to prevent blank chat screen @namchuai (#1127)
|
||||
- fix(Thread): #1064 message being added to wrong thread if switching thread @namchuai (#1108)
|
||||
- fix(Thread): #1042 allow create new thread by clicking Use in Jan Hub @namchuai (#1103)
|
||||
- feat(ModelSetting): #1065 update state of model setting between threads @namchuai (#1090)
|
||||
- Update model version @hahuyhoang411 (#1086)
|
||||
- fix: cache hallucinations and failed to load model due to race condition @louis-jan (#1071)
|
||||
- fix(thread): #1043 default model to prefer active model @namchuai (#1070)
|
||||
- Update issue templates @0xSage (#1058)
|
||||
- Update ctx\_len and max\_tokens @hahuyhoang411 (#1035)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add codeQL analysis for push main and pr main @hiro-v (#1128)
|
||||
- Feature autoupdater for nightly build @hiento09 (#1068)
|
||||
- feat: copy button for code block @urmauur (#1062)
|
||||
- Enhancements to Dependency Installation and App Testing @hiento09 (#965)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: error road map url @hieu-jan (#1153)
|
||||
- Fix token speed slow in machine has multi gpus @hiento09 (#1157)
|
||||
- fix: added dialog confirmation clean thread @urmauur (#1142)
|
||||
- fix: remove remote model from shortcut models dialog @urmauur (#1124)
|
||||
- fix: ui issue - all models are activated @louis-jan (#1120)
|
||||
- fix: should not hide empty message away @louis-jan (#1116)
|
||||
- fix: added tooltip for user cannot change model after starting thread @urmauur (#1115)
|
||||
- fix: remote model always active badges @urmauur (#1113)
|
||||
- fix: handle chat completion state with enter button @louis-jan (#1114)
|
||||
- fix: model active indicator only show when model activated @urmauur (#1110)
|
||||
- fix: #1096 yield error message upon thread switching @louis-jan (#1109)
|
||||
- fix: toaster success deleted thread showing id instead of active model @urmauur (#1111)
|
||||
- fix: update copy setting page @urmauur (#1105)
|
||||
- fix: search recommended model @urmauur (#1106)
|
||||
- fix: #1097 streaming response is replaced by error message @louis-jan (#1099)
|
||||
- Fix auto update windows Bug @hiento09 (#1102)
|
||||
- fix: added dialog confirmation when delete thread @urmauur (#1093)
|
||||
- fix: system monitor broken layout when responsive @urmauur (#1085)
|
||||
- bug: chatbox doesn't resize back down @urmauur (#1084)
|
||||
- fix: thread is broken after deleted first generated message @louis-jan (#1061)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- feat: Add codeQL analysis for push main and pr main @hiro-v (#1128)
|
||||
- docs: refactor dev docs, guides and specs @0xSage (#1092)
|
||||
- Correct jq command cause ci nightly build run failed @hiento09 (#1104)
|
||||
- Fix nightly build autoupdater @hiento09 (#1073)
|
||||
- Feature autoupdater for nightly build @hiento09 (#1068)
|
||||
- docs: Update product.md @0xSage (#1066)
|
||||
- Posthog disable click event and increase timeout for nitro load model… @hiento09 (#1060)
|
||||
- docs: improve quickstart docs @0xSage (#1047)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @hahuyhoang411, @hiento09, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @namchuai and @urmauur
|
||||
|
||||
|
||||
@ -8,191 +8,191 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #1587: Update 2023-11-05-hello-world.md](https://github.com/janhq/jan/pull/1587)
|
||||
|
||||
## Changes
|
||||
|
||||
- Update 2023-11-05-hello-world.md @Ssstars (#1587)
|
||||
- fix(API): #1511 update swagger page @namchuai (#1572)
|
||||
- fix(Thread): #1212 thread.json not created when user change thread settings @namchuai (#1570)
|
||||
- fix(Thread): #1336 not allow creating too many unfinished thread @namchuai (#1538)
|
||||
- Update 01-how-to-get-involved-and-FAQ.mdx @Ssstars (#1555)
|
||||
- Update 01-how-to-get-involved-and-FAQ.mdx @Ssstars (#1553)
|
||||
- Update 02-embracing-pod-structure.mdx @Ssstars (#1550)
|
||||
- Update 01-how-we-hire.mdx @Ssstars (#1551)
|
||||
- Update 01-how-we-hire.mdx @Ssstars (#1524)
|
||||
- fix(InferenceExtension): #1067 sync the nitro process state @namchuai (#1493)
|
||||
- fix(Messages): #1434 create message via api does not display on app correctly @namchuai (#1479)
|
||||
- Docs for the Integration of Continue and Jan in VSCode @0xgokuz (#1467)
|
||||
- Chore: Update model.json for UI @hahuyhoang411 (#1448)
|
||||
- Docs for Installing Models from Hub @0xgokuz (#1450)
|
||||
- Update about.md @Ssstars (#1436)
|
||||
- feat(UI): #1404 make left side bar collapsible by hot key @namchuai (#1420)
|
||||
- docs: Typo in 06-hardware.md @akaMrNagar (#1408)
|
||||
- fix(API): #1409 fix wrong prefix for threads api @namchuai (#1410)
|
||||
- Update model hub @hahuyhoang411 (#1383)
|
||||
- fix(Model): remove unsupported default model setting params @namchuai (#1382)
|
||||
- fix(trinity): update cover path for trinity v1.2 @hahuyhoang411 (#1380)
|
||||
- Chore/update model hub @hahuyhoang411 (#1342)
|
||||
- Update about.md @Ssstars (#1359)
|
||||
- fix(JanHub): #1158 sort model list @namchuai (#1257)
|
||||
- fix(Message): open link with external browser @namchuai (#1339)
|
||||
- feat(Model): #1028 made model.json optional @namchuai (#1314)
|
||||
- docs: Update onboarding.md @Diane0111 (#1293)
|
||||
- fix: clean resource on exit @louis-jan (#1290)
|
||||
- fix: posthog configuration @hieu-jan (#1283)
|
||||
- docs: update README.md @eltociear (#1277)
|
||||
- Enable scrolling in the message chat box @Gri-ffin (#1280)
|
||||
- chore: Update README.md @sr-albert (#1263)
|
||||
- Adding new model to the Hub @hahuyhoang411 (#1213)
|
||||
- Feature GPU detection for Jan on Windows and Linux @hiento09 (#1242)
|
||||
- fix(Thread): #1168 fix newly created thread cannot select model after restart @namchuai (#1176)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: add compatibility tag to model selection in right panel @urmauur (#1552)
|
||||
- Feature integrate antivirus scanner to ci @hiento09 (#1529)
|
||||
- feat: [hub] update compatibility tags colors @urmauur (#1516)
|
||||
- feat: hub recommendation labels @urmauur (#1440)
|
||||
- Feature linux support app image format @hiento09 (#1442)
|
||||
- fix: render external links @urmauur (#1441)
|
||||
- fix: add icon collapsible left panel and update keyboard shortcut page @urmauur (#1439)
|
||||
- feat(UI): update UI footer @urmauur (#1424)
|
||||
- Fix Bug for Chat Reply Goes off Screen @mishrababhishek (#1393)
|
||||
- feat: move social media from left panel into footer @urmauur (#1325)
|
||||
- feat: implementation new UI thread settings @urmauur (#1301)
|
||||
- Bring social media links @Gri-ffin (#1295)
|
||||
- feat: added keyboard shortcut list in setting page @urmauur (#1275)
|
||||
- feat: add swagger /docs to localhost:1337 @louis-jan (#1268)
|
||||
- feat: update posthog configuration @hieu-jan (#1258)
|
||||
- feat: Deprecate model.json ready state in favor of .download ext @louis-jan (#1238)
|
||||
- feat: add engine settings @namchuai (#1199)
|
||||
- feat: users should be able to switch models mid-thread @louis-jan (#1226)
|
||||
- feat: temporary link how to import model @urmauur (#1209)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: #1594 - Model settings - change thread model - go back does not see according settings @louis-jan (#1595)
|
||||
- fix: #1548 - duplicate command shortcut instruction @louis-jan (#1600)
|
||||
- fix: switch model caused app crash @louis-jan (#1597)
|
||||
- fix: #1559 Inference Parameters displayed on new thread with Openai GPT Model @louis-jan (#1588)
|
||||
- fix: enable user set value manually model setting from input @urmauur (#1585)
|
||||
- fix: #1569 - Does not apply thread settings when loading model @louis-jan (#1576)
|
||||
- fix: could not change model params settings @louis-jan (#1547)
|
||||
- fix: gpu check module export does not work in extension @louis-jan (#1536)
|
||||
- fix: adjust calculation hub labels using total RAM instead remaining RAM @urmauur (#1522)
|
||||
- Feature integrate antivirus scanner to ci @hiento09 (#1529)
|
||||
- fix: allow users to set max tokens variably @urmauur (#1513)
|
||||
- fix: stop word update @louis-jan (#1457)
|
||||
- Revert nitro to 0.2.6 @hiento09 (#1491)
|
||||
- fix: enable text selection codeblock @urmauur (#1466)
|
||||
- fix: suppress all main node JS error message dialog @louis-jan (#1460)
|
||||
- Correct AppImage path @hiento09 (#1446)
|
||||
- fix: render external links @urmauur (#1441)
|
||||
- fix: add icon collapsible left panel and update keyboard shortcut page @urmauur (#1439)
|
||||
- fix: GET /models does not work due to new default model dir @louis-jan (#1392)
|
||||
- fix: model migration stopped working @louis-jan (#1378)
|
||||
- fix: wrong condition for displaying error message @louis-jan (#1376)
|
||||
- fix: show hide section engine params @urmauur (#1374)
|
||||
- fix: copy stream tooltip and hide section when no params setting @urmauur (#1373)
|
||||
- bugs: fix stop streaming when user delete or clean thread @urmauur (#1347)
|
||||
- fix: show a proper error message on download failure @louis-jan (#1345)
|
||||
- Add detect cuda version jan app @hiento09 (#1351)
|
||||
- fix: Error occurred: Unexpected token "d", "data: ..." is not a valid JSON @louis-jan (#1332)
|
||||
- fix: app getting stuck at downloading 99% while downloading model @louis-jan (#1320)
|
||||
- correct type utf-8 @hiento09 (#1311)
|
||||
- Fix memory on mac included cached and swap @hiento09 (#1298)
|
||||
- fix: should check app dir before spawning log @louis-jan (#1297)
|
||||
- fix: disable process logging from server @louis-jan (#1296)
|
||||
- fix: user should be able to access Swagger docs from localhost:1337 @louis-jan (#1292)
|
||||
- Switch from Gigabyte to Gibibyte - System monitor @hiento09 (#1286)
|
||||
- Switch from systeminformation to os-utils to resolve Bitdefender false positive and memory leak issue @hiento09 (#1282)
|
||||
- fix: swagger CSP issue @louis-jan (#1284)
|
||||
- fix: support markdown break line @urmauur (#1274)
|
||||
- fix ci test run failed @hiento09 (#1267)
|
||||
- Fix wrong linux nitro path @hiento09 (#1266)
|
||||
- fix: enable command enter on dialog confirmation clean thread @urmauur (#1261)
|
||||
- fix: input message duplicated due with some input sources @louis-jan (#1259)
|
||||
- fix: mac users should not see GPU settings @louis-jan (#1255)
|
||||
- fix: remove redundant gpu detection prompt event @louis-jan (#1254)
|
||||
- fix: engine settings GUI - feature toggle @louis-jan (#1252)
|
||||
- Fix bug #1178 high ram on windows @hiento09 (#1241)
|
||||
- fix: #1183 Reveal in finder does not work on windows @namchuai (#1239)
|
||||
- fix: remove delay tooltip and click event @urmauur (#1217)
|
||||
- fix: enable enter command on dialog confirmation delete thread @urmauur (#1218)
|
||||
- fix: Cleared thread last message is not updated @louis-jan (#1225)
|
||||
- Fix switch thread crash nitro windows linux @hiento09 (#1214)
|
||||
- fix: darkmode broken color @urmauur (#1186)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: typo model.json @louis-jan (#1599)
|
||||
- docs: add 04-how-to-get-error-logs.mdx @hieu-jan (#1580)
|
||||
- chore: teach how to attach logs @0xSage (#1578)
|
||||
- chore: issues should auto close with PRs through template @0xSage (#1577)
|
||||
- chore: Update issue templates @0xSage (#1568)
|
||||
- docs: fix x handles @0xSage (#1532)
|
||||
- Docs to integrate OpenRouter with Jan without UI/UX @0xgokuz (#1495)
|
||||
- chore: fix darkmode docs @hieu-jan (#1520)
|
||||
- docs: fix algolia configuration @hieu-jan (#1518)
|
||||
- docs: fix algolia configuration @hieu-jan (#1517)
|
||||
- Revert URL release in readme to version 0.4.3 @hiento09 (#1502)
|
||||
- refactor: add app and nitro log - resolve dependencies issue @louis-jan (#1447)
|
||||
- chore: enable agolia @hieu-jan (#1497)
|
||||
- docs: update troubleshooting and redirects old pages @hieu-jan (#1492)
|
||||
- docs: minor fix @hieu-jan (#1478)
|
||||
- docs: initial handbook structure @hieu-jan (#1477)
|
||||
- Bump nitro to 0.2.8 and change Jan App to support cuda >= 11.7 @hiento09 (#1476)
|
||||
- Chore update docs jan - add AppImage instruction to docusaurus @hiento09 (#1480)
|
||||
- Bump nitro to 0.2.7 @hiento09 (#1474)
|
||||
- chore: error message update @louis-jan (#1473)
|
||||
- docs: Update 02-import-manually.mdx @0xSage (#1469)
|
||||
- docs: Update about.md @0xSage (#1465)
|
||||
- Bump nitro version to 0.2.6 @hiento09 (#1458)
|
||||
- docs: adding customize engine settings @hieu-jan (#1455)
|
||||
- docs: add-missing-path @hieu-jan (#1454)
|
||||
- docs: resize gif @hieu-jan (#1453)
|
||||
- docs: revenue philosophy @0xSage (#1443)
|
||||
- docs: jan framework principles @0xSage (#1438)
|
||||
- docs: fix typo in docs @hieu-jan (#1419)
|
||||
- chore: clean up use os hook @namchuai (#1418)
|
||||
- docs: explain each docs page intent @0xSage (#1417)
|
||||
- docs: Update 01-server.md @0xSage (#1416)
|
||||
- Update warning url from github md file to jan.ai docs site @hiento09 (#1414)
|
||||
- docs: improve gpu not used guide @hieu-jan (#1405)
|
||||
- chore: update README.md @eltociear (#1406)
|
||||
- Update USAGE docs for linux @hiento09 (#1401)
|
||||
- docs: gpu not detected @0xSage (#1399)
|
||||
- docs: Troubleshoot Failed To Fetch @gabrielle-ong (#1398)
|
||||
- docs: improve docs syntax @hieu-jan (#1394)
|
||||
- docs: add-install-nightly-guide @hieu-jan (#1390)
|
||||
- docs: correct href link @hieu-jan (#1338)
|
||||
- docs: fix chat payload and cURL @hieu-jan (#1360)
|
||||
- docs: add Chatting Guide @hieu-jan (#1184)
|
||||
- Chore add docs usage how to switch run mode jan app @hiento09 (#1353)
|
||||
- docs: configure index page @hieu-jan (#1330)
|
||||
- docs: Update product.md @0xSage (#1326)
|
||||
- docs: Update 01-server.md @0xSage (#1327)
|
||||
- refactor: deprecate the appVersion IPC and use the predefined VERSION @louis-jan (#1309)
|
||||
- docs: update using models documentation @hieu-jan (#1288)
|
||||
- docs: update pm handbook @0xSage (#1307)
|
||||
- docs: contributor docs overview @0xSage (#1305)
|
||||
- chore: github PR template @0xSage (#1304)
|
||||
- Fix memory on mac included cached and swap @hiento09 (#1298)
|
||||
- Enrich discord message for nightly build url @hiento09 (#1294)
|
||||
- Refactor CI by create shared jobs output @hiento09 (#1287)
|
||||
- docs: update README.md @hieu-jan (#1281)
|
||||
- docs: Update README.md @0xSage (#1248)
|
||||
- feat: Jan Server, API and decoupled clients @louis-jan (#948)
|
||||
- docs: improve 02-import-manually @hieu-jan (#1222)
|
||||
- chore: Update issue templates @0xSage (#1229)
|
||||
- docs: Update 02-import-manually.mdx @0xSage (#1197)
|
||||
- add sleep 500ms if platform is windows before starting nitro process @hiento09 (#1215)
|
||||
- docs: improve troubleshoot documentation @hieu-jan (#1173)
|
||||
- docs: update bug report template @hieu-jan (#1180)
|
||||
- docs: add troubleshooting @hieu-jan (#1169)
|
||||
- chore: copy fixes @0xSage (#1167)
|
||||
- docs: Update 01-start-thread.md @0xSage (#1122)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @0xgokuz, @Diane0111, @Gri-ffin, @Ssstars, @akaMrNagar, @eltociear, @gabrielle-ong, @hahuyhoang411, @hiento09, @hieu-jan, @jan-service-account, @louis-jan, @mishrababhishek, @namchuai, @sr-albert, @urmauur and Abhishek Mishra
|
||||
## Changes
|
||||
|
||||
- Update 2023-11-05-hello-world.md @Ssstars (#1587)
|
||||
- fix(API): #1511 update swagger page @namchuai (#1572)
|
||||
- fix(Thread): #1212 thread.json not created when user change thread settings @namchuai (#1570)
|
||||
- fix(Thread): #1336 not allow creating too many unfinished thread @namchuai (#1538)
|
||||
- Update 01-how-to-get-involved-and-FAQ.mdx @Ssstars (#1555)
|
||||
- Update 01-how-to-get-involved-and-FAQ.mdx @Ssstars (#1553)
|
||||
- Update 02-embracing-pod-structure.mdx @Ssstars (#1550)
|
||||
- Update 01-how-we-hire.mdx @Ssstars (#1551)
|
||||
- Update 01-how-we-hire.mdx @Ssstars (#1524)
|
||||
- fix(InferenceExtension): #1067 sync the nitro process state @namchuai (#1493)
|
||||
- fix(Messages): #1434 create message via api does not display on app correctly @namchuai (#1479)
|
||||
- Docs for the Integration of Continue and Jan in VSCode @0xgokuz (#1467)
|
||||
- Chore: Update model.json for UI @hahuyhoang411 (#1448)
|
||||
- Docs for Installing Models from Hub @0xgokuz (#1450)
|
||||
- Update about.md @Ssstars (#1436)
|
||||
- feat(UI): #1404 make left side bar collapsible by hot key @namchuai (#1420)
|
||||
- docs: Typo in 06-hardware.md @akaMrNagar (#1408)
|
||||
- fix(API): #1409 fix wrong prefix for threads api @namchuai (#1410)
|
||||
- Update model hub @hahuyhoang411 (#1383)
|
||||
- fix(Model): remove unsupported default model setting params @namchuai (#1382)
|
||||
- fix(trinity): update cover path for trinity v1.2 @hahuyhoang411 (#1380)
|
||||
- Chore/update model hub @hahuyhoang411 (#1342)
|
||||
- Update about.md @Ssstars (#1359)
|
||||
- fix(JanHub): #1158 sort model list @namchuai (#1257)
|
||||
- fix(Message): open link with external browser @namchuai (#1339)
|
||||
- feat(Model): #1028 made model.json optional @namchuai (#1314)
|
||||
- docs: Update onboarding.md @Diane0111 (#1293)
|
||||
- fix: clean resource on exit @louis-jan (#1290)
|
||||
- fix: posthog configuration @hieu-jan (#1283)
|
||||
- docs: update README.md @eltociear (#1277)
|
||||
- Enable scrolling in the message chat box @Gri-ffin (#1280)
|
||||
- chore: Update README.md @sr-albert (#1263)
|
||||
- Adding new model to the Hub @hahuyhoang411 (#1213)
|
||||
- Feature GPU detection for Jan on Windows and Linux @hiento09 (#1242)
|
||||
- fix(Thread): #1168 fix newly created thread cannot select model after restart @namchuai (#1176)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: add compatibility tag to model selection in right panel @urmauur (#1552)
|
||||
- Feature integrate antivirus scanner to ci @hiento09 (#1529)
|
||||
- feat: [hub] update compatibility tags colors @urmauur (#1516)
|
||||
- feat: hub recommendation labels @urmauur (#1440)
|
||||
- Feature linux support app image format @hiento09 (#1442)
|
||||
- fix: render external links @urmauur (#1441)
|
||||
- fix: add icon collapsible left panel and update keyboard shortcut page @urmauur (#1439)
|
||||
- feat(UI): update UI footer @urmauur (#1424)
|
||||
- Fix Bug for Chat Reply Goes off Screen @mishrababhishek (#1393)
|
||||
- feat: move social media from left panel into footer @urmauur (#1325)
|
||||
- feat: implementation new UI thread settings @urmauur (#1301)
|
||||
- Bring social media links @Gri-ffin (#1295)
|
||||
- feat: added keyboard shortcut list in setting page @urmauur (#1275)
|
||||
- feat: add swagger /docs to localhost:1337 @louis-jan (#1268)
|
||||
- feat: update posthog configuration @hieu-jan (#1258)
|
||||
- feat: Deprecate model.json ready state in favor of .download ext @louis-jan (#1238)
|
||||
- feat: add engine settings @namchuai (#1199)
|
||||
- feat: users should be able to switch models mid-thread @louis-jan (#1226)
|
||||
- feat: temporary link how to import model @urmauur (#1209)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: #1594 - Model settings - change thread model - go back does not see according settings @louis-jan (#1595)
|
||||
- fix: #1548 - duplicate command shortcut instruction @louis-jan (#1600)
|
||||
- fix: switch model caused app crash @louis-jan (#1597)
|
||||
- fix: #1559 Inference Parameters displayed on new thread with Openai GPT Model @louis-jan (#1588)
|
||||
- fix: enable user set value manually model setting from input @urmauur (#1585)
|
||||
- fix: #1569 - Does not apply thread settings when loading model @louis-jan (#1576)
|
||||
- fix: could not change model params settings @louis-jan (#1547)
|
||||
- fix: gpu check module export does not work in extension @louis-jan (#1536)
|
||||
- fix: adjust calculation hub labels using total RAM instead remaining RAM @urmauur (#1522)
|
||||
- Feature integrate antivirus scanner to ci @hiento09 (#1529)
|
||||
- fix: allow users to set max tokens variably @urmauur (#1513)
|
||||
- fix: stop word update @louis-jan (#1457)
|
||||
- Revert nitro to 0.2.6 @hiento09 (#1491)
|
||||
- fix: enable text selection codeblock @urmauur (#1466)
|
||||
- fix: suppress all main node JS error message dialog @louis-jan (#1460)
|
||||
- Correct AppImage path @hiento09 (#1446)
|
||||
- fix: render external links @urmauur (#1441)
|
||||
- fix: add icon collapsible left panel and update keyboard shortcut page @urmauur (#1439)
|
||||
- fix: GET /models does not work due to new default model dir @louis-jan (#1392)
|
||||
- fix: model migration stopped working @louis-jan (#1378)
|
||||
- fix: wrong condition for displaying error message @louis-jan (#1376)
|
||||
- fix: show hide section engine params @urmauur (#1374)
|
||||
- fix: copy stream tooltip and hide section when no params setting @urmauur (#1373)
|
||||
- bugs: fix stop streaming when user delete or clean thread @urmauur (#1347)
|
||||
- fix: show a proper error message on download failure @louis-jan (#1345)
|
||||
- Add detect cuda version jan app @hiento09 (#1351)
|
||||
- fix: Error occurred: Unexpected token "d", "data: ..." is not a valid JSON @louis-jan (#1332)
|
||||
- fix: app getting stuck at downloading 99% while downloading model @louis-jan (#1320)
|
||||
- correct type utf-8 @hiento09 (#1311)
|
||||
- Fix memory on mac included cached and swap @hiento09 (#1298)
|
||||
- fix: should check app dir before spawning log @louis-jan (#1297)
|
||||
- fix: disable process logging from server @louis-jan (#1296)
|
||||
- fix: user should be able to access Swagger docs from localhost:1337 @louis-jan (#1292)
|
||||
- Switch from Gigabyte to Gibibyte - System monitor @hiento09 (#1286)
|
||||
- Switch from systeminformation to os-utils to resolve Bitdefender false positive and memory leak issue @hiento09 (#1282)
|
||||
- fix: swagger CSP issue @louis-jan (#1284)
|
||||
- fix: support markdown break line @urmauur (#1274)
|
||||
- fix ci test run failed @hiento09 (#1267)
|
||||
- Fix wrong linux nitro path @hiento09 (#1266)
|
||||
- fix: enable command enter on dialog confirmation clean thread @urmauur (#1261)
|
||||
- fix: input message duplicated due with some input sources @louis-jan (#1259)
|
||||
- fix: mac users should not see GPU settings @louis-jan (#1255)
|
||||
- fix: remove redundant gpu detection prompt event @louis-jan (#1254)
|
||||
- fix: engine settings GUI - feature toggle @louis-jan (#1252)
|
||||
- Fix bug #1178 high ram on windows @hiento09 (#1241)
|
||||
- fix: #1183 Reveal in finder does not work on windows @namchuai (#1239)
|
||||
- fix: remove delay tooltip and click event @urmauur (#1217)
|
||||
- fix: enable enter command on dialog confirmation delete thread @urmauur (#1218)
|
||||
- fix: Cleared thread last message is not updated @louis-jan (#1225)
|
||||
- Fix switch thread crash nitro windows linux @hiento09 (#1214)
|
||||
- fix: darkmode broken color @urmauur (#1186)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: typo model.json @louis-jan (#1599)
|
||||
- docs: add 04-how-to-get-error-logs.mdx @hieu-jan (#1580)
|
||||
- chore: teach how to attach logs @0xSage (#1578)
|
||||
- chore: issues should auto close with PRs through template @0xSage (#1577)
|
||||
- chore: Update issue templates @0xSage (#1568)
|
||||
- docs: fix x handles @0xSage (#1532)
|
||||
- Docs to integrate OpenRouter with Jan without UI/UX @0xgokuz (#1495)
|
||||
- chore: fix darkmode docs @hieu-jan (#1520)
|
||||
- docs: fix algolia configuration @hieu-jan (#1518)
|
||||
- docs: fix algolia configuration @hieu-jan (#1517)
|
||||
- Revert URL release in readme to version 0.4.3 @hiento09 (#1502)
|
||||
- refactor: add app and nitro log - resolve dependencies issue @louis-jan (#1447)
|
||||
- chore: enable agolia @hieu-jan (#1497)
|
||||
- docs: update troubleshooting and redirects old pages @hieu-jan (#1492)
|
||||
- docs: minor fix @hieu-jan (#1478)
|
||||
- docs: initial handbook structure @hieu-jan (#1477)
|
||||
- Bump nitro to 0.2.8 and change Jan App to support cuda >= 11.7 @hiento09 (#1476)
|
||||
- Chore update docs jan - add AppImage instruction to docusaurus @hiento09 (#1480)
|
||||
- Bump nitro to 0.2.7 @hiento09 (#1474)
|
||||
- chore: error message update @louis-jan (#1473)
|
||||
- docs: Update 02-import-manually.mdx @0xSage (#1469)
|
||||
- docs: Update about.md @0xSage (#1465)
|
||||
- Bump nitro version to 0.2.6 @hiento09 (#1458)
|
||||
- docs: adding customize engine settings @hieu-jan (#1455)
|
||||
- docs: add-missing-path @hieu-jan (#1454)
|
||||
- docs: resize gif @hieu-jan (#1453)
|
||||
- docs: revenue philosophy @0xSage (#1443)
|
||||
- docs: jan framework principles @0xSage (#1438)
|
||||
- docs: fix typo in docs @hieu-jan (#1419)
|
||||
- chore: clean up use os hook @namchuai (#1418)
|
||||
- docs: explain each docs page intent @0xSage (#1417)
|
||||
- docs: Update 01-server.md @0xSage (#1416)
|
||||
- Update warning url from github md file to jan.ai docs site @hiento09 (#1414)
|
||||
- docs: improve gpu not used guide @hieu-jan (#1405)
|
||||
- chore: update README.md @eltociear (#1406)
|
||||
- Update USAGE docs for linux @hiento09 (#1401)
|
||||
- docs: gpu not detected @0xSage (#1399)
|
||||
- docs: Troubleshoot Failed To Fetch @gabrielle-ong (#1398)
|
||||
- docs: improve docs syntax @hieu-jan (#1394)
|
||||
- docs: add-install-nightly-guide @hieu-jan (#1390)
|
||||
- docs: correct href link @hieu-jan (#1338)
|
||||
- docs: fix chat payload and cURL @hieu-jan (#1360)
|
||||
- docs: add Chatting Guide @hieu-jan (#1184)
|
||||
- Chore add docs usage how to switch run mode jan app @hiento09 (#1353)
|
||||
- docs: configure index page @hieu-jan (#1330)
|
||||
- docs: Update product.md @0xSage (#1326)
|
||||
- docs: Update 01-server.md @0xSage (#1327)
|
||||
- refactor: deprecate the appVersion IPC and use the predefined VERSION @louis-jan (#1309)
|
||||
- docs: update using models documentation @hieu-jan (#1288)
|
||||
- docs: update pm handbook @0xSage (#1307)
|
||||
- docs: contributor docs overview @0xSage (#1305)
|
||||
- chore: github PR template @0xSage (#1304)
|
||||
- Fix memory on mac included cached and swap @hiento09 (#1298)
|
||||
- Enrich discord message for nightly build url @hiento09 (#1294)
|
||||
- Refactor CI by create shared jobs output @hiento09 (#1287)
|
||||
- docs: update README.md @hieu-jan (#1281)
|
||||
- docs: Update README.md @0xSage (#1248)
|
||||
- feat: Jan Server, API and decoupled clients @louis-jan (#948)
|
||||
- docs: improve 02-import-manually @hieu-jan (#1222)
|
||||
- chore: Update issue templates @0xSage (#1229)
|
||||
- docs: Update 02-import-manually.mdx @0xSage (#1197)
|
||||
- add sleep 500ms if platform is windows before starting nitro process @hiento09 (#1215)
|
||||
- docs: improve troubleshoot documentation @hieu-jan (#1173)
|
||||
- docs: update bug report template @hieu-jan (#1180)
|
||||
- docs: add troubleshooting @hieu-jan (#1169)
|
||||
- chore: copy fixes @0xSage (#1167)
|
||||
- docs: Update 01-start-thread.md @0xSage (#1122)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @0xgokuz, @Diane0111, @Gri-ffin, @Ssstars, @akaMrNagar, @eltociear, @gabrielle-ong, @hahuyhoang411, @hiento09, @hieu-jan, @jan-service-account, @louis-jan, @mishrababhishek, @namchuai, @sr-albert, @urmauur and Abhishek Mishra
|
||||
|
||||
|
||||
@ -8,96 +8,96 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #1758: bug: Correct text for Windows](https://github.com/janhq/jan/issues/1758)
|
||||
|
||||
## Changes
|
||||
|
||||
- fix(Wording): #1758 correct text for windows @namchuai (#1768)
|
||||
- fix(Log): server log is not display in windows @namchuai (#1764)
|
||||
- Release Cut v0.4.5 @louis-jan (#1752)
|
||||
- chore(nitro): 0.2.11 -> 0.2.12 @hiro-v (#1754)
|
||||
- fix: Nitro CPU threads with correct physical/ performance CPU count @hiro-v (#1726)
|
||||
- fix(Model): #1662 imported model does not use gpu @namchuai (#1723)
|
||||
- fix(API): #1720 host/port provided in the local API server does not fully applied @namchuai (#1721)
|
||||
- fix: server API reference @hiro-v (#1670)
|
||||
- fix(Model): refactor model label @namchuai (#1596)
|
||||
- docs/postmortem v 0.4.4 @hieu-jan (#1617)
|
||||
- chore(ShortcutModal): clean up shortcut modal @namchuai (#1614)
|
||||
- chore(Dependencies): upgrade node-fetch to fix vulnerable issue @namchuai (#1598)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: update UI allow user change folder @urmauur (#1738)
|
||||
- feat: error message when not enough RAM @urmauur (#1706)
|
||||
- feat: improvement ux for local api server @urmauur (#1704)
|
||||
- feat: allow user to move jan folder @namchuai (#1649)
|
||||
- feat: HTTP proxy support @markmehere (#1562)
|
||||
- Feature add schedule clean cloudflare page and r2 @hiento09 (#1653)
|
||||
- feat: relayout left panel setting page @urmauur (#1648)
|
||||
- Update CI follow git flow @hiento09 (#1625)
|
||||
- feat: Implement UI page API server dashboard @urmauur (#1636)
|
||||
- fix: #1545 long thread title @lucido-simon (#1605)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: model selection does not show in API settings page @louis-jan (#1828)
|
||||
- fix: user can't view model setting in local api server @namchuai (#1807)
|
||||
- fix: cannot change jan data folder @namchuai (#1805)
|
||||
- fix: model selection does not show in API settings page @louis-jan (#1802)
|
||||
- fix: user can't use a model in model hub @namchuai (#1801)
|
||||
- fix: stop openai inference raises something amiss @louis-jan (#1799)
|
||||
- regression fix: input disabled darkmode @urmauur (#1800)
|
||||
- fix: clean last message when user clean thread message @namchuai (#1793)
|
||||
- fix: app log not being printed @namchuai (#1790)
|
||||
- fix: api settings are not applied on changes @louis-jan (#1789)
|
||||
- fix: could not delete model @louis-jan (#1779)
|
||||
- fix: can not start model when server is not enabled from model settings page @louis-jan (#1774)
|
||||
- regression fix: input port not accept alphabets @urmauur (#1772)
|
||||
- Correct bash script syntax in ci @hiento09 (#1769)
|
||||
- Hotfix CI pre-release not trigger @hiento09 (#1757)
|
||||
- fix: bring back open app directory @louis-jan (#1756)
|
||||
- fix: input port have range validation @urmauur (#1741)
|
||||
- Fix error nightly build schedule run failed @hiento09 (#1736)
|
||||
- fix: active model when start server @urmauur (#1719)
|
||||
- fix: Change to fixed `localhost` instead of using host variable @hiro-v (#1729)
|
||||
- Fix autoupdater nightly build error @hiento09 (#1727)
|
||||
- Correct download url readme @hiento09 (#1724)
|
||||
- fix: API chat/completion is blocked by CORS @louis-jan (#1705)
|
||||
- fix: Jan server - v1/chat/completions is throwing ERR\_REQUIRE\_ESM @louis-jan (#1703)
|
||||
- fix: Jan server is showing blank page @louis-jan (#1702)
|
||||
- fix: switching loader from remote to local model from thread right panel @urmauur (#1692)
|
||||
- fix: hot-fix algolia search @hieu-jan (#1700)
|
||||
- fix: disable api key field while server is running @urmauur (#1694)
|
||||
- fix: stoping model show starting model @urmauur (#1693)
|
||||
- fix bug #1650 hogging resources @hiento09 (#1663)
|
||||
- fix: auto select text when collapse panel @urmauur (#1645)
|
||||
- fix: wrong selected model ref @louis-jan (#1638)
|
||||
- fix: enable check for update on all supported platforms @louis-jan (#1626)
|
||||
- fix: correct footer @hieu-jan (#1628)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Docs publish to github page trigger on push to docs branch @hiento09 (#1783)
|
||||
- Correct bash script syntax in ci @hiento09 (#1769)
|
||||
- Combine 2 ci pipeline pre-release and nightly into one @hiento09 (#1767)
|
||||
- Hotfix CI pre-release not trigger @hiento09 (#1757)
|
||||
- Fix error nightly build schedule run failed @hiento09 (#1736)
|
||||
- docs: add troubleshoot unexpected token @hieu-jan (#1711)
|
||||
- docs: fix about pages @0xSage (#1699)
|
||||
- refactor: deprecate extension type implementation @louis-jan (#1677)
|
||||
- refactor: file prefix replace utils \& add unit test @louis-jan (#1676)
|
||||
- Correct ref branch for update url on README.md file @hiento09 (#1672)
|
||||
- docs: update 02-somethings-amiss @hieu-jan (#1668)
|
||||
- Cherrypick cicd to main branch to apply new gitflow @hiento09 (#1665)
|
||||
- docs: add user and developer guides for extensions @hieu-jan (#1657)
|
||||
- docs: add QA Script @hieu-jan (#1660)
|
||||
- chore: Bump nitro to 0.2.11 @hiro-v (#1655)
|
||||
- chore: Bump version nitro to 0.2.10 @hiro-v (#1644)
|
||||
- docs: add antivirus compatibility testing @hieu-jan (#1641)
|
||||
- refactor: introduce node module in nitro extension @louis-jan (#1630)
|
||||
- Update 02-somethings-amiss.mdx @Ssstars (#1634)
|
||||
- docs: add integration AzureOpenAI @hieu-jan (#1632)
|
||||
- docs: add troubleshooting permission denied @hieu-jan (#1631)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Ssstars, @hiento09, @hientominh, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @lucido-simon, @markmehere, @namchuai and @urmauur
|
||||
## Changes
|
||||
|
||||
- fix(Wording): #1758 correct text for windows @namchuai (#1768)
|
||||
- fix(Log): server log is not display in windows @namchuai (#1764)
|
||||
- Release Cut v0.4.5 @louis-jan (#1752)
|
||||
- chore(nitro): 0.2.11 -> 0.2.12 @hiro-v (#1754)
|
||||
- fix: Nitro CPU threads with correct physical/ performance CPU count @hiro-v (#1726)
|
||||
- fix(Model): #1662 imported model does not use gpu @namchuai (#1723)
|
||||
- fix(API): #1720 host/port provided in the local API server does not fully applied @namchuai (#1721)
|
||||
- fix: server API reference @hiro-v (#1670)
|
||||
- fix(Model): refactor model label @namchuai (#1596)
|
||||
- docs/postmortem v 0.4.4 @hieu-jan (#1617)
|
||||
- chore(ShortcutModal): clean up shortcut modal @namchuai (#1614)
|
||||
- chore(Dependencies): upgrade node-fetch to fix vulnerable issue @namchuai (#1598)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: update UI allow user change folder @urmauur (#1738)
|
||||
- feat: error message when not enough RAM @urmauur (#1706)
|
||||
- feat: improvement ux for local api server @urmauur (#1704)
|
||||
- feat: allow user to move jan folder @namchuai (#1649)
|
||||
- feat: HTTP proxy support @markmehere (#1562)
|
||||
- Feature add schedule clean cloudflare page and r2 @hiento09 (#1653)
|
||||
- feat: relayout left panel setting page @urmauur (#1648)
|
||||
- Update CI follow git flow @hiento09 (#1625)
|
||||
- feat: Implement UI page API server dashboard @urmauur (#1636)
|
||||
- fix: #1545 long thread title @lucido-simon (#1605)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: model selection does not show in API settings page @louis-jan (#1828)
|
||||
- fix: user can't view model setting in local api server @namchuai (#1807)
|
||||
- fix: cannot change jan data folder @namchuai (#1805)
|
||||
- fix: model selection does not show in API settings page @louis-jan (#1802)
|
||||
- fix: user can't use a model in model hub @namchuai (#1801)
|
||||
- fix: stop openai inference raises something amiss @louis-jan (#1799)
|
||||
- regression fix: input disabled darkmode @urmauur (#1800)
|
||||
- fix: clean last message when user clean thread message @namchuai (#1793)
|
||||
- fix: app log not being printed @namchuai (#1790)
|
||||
- fix: api settings are not applied on changes @louis-jan (#1789)
|
||||
- fix: could not delete model @louis-jan (#1779)
|
||||
- fix: can not start model when server is not enabled from model settings page @louis-jan (#1774)
|
||||
- regression fix: input port not accept alphabets @urmauur (#1772)
|
||||
- Correct bash script syntax in ci @hiento09 (#1769)
|
||||
- Hotfix CI pre-release not trigger @hiento09 (#1757)
|
||||
- fix: bring back open app directory @louis-jan (#1756)
|
||||
- fix: input port have range validation @urmauur (#1741)
|
||||
- Fix error nightly build schedule run failed @hiento09 (#1736)
|
||||
- fix: active model when start server @urmauur (#1719)
|
||||
- fix: Change to fixed `localhost` instead of using host variable @hiro-v (#1729)
|
||||
- Fix autoupdater nightly build error @hiento09 (#1727)
|
||||
- Correct download url readme @hiento09 (#1724)
|
||||
- fix: API chat/completion is blocked by CORS @louis-jan (#1705)
|
||||
- fix: Jan server - v1/chat/completions is throwing ERR\_REQUIRE\_ESM @louis-jan (#1703)
|
||||
- fix: Jan server is showing blank page @louis-jan (#1702)
|
||||
- fix: switching loader from remote to local model from thread right panel @urmauur (#1692)
|
||||
- fix: hot-fix algolia search @hieu-jan (#1700)
|
||||
- fix: disable api key field while server is running @urmauur (#1694)
|
||||
- fix: stoping model show starting model @urmauur (#1693)
|
||||
- fix bug #1650 hogging resources @hiento09 (#1663)
|
||||
- fix: auto select text when collapse panel @urmauur (#1645)
|
||||
- fix: wrong selected model ref @louis-jan (#1638)
|
||||
- fix: enable check for update on all supported platforms @louis-jan (#1626)
|
||||
- fix: correct footer @hieu-jan (#1628)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- Docs publish to github page trigger on push to docs branch @hiento09 (#1783)
|
||||
- Correct bash script syntax in ci @hiento09 (#1769)
|
||||
- Combine 2 ci pipeline pre-release and nightly into one @hiento09 (#1767)
|
||||
- Hotfix CI pre-release not trigger @hiento09 (#1757)
|
||||
- Fix error nightly build schedule run failed @hiento09 (#1736)
|
||||
- docs: add troubleshoot unexpected token @hieu-jan (#1711)
|
||||
- docs: fix about pages @0xSage (#1699)
|
||||
- refactor: deprecate extension type implementation @louis-jan (#1677)
|
||||
- refactor: file prefix replace utils \& add unit test @louis-jan (#1676)
|
||||
- Correct ref branch for update url on README.md file @hiento09 (#1672)
|
||||
- docs: update 02-somethings-amiss @hieu-jan (#1668)
|
||||
- Cherrypick cicd to main branch to apply new gitflow @hiento09 (#1665)
|
||||
- docs: add user and developer guides for extensions @hieu-jan (#1657)
|
||||
- docs: add QA Script @hieu-jan (#1660)
|
||||
- chore: Bump nitro to 0.2.11 @hiro-v (#1655)
|
||||
- chore: Bump version nitro to 0.2.10 @hiro-v (#1644)
|
||||
- docs: add antivirus compatibility testing @hieu-jan (#1641)
|
||||
- refactor: introduce node module in nitro extension @louis-jan (#1630)
|
||||
- Update 02-somethings-amiss.mdx @Ssstars (#1634)
|
||||
- docs: add integration AzureOpenAI @hieu-jan (#1632)
|
||||
- docs: add troubleshooting permission denied @hieu-jan (#1631)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @Ssstars, @hiento09, @hientominh, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @lucido-simon, @markmehere, @namchuai and @urmauur
|
||||
|
||||
|
||||
@ -8,57 +8,57 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #1918: Regression fix assistant extension codesign](https://github.com/janhq/jan/pull/1918)
|
||||
|
||||
## Changes
|
||||
|
||||
- Regression fix assitant extension codesign @hiento09 (#1918)
|
||||
- Release cut 0.4.6 @louis-jan (#1888)
|
||||
- feat: add factory reset feature @namchuai (#1750)
|
||||
- chore: add react developer tools to electron @Helloyunho (#1858)
|
||||
- Sync Release 0.4.5 to dev @louis-jan (#1830)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: integrate umami @hieu-jan (#1809)
|
||||
- feat: Add default value for ngl @hiro-v (#1886)
|
||||
- feat: add start/stop model via http api @namchuai (#1862)
|
||||
- feat: add snackbar component and update style side banner @urmauur (#1874)
|
||||
- feat: move open app directory into icon folder @urmauur (#1879)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- feat: put timestamp under thread name in left panel @urmauur (#1820)
|
||||
- perf: remove unnecessary rerender when user typing input @namchuai (#1818)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: umami analytics send app loaded event @louis-jan (#1928)
|
||||
- fix: migration loading indicator @louis-jan (#1913)
|
||||
- fix: broken manual import model with NA fields @louis-jan (#1912)
|
||||
- fix: openAIEmbedding now requires top level API Key configuration @louis-jan (#1902)
|
||||
- fix: load model fail overlays thread message error @louis-jan (#1901)
|
||||
- fix: show generate response on message send @louis-jan (#1895)
|
||||
- fix: display error message on model load fail @louis-jan (#1894)
|
||||
- fix: the selected model auto revert back to previous used model with setting mismatch @louis-jan (#1883)
|
||||
- fix: add dialog confirm when move folder and next dest isn't empty @urmauur (#1880)
|
||||
- Increase timeout for explore.e2e.spec test @hiento09 (#1844)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- fix: auto collapse retrieval setting while update config @urmauur (#1866)
|
||||
- fix: loader show while error global when change folder @urmauur (#1870)
|
||||
- fix: retrieval always ask for api key @louis-jan (#1856)
|
||||
- fix: all input text box are disabled @namchuai (#1855)
|
||||
- fix: add loader when user change folder @urmauur (#1850)
|
||||
- Add code sign step for darwin assistant extension @hiento09 (#1841)
|
||||
- fix: preserve focused thread when navigating in jan app @namchuai (#1814)
|
||||
- fix: highlight menu dropdown server options @urmauur (#1831)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: mark RAG as experimental feature @louis-jan (#1882)
|
||||
- Increase timeout for explore.e2e.spec test @hiento09 (#1844)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- chore: Jan Data Folder setting is no longer an experimental feature @louis-jan (#1847)
|
||||
- chore: resolve main conflict @louis-jan (#1833)
|
||||
- Update release url on README to default branch instead of main branch @hiento09 (#1832)
|
||||
|
||||
## Contributor
|
||||
|
||||
@Helloyunho, @hiento09, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @namchuai, @urmauur and James
|
||||
## Changes
|
||||
|
||||
- Regression fix assitant extension codesign @hiento09 (#1918)
|
||||
- Release cut 0.4.6 @louis-jan (#1888)
|
||||
- feat: add factory reset feature @namchuai (#1750)
|
||||
- chore: add react developer tools to electron @Helloyunho (#1858)
|
||||
- Sync Release 0.4.5 to dev @louis-jan (#1830)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: integrate umami @hieu-jan (#1809)
|
||||
- feat: Add default value for ngl @hiro-v (#1886)
|
||||
- feat: add start/stop model via http api @namchuai (#1862)
|
||||
- feat: add snackbar component and update style side banner @urmauur (#1874)
|
||||
- feat: move open app directory into icon folder @urmauur (#1879)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- feat: put timestamp under thread name in left panel @urmauur (#1820)
|
||||
- perf: remove unnecessary rerender when user typing input @namchuai (#1818)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: umami analytics send app loaded event @louis-jan (#1928)
|
||||
- fix: migration loading indicator @louis-jan (#1913)
|
||||
- fix: broken manual import model with NA fields @louis-jan (#1912)
|
||||
- fix: openAIEmbedding now requires top level API Key configuration @louis-jan (#1902)
|
||||
- fix: load model fail overlays thread message error @louis-jan (#1901)
|
||||
- fix: show generate response on message send @louis-jan (#1895)
|
||||
- fix: display error message on model load fail @louis-jan (#1894)
|
||||
- fix: the selected model auto revert back to previous used model with setting mismatch @louis-jan (#1883)
|
||||
- fix: add dialog confirm when move folder and next dest isn't empty @urmauur (#1880)
|
||||
- Increase timeout for explore.e2e.spec test @hiento09 (#1844)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- fix: auto collapse retrieval setting while update config @urmauur (#1866)
|
||||
- fix: loader show while error global when change folder @urmauur (#1870)
|
||||
- fix: retrieval always ask for api key @louis-jan (#1856)
|
||||
- fix: all input text box are disabled @namchuai (#1855)
|
||||
- fix: add loader when user change folder @urmauur (#1850)
|
||||
- Add code sign step for darwin assistant extension @hiento09 (#1841)
|
||||
- fix: preserve focused thread when navigating in jan app @namchuai (#1814)
|
||||
- fix: highlight menu dropdown server options @urmauur (#1831)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- chore: mark RAG as experimental feature @louis-jan (#1882)
|
||||
- Increase timeout for explore.e2e.spec test @hiento09 (#1844)
|
||||
- chore: Bump nitro to 0.3.3 @hiro-v (#1877)
|
||||
- chore: Jan Data Folder setting is no longer an experimental feature @louis-jan (#1847)
|
||||
- chore: resolve main conflict @louis-jan (#1833)
|
||||
- Update release url on README to default branch instead of main branch @hiento09 (#1832)
|
||||
|
||||
## Contributor
|
||||
|
||||
@Helloyunho, @hiento09, @hieu-jan, @hiro-v, @jan-service-account, @louis-jan, @namchuai, @urmauur and James
|
||||
|
||||
|
||||
@ -8,111 +8,111 @@ For more details, [GitHub Issues](https://github.com/janhq/jan/releases/tag/v0.4
|
||||
|
||||
Highlighted Issue: [Issue #2121: Release cut v0.4.7](https://github.com/janhq/jan/pull/2121)
|
||||
|
||||
## Changes
|
||||
|
||||
- Release cut v0.4.7 @louis-jan (#2121)
|
||||
- chore: update models @hahuyhoang411 (#1829)
|
||||
- add docs for entire advanced settings @hieu-jan (#2063)
|
||||
- docs: Fix #2040 : added /v1 path to apiBase @ldebs (#2041)
|
||||
- fix: ui for disabled state of gpu acceleration @namchuai (#2034)
|
||||
- feat: Initialize POM structure with fixtures on Playwright @Van-QA (#2015)
|
||||
- Alternative solution for `Thread titles should auto-summarize Topic` @0xgokuz (#1976)
|
||||
- Update authors.yml Rex @hahuyhoang411 (#1956)
|
||||
- Update authors.yml Louis @louis-jan (#1955)
|
||||
- Change env Dockerfile.gpu and update README @hiento09 (#1963)
|
||||
- chore: Update authors.yml for Van Pham @Van-QA (#1954)
|
||||
- Sync dev branch to docs branch @hieu-jan (#1948)
|
||||
- sync current docs branch to dev branch @hieu-jan (#1947)
|
||||
- feat: Playwright capture screenshot of Electron desktop app (Jan) on failures @Van-QA (#1934)
|
||||
- Sync main to dev after release 0.4.6 @hiento09 (#1929)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add nitro vulkan to support AMD GPU/ APU and Intel Arc GPU @hiro-v (#2056)
|
||||
- fix: flow edit message @urmauur (#2113)
|
||||
- Feature helmchart and ci jan server @hiento09 (#2106)
|
||||
- feat: improvementUI GPU acceleration @urmauur (#1990)
|
||||
- feat: add edit messages users @urmauur (#1974)
|
||||
- feat: revamp ui dropdown list model option @urmauur (#1977)
|
||||
- feat: add modal troubleshooting guideline @urmauur (#1968)
|
||||
- feat: integrate umami script locally @hieu-jan (#1958)
|
||||
- feat: User Selectable GPUs and GPU-based Model Recommendations @hiento09 (#1730)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: correct vulkan settings @louis-jan (#2128)
|
||||
- fix: chore UI @louis-jan (#2125)
|
||||
- Regression: bump nitro to 0.3.13 @hiento09 (#2124)
|
||||
- Regression: Linux vulkan binary path @hiento09 (#2123)
|
||||
- fix: revert back menu actions @louis-jan (#2120)
|
||||
- fix: mismatching between nightly build and version - jan about @louis-jan (#2114)
|
||||
- fix: flow edit message @urmauur (#2113)
|
||||
- fix: tools section should be expanded by default @louis-jan (#2110)
|
||||
- fix: failed to bind port - nitro error message copy @louis-jan (#2101)
|
||||
- fix: remove caret down icon when tab selected into remote model @urmauur (#2102)
|
||||
- fix: openai client sdk compatible @louis-jan (#2096)
|
||||
- Fix bug #2005 docker blank website @hiento09 (#2093)
|
||||
- fix: check if port is occupied before start local server @namchuai (#2098)
|
||||
- fix: broken model.json update @louis-jan (#2099)
|
||||
- fix: make text input scrollable @urmauur (#2083)
|
||||
- fix: failed to send message blocks thread creation @louis-jan (#2091)
|
||||
- fix: server crashes on missing module @louis-jan (#2089)
|
||||
- fix: expand assistant and model settings by default @louis-jan (#2081)
|
||||
- fix: move jan data folder - error handling for no write permission granted @louis-jan (#2077)
|
||||
- fix: check for updates should show no update are available on the latest build @louis-jan (#2075)
|
||||
- fix: infinity showed when haven't get total size @namchuai (#2066)
|
||||
- fix: should stop running the model when GPU settings are changed @louis-jan (#2067)
|
||||
- fix: settings page state loop and dark theme @louis-jan (#2065)
|
||||
- fix: Fix Nitro windows with error 3221225781 @hiro-v (#2057)
|
||||
- fix: message should only be interrupted when i start another thread @louis-jan (#2053)
|
||||
- fix: local server start error should not change to started state @louis-jan (#2052)
|
||||
- fix: update copy of message queue @louis-jan (#2051)
|
||||
- fix: download mutilple binaries @namchuai (#2043)
|
||||
- fix: disable gpu drop down box if there's no GPU ready @namchuai (#2046)
|
||||
- fix: app should generate thread title with length restriction @louis-jan (#2037)
|
||||
- fix: factory reset not remove jan data folder @namchuai (#2027)
|
||||
- fix: content setting right panel default to collapse @urmauur (#2026)
|
||||
- fix: local server blank parameters if there is no thread selected @louis-jan (#2028)
|
||||
- fix: model path backward compatible @louis-jan (#2018)
|
||||
- fix: resolve state update loop infinitive rerendering @louis-jan (#2017)
|
||||
- fix: lack of auto-cleaning mechanism for logs @louis-jan (#2003)
|
||||
- fix: app stuck regenerating assistant response @louis-jan (#2001)
|
||||
- fix: decouple thread summary update @louis-jan (#1994)
|
||||
- fix: app fails gracefully with clear error messages @louis-jan (#1993)
|
||||
- fix: retrieval stuck at generating response @louis-jan (#1988)
|
||||
- Fix macos auto update failed on nightly build @hiento09 (#1991)
|
||||
- fix: model downloads broken on nightly @louis-jan (#1984)
|
||||
- fix: RAG enhancements @urmauur (#1965)
|
||||
- Update docs run Jan Server in Docker mode @hiento09 (#1960)
|
||||
- fix: update conditional check last status message @urmauur (#1951)
|
||||
- fix: markdown render for chat completion role user @urmauur (#1944)
|
||||
- fix: avoid users to create so many threads at the same time @urmauur (#1930)
|
||||
- fix: download model will close panel item hub @urmauur (#1923)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- docs: improve integrations guide \& import model using absolute path @hieu-jan (#2076)
|
||||
- chore: add app version into log @namchuai (#2116)
|
||||
- docs: add integration docs Mistral AI API @hieu-jan (#2070)
|
||||
- docs:add-advanced-settings-https-proxy @hieu-jan (#2054)
|
||||
- chore: refactor watch system resource hook @louis-jan (#2048)
|
||||
- docs: Updates Guide Using the Local Server @SamPatt (#1924)
|
||||
- server install core using link instead of file @hiento09 (#2025)
|
||||
- chore: prettier fix @louis-jan (#2019)
|
||||
- chore: bump nitro 0.3.9 @louis-jan (#2016)
|
||||
- refactor: reduce IPC \& API handlers - shared node logics @louis-jan (#2011)
|
||||
- docs: update 03-gpu-not-used with RTX issues @hieu-jan (#1992)
|
||||
- docs: add Jan installation using Docker @hieu-jan (#1981)
|
||||
- chore: reduce bundle size @louis-jan (#1970)
|
||||
- docs: add author.yml @hieu-jan (#1973)
|
||||
- Update authors.yml hien @hiento09 (#1953)
|
||||
- chore: server download progress + S3 @louis-jan (#1925)
|
||||
- chore: add author james @namchuai (#1952)
|
||||
- chore: Add author - Ashley @imtuyethan (#1950)
|
||||
- chore: Add Author - Hiro @hiro-v (#1949)
|
||||
- docs: adding new feature for v0.4.6 to release checklist @Van-QA (#1927)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @0xgokuz, @SamPatt, @Van-QA, @hahuyhoang411, @hiento09, @hieu-jan, @hiro-v, @imtuyethan, @jan-service-account, @ldebs, @louis-jan, @namchuai, @urmauur and James
|
||||
## Changes
|
||||
|
||||
- Release cut v0.4.7 @louis-jan (#2121)
|
||||
- chore: update models @hahuyhoang411 (#1829)
|
||||
- add docs for entire advanced settings @hieu-jan (#2063)
|
||||
- docs: Fix #2040 : added /v1 path to apiBase @ldebs (#2041)
|
||||
- fix: ui for disabled state of gpu acceleration @namchuai (#2034)
|
||||
- feat: Initialize POM structure with fixtures on Playwright @Van-QA (#2015)
|
||||
- Alternative solution for `Thread titles should auto-summarize Topic` @0xgokuz (#1976)
|
||||
- Update authors.yml Rex @hahuyhoang411 (#1956)
|
||||
- Update authors.yml Louis @louis-jan (#1955)
|
||||
- Change env Dockerfile.gpu and update README @hiento09 (#1963)
|
||||
- chore: Update authors.yml for Van Pham @Van-QA (#1954)
|
||||
- Sync dev branch to docs branch @hieu-jan (#1948)
|
||||
- sync current docs branch to dev branch @hieu-jan (#1947)
|
||||
- feat: Playwright capture screenshot of Electron desktop app (Jan) on failures @Van-QA (#1934)
|
||||
- Sync main to dev after release 0.4.6 @hiento09 (#1929)
|
||||
|
||||
## 🚀 Features
|
||||
|
||||
- feat: Add nitro vulkan to support AMD GPU/ APU and Intel Arc GPU @hiro-v (#2056)
|
||||
- fix: flow edit message @urmauur (#2113)
|
||||
- Feature helmchart and ci jan server @hiento09 (#2106)
|
||||
- feat: improvementUI GPU acceleration @urmauur (#1990)
|
||||
- feat: add edit messages users @urmauur (#1974)
|
||||
- feat: revamp ui dropdown list model option @urmauur (#1977)
|
||||
- feat: add modal troubleshooting guideline @urmauur (#1968)
|
||||
- feat: integrate umami script locally @hieu-jan (#1958)
|
||||
- feat: User Selectable GPUs and GPU-based Model Recommendations @hiento09 (#1730)
|
||||
|
||||
## 🐛 Fixes
|
||||
|
||||
- fix: correct vulkan settings @louis-jan (#2128)
|
||||
- fix: chore UI @louis-jan (#2125)
|
||||
- Regression: bump nitro to 0.3.13 @hiento09 (#2124)
|
||||
- Regression: Linux vulkan binary path @hiento09 (#2123)
|
||||
- fix: revert back menu actions @louis-jan (#2120)
|
||||
- fix: mismatching between nightly build and version - jan about @louis-jan (#2114)
|
||||
- fix: flow edit message @urmauur (#2113)
|
||||
- fix: tools section should be expanded by default @louis-jan (#2110)
|
||||
- fix: failed to bind port - nitro error message copy @louis-jan (#2101)
|
||||
- fix: remove caret down icon when tab selected into remote model @urmauur (#2102)
|
||||
- fix: openai client sdk compatible @louis-jan (#2096)
|
||||
- Fix bug #2005 docker blank website @hiento09 (#2093)
|
||||
- fix: check if port is occupied before start local server @namchuai (#2098)
|
||||
- fix: broken model.json update @louis-jan (#2099)
|
||||
- fix: make text input scrollable @urmauur (#2083)
|
||||
- fix: failed to send message blocks thread creation @louis-jan (#2091)
|
||||
- fix: server crashes on missing module @louis-jan (#2089)
|
||||
- fix: expand assistant and model settings by default @louis-jan (#2081)
|
||||
- fix: move jan data folder - error handling for no write permission granted @louis-jan (#2077)
|
||||
- fix: check for updates should show no update are available on the latest build @louis-jan (#2075)
|
||||
- fix: infinity showed when haven't get total size @namchuai (#2066)
|
||||
- fix: should stop running the model when GPU settings are changed @louis-jan (#2067)
|
||||
- fix: settings page state loop and dark theme @louis-jan (#2065)
|
||||
- fix: Fix Nitro windows with error 3221225781 @hiro-v (#2057)
|
||||
- fix: message should only be interrupted when i start another thread @louis-jan (#2053)
|
||||
- fix: local server start error should not change to started state @louis-jan (#2052)
|
||||
- fix: update copy of message queue @louis-jan (#2051)
|
||||
- fix: download mutilple binaries @namchuai (#2043)
|
||||
- fix: disable gpu drop down box if there's no GPU ready @namchuai (#2046)
|
||||
- fix: app should generate thread title with length restriction @louis-jan (#2037)
|
||||
- fix: factory reset not remove jan data folder @namchuai (#2027)
|
||||
- fix: content setting right panel default to collapse @urmauur (#2026)
|
||||
- fix: local server blank parameters if there is no thread selected @louis-jan (#2028)
|
||||
- fix: model path backward compatible @louis-jan (#2018)
|
||||
- fix: resolve state update loop infinitive rerendering @louis-jan (#2017)
|
||||
- fix: lack of auto-cleaning mechanism for logs @louis-jan (#2003)
|
||||
- fix: app stuck regenerating assistant response @louis-jan (#2001)
|
||||
- fix: decouple thread summary update @louis-jan (#1994)
|
||||
- fix: app fails gracefully with clear error messages @louis-jan (#1993)
|
||||
- fix: retrieval stuck at generating response @louis-jan (#1988)
|
||||
- Fix macos auto update failed on nightly build @hiento09 (#1991)
|
||||
- fix: model downloads broken on nightly @louis-jan (#1984)
|
||||
- fix: RAG enhancements @urmauur (#1965)
|
||||
- Update docs run Jan Server in Docker mode @hiento09 (#1960)
|
||||
- fix: update conditional check last status message @urmauur (#1951)
|
||||
- fix: markdown render for chat completion role user @urmauur (#1944)
|
||||
- fix: avoid users to create so many threads at the same time @urmauur (#1930)
|
||||
- fix: download model will close panel item hub @urmauur (#1923)
|
||||
|
||||
## 🧰 Maintenance
|
||||
|
||||
- docs: improve integrations guide \& import model using absolute path @hieu-jan (#2076)
|
||||
- chore: add app version into log @namchuai (#2116)
|
||||
- docs: add integration docs Mistral AI API @hieu-jan (#2070)
|
||||
- docs:add-advanced-settings-https-proxy @hieu-jan (#2054)
|
||||
- chore: refactor watch system resource hook @louis-jan (#2048)
|
||||
- docs: Updates Guide Using the Local Server @SamPatt (#1924)
|
||||
- server install core using link instead of file @hiento09 (#2025)
|
||||
- chore: prettier fix @louis-jan (#2019)
|
||||
- chore: bump nitro 0.3.9 @louis-jan (#2016)
|
||||
- refactor: reduce IPC \& API handlers - shared node logics @louis-jan (#2011)
|
||||
- docs: update 03-gpu-not-used with RTX issues @hieu-jan (#1992)
|
||||
- docs: add Jan installation using Docker @hieu-jan (#1981)
|
||||
- chore: reduce bundle size @louis-jan (#1970)
|
||||
- docs: add author.yml @hieu-jan (#1973)
|
||||
- Update authors.yml hien @hiento09 (#1953)
|
||||
- chore: server download progress + S3 @louis-jan (#1925)
|
||||
- chore: add author james @namchuai (#1952)
|
||||
- chore: Add author - Ashley @imtuyethan (#1950)
|
||||
- chore: Add Author - Hiro @hiro-v (#1949)
|
||||
- docs: adding new feature for v0.4.6 to release checklist @Van-QA (#1927)
|
||||
|
||||
## Contributor
|
||||
|
||||
@0xSage, @0xgokuz, @SamPatt, @Van-QA, @hahuyhoang411, @hiento09, @hieu-jan, @hiro-v, @imtuyethan, @jan-service-account, @ldebs, @louis-jan, @namchuai, @urmauur and James
|
||||
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
async function fetchData(siteConfig) {
|
||||
const owner = siteConfig.organizationName;
|
||||
const repo = siteConfig.projectName;
|
||||
const apiUrl = `https://api.github.com/repos/${owner}/${repo}/releases`;
|
||||
|
||||
const outputDirectory = path.join(__dirname, '../../docs/guides/changelogs');
|
||||
const outputDirectory = path.join(__dirname, '../../docs/releases/changelog');
|
||||
|
||||
if (!fs.existsSync(outputDirectory)) {
|
||||
fs.mkdirSync(outputDirectory);
|
||||
}
|
||||
|
||||
let counter = 1;
|
||||
const categoryFilePath = path.join(outputDirectory, '_category_.json');
|
||||
const cacheFilePath = path.join(outputDirectory, 'cache.json');
|
||||
|
||||
let cachedData = {};
|
||||
@ -71,6 +71,14 @@ async function fetchData(siteConfig) {
|
||||
// Process the GitHub releases data here
|
||||
for (const release of releases) {
|
||||
const version = release.tag_name;
|
||||
|
||||
// Check if the changelog file already exists for the current version
|
||||
const existingChangelogPath = path.join(outputDirectory, `changelog-${version}.mdx`);
|
||||
if (fs.existsSync(existingChangelogPath)) {
|
||||
console.log(`Changelog for version ${version} already exists. Skipping...`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const releaseUrl = release.html_url;
|
||||
const issueNumberMatch = release.body.match(/#(\d+)/);
|
||||
const issueNumber = issueNumberMatch ? parseInt(issueNumberMatch[1], 10) : null;
|
||||
@ -83,7 +91,7 @@ async function fetchData(siteConfig) {
|
||||
|
||||
const changes = release.body;
|
||||
|
||||
let markdownContent = `---\nsidebar_position: ${counter}\n---\n# ${version}\n\nFor more details, [GitHub Issues](${releaseUrl})\n\nHighlighted Issue: ${issueLink}\n\n${changes}\n`;
|
||||
let markdownContent = `---\nsidebar_position: ${counter}\nslug: /changelog/changelog-${version}\n---\n# ${version}\n\nFor more details, [GitHub Issues](${releaseUrl})\n\nHighlighted Issue: ${issueLink}\n\n${changes}\n`;
|
||||
|
||||
// Write to a separate markdown file for each version
|
||||
const outputFilePath = path.join(outputDirectory, `changelog-${version}.mdx`);
|
||||
@ -93,20 +101,6 @@ async function fetchData(siteConfig) {
|
||||
|
||||
counter++;
|
||||
}
|
||||
|
||||
// Create _category_.json file
|
||||
const categoryContent = {
|
||||
label: 'Changelogs',
|
||||
position: 5,
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
description: 'Changelog for Jan',
|
||||
},
|
||||
};
|
||||
|
||||
fs.writeFileSync(categoryFilePath, JSON.stringify(categoryContent, null, 2), 'utf-8');
|
||||
|
||||
console.log(`_category_.json has been created at: ${categoryFilePath}`);
|
||||
}
|
||||
|
||||
module.exports = fetchData;
|
||||
|
||||
@ -199,6 +199,19 @@ const sidebars = {
|
||||
"guides/models/integrate-remote",
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Inference Providers",
|
||||
className: "head_SubMenu",
|
||||
link: {
|
||||
type: 'doc',
|
||||
id: "guides/providers/README",
|
||||
},
|
||||
items: [
|
||||
"guides/providers/llama-cpp",
|
||||
"guides/providers/tensorrt-llm",
|
||||
]
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Extensions",
|
||||
|
||||
@ -7,6 +7,7 @@ import {
|
||||
autoUpdater,
|
||||
} from 'electron-updater'
|
||||
import { AppEvent } from '@janhq/core'
|
||||
import { trayManager } from '../managers/tray'
|
||||
|
||||
export let waitingToInstallVersion: string | undefined = undefined
|
||||
|
||||
@ -22,6 +23,7 @@ export function handleAppUpdates() {
|
||||
message: 'Would you like to download and install it now?',
|
||||
buttons: ['Download', 'Later'],
|
||||
})
|
||||
trayManager.destroyCurrentTray()
|
||||
if (action.response === 0) await autoUpdater.downloadUpdate()
|
||||
})
|
||||
|
||||
|
||||
BIN
electron/icons/512x512.png
Normal file
BIN
electron/icons/512x512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@ -1,11 +1,11 @@
|
||||
import { app, BrowserWindow, Menu, Tray } from 'electron'
|
||||
import { app, BrowserWindow, Tray } from 'electron'
|
||||
|
||||
import { join } from 'path'
|
||||
/**
|
||||
* Managers
|
||||
**/
|
||||
import { windowManager } from './managers/window'
|
||||
import { log } from '@janhq/core/node'
|
||||
import { getAppConfigurations, log } from '@janhq/core/node'
|
||||
|
||||
/**
|
||||
* IPC Handlers
|
||||
@ -27,7 +27,7 @@ import { setupReactDevTool } from './utils/dev'
|
||||
import { cleanLogs } from './utils/log'
|
||||
|
||||
import { registerShortcut } from './utils/selectedText'
|
||||
import { createSystemTray } from './utils/tray'
|
||||
import { trayManager } from './managers/tray'
|
||||
|
||||
const preloadPath = join(__dirname, 'preload.js')
|
||||
const rendererPath = join(__dirname, '..', 'renderer')
|
||||
@ -39,8 +39,16 @@ const quickAskUrl = `${mainUrl}/search`
|
||||
|
||||
const quickAskHotKey = 'CommandOrControl+J'
|
||||
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
|
||||
app
|
||||
.whenReady()
|
||||
.then(() => {
|
||||
if (!gotTheLock) {
|
||||
app.quit()
|
||||
throw new Error('Another instance of the app is already running')
|
||||
}
|
||||
})
|
||||
.then(setupReactDevTool)
|
||||
.then(setupCore)
|
||||
.then(createUserSpace)
|
||||
@ -56,7 +64,7 @@ app
|
||||
windowManager.mainWindow?.webContents.openDevTools()
|
||||
}
|
||||
})
|
||||
.then(() => process.env.CI !== 'e2e' && createSystemTray())
|
||||
.then(() => process.env.CI !== 'e2e' && trayManager.createSystemTray())
|
||||
.then(() => {
|
||||
log(`Version: ${app.getVersion()}`)
|
||||
})
|
||||
@ -64,20 +72,38 @@ app
|
||||
app.on('activate', () => {
|
||||
if (!BrowserWindow.getAllWindows().length) {
|
||||
createMainWindow()
|
||||
} else {
|
||||
windowManager.showMainWindow()
|
||||
}
|
||||
})
|
||||
})
|
||||
.then(() => cleanLogs())
|
||||
|
||||
app.on('second-instance', (_event, _commandLine, _workingDirectory) => {
|
||||
windowManager.showMainWindow()
|
||||
})
|
||||
|
||||
app.on('ready', () => {
|
||||
registerGlobalShortcuts()
|
||||
})
|
||||
|
||||
app.on('before-quit', function (evt) {
|
||||
trayManager.destroyCurrentTray()
|
||||
})
|
||||
|
||||
app.once('quit', () => {
|
||||
cleanUpAndQuit()
|
||||
})
|
||||
|
||||
app.once('window-all-closed', () => {
|
||||
// Feature Toggle for Quick Ask
|
||||
if (getAppConfigurations().quick_ask) return
|
||||
cleanUpAndQuit()
|
||||
})
|
||||
|
||||
function createQuickAskWindow() {
|
||||
// Feature Toggle for Quick Ask
|
||||
if (!getAppConfigurations().quick_ask) return
|
||||
const startUrl = app.isPackaged ? `file://${quickAskPath}` : quickAskUrl
|
||||
windowManager.createQuickAskWindow(preloadPath, startUrl)
|
||||
}
|
||||
@ -89,6 +115,9 @@ function createMainWindow() {
|
||||
|
||||
function registerGlobalShortcuts() {
|
||||
const ret = registerShortcut(quickAskHotKey, (selectedText: string) => {
|
||||
// Feature Toggle for Quick Ask
|
||||
if (!getAppConfigurations().quick_ask) return
|
||||
|
||||
if (!windowManager.isQuickAskWindowVisible()) {
|
||||
windowManager.showQuickAskWindow()
|
||||
windowManager.sendQuickAskSelectedText(selectedText)
|
||||
|
||||
@ -5,7 +5,7 @@ export const mainWindowConfig: Electron.BrowserWindowConstructorOptions = {
|
||||
width: DEFAULT_WIDTH,
|
||||
minWidth: DEFAULT_WIDTH,
|
||||
height: DEFAULT_HEIGHT,
|
||||
skipTaskbar: true,
|
||||
skipTaskbar: false,
|
||||
show: true,
|
||||
trafficLightPosition: {
|
||||
x: 10,
|
||||
|
||||
51
electron/managers/tray.ts
Normal file
51
electron/managers/tray.ts
Normal file
@ -0,0 +1,51 @@
|
||||
import { join } from 'path'
|
||||
import { Tray, app, Menu } from 'electron'
|
||||
import { windowManager } from '../managers/window'
|
||||
import { getAppConfigurations } from '@janhq/core/node'
|
||||
|
||||
class TrayManager {
|
||||
currentTray: Tray | undefined
|
||||
|
||||
createSystemTray = () => {
|
||||
// Feature Toggle for Quick Ask
|
||||
if (!getAppConfigurations().quick_ask) return
|
||||
|
||||
if (this.currentTray) {
|
||||
return
|
||||
}
|
||||
const iconPath = join(app.getAppPath(), 'icons', 'icon-tray.png')
|
||||
const tray = new Tray(iconPath)
|
||||
tray.setToolTip(app.getName())
|
||||
|
||||
tray.on('click', () => {
|
||||
windowManager.showQuickAskWindow()
|
||||
})
|
||||
|
||||
// Add context menu for windows only
|
||||
if (process.platform === 'win32') {
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Open Jan',
|
||||
type: 'normal',
|
||||
click: () => windowManager.showMainWindow(),
|
||||
},
|
||||
{
|
||||
label: 'Open Quick Ask',
|
||||
type: 'normal',
|
||||
click: () => windowManager.showQuickAskWindow(),
|
||||
},
|
||||
{ label: 'Quit', type: 'normal', click: () => app.quit() },
|
||||
])
|
||||
|
||||
tray.setContextMenu(contextMenu)
|
||||
}
|
||||
this.currentTray = tray
|
||||
}
|
||||
|
||||
destroyCurrentTray() {
|
||||
this.currentTray?.destroy()
|
||||
this.currentTray = undefined
|
||||
}
|
||||
}
|
||||
|
||||
export const trayManager = new TrayManager()
|
||||
@ -2,6 +2,7 @@ import { BrowserWindow, app, shell } from 'electron'
|
||||
import { quickAskWindowConfig } from './quickAskWindowConfig'
|
||||
import { AppEvent } from '@janhq/core'
|
||||
import { mainWindowConfig } from './mainWindowConfig'
|
||||
import { getAppConfigurations } from '@janhq/core/node'
|
||||
|
||||
/**
|
||||
* Manages the current window instance.
|
||||
@ -43,6 +44,9 @@ class WindowManager {
|
||||
})
|
||||
|
||||
windowManager.mainWindow?.on('close', function (evt) {
|
||||
// Feature Toggle for Quick Ask
|
||||
if (!getAppConfigurations().quick_ask) return
|
||||
|
||||
if (!isAppQuitting) {
|
||||
evt.preventDefault()
|
||||
windowManager.hideMainWindow()
|
||||
@ -73,15 +77,11 @@ class WindowManager {
|
||||
hideMainWindow(): void {
|
||||
this.mainWindow?.hide()
|
||||
this._mainWindowVisible = false
|
||||
// Only macos
|
||||
if (process.platform === 'darwin') app.dock.hide()
|
||||
}
|
||||
|
||||
showMainWindow(): void {
|
||||
this.mainWindow?.show()
|
||||
this._mainWindowVisible = true
|
||||
// Only macos
|
||||
if (process.platform === 'darwin') app.dock.show()
|
||||
}
|
||||
|
||||
hideQuickAskWindow(): void {
|
||||
@ -101,6 +101,7 @@ class WindowManager {
|
||||
expandQuickAskWindow(heightOffset: number): void {
|
||||
const width = quickAskWindowConfig.width!
|
||||
const height = quickAskWindowConfig.height! + heightOffset
|
||||
this._quickAskWindow?.setMinimumSize(width, height)
|
||||
this._quickAskWindow?.setSize(width, height, true)
|
||||
}
|
||||
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
import { join } from 'path'
|
||||
import { Tray, app, Menu } from 'electron'
|
||||
import { windowManager } from '../managers/window'
|
||||
|
||||
export const createSystemTray = () => {
|
||||
const iconPath = join(app.getAppPath(), 'icons', 'icon-tray.png')
|
||||
const tray = new Tray(iconPath)
|
||||
tray.setToolTip(app.getName())
|
||||
|
||||
const contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
label: 'Open Jan',
|
||||
type: 'normal',
|
||||
click: () => windowManager.showMainWindow(),
|
||||
},
|
||||
{
|
||||
label: 'Open Quick Ask',
|
||||
type: 'normal',
|
||||
click: () => windowManager.showQuickAskWindow(),
|
||||
},
|
||||
{ label: 'Quit', type: 'normal', click: () => app.quit() },
|
||||
])
|
||||
tray.setContextMenu(contextMenu)
|
||||
}
|
||||
@ -13,6 +13,7 @@ import {
|
||||
events,
|
||||
DownloadEvent,
|
||||
log,
|
||||
DownloadRequest,
|
||||
} from '@janhq/core'
|
||||
import { ggufMetadata } from 'hyllama'
|
||||
|
||||
@ -148,7 +149,11 @@ export default class JanHuggingFaceExtension extends HuggingFaceExtension {
|
||||
|
||||
if (this.interrupted) return
|
||||
if (!(await fs.existsSync(localPath))) {
|
||||
downloadFile(url, localPath, network)
|
||||
const downloadRequest: DownloadRequest = {
|
||||
url,
|
||||
localPath,
|
||||
}
|
||||
downloadFile(downloadRequest, network)
|
||||
filePaths.push(filePath)
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
@echo off
|
||||
set /p NITRO_VERSION=<./bin/version.txt
|
||||
.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/win-cuda-11-7 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/win-vulkan && .\node_modules\.bin\download https://delta.jan.ai/vulkaninfoSDK.exe -o ./bin
|
||||
.\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/win-cuda-12-0 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/win-cuda-11-7 && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/win-vulkan
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||
"downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-7 && chmod +x ./bin/linux-cuda-11-7/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/linux-vulkan && chmod +x ./bin/linux-vulkan/nitro && download https://delta.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo",
|
||||
"downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-12-0.tar.gz -e --strip 1 -o ./bin/linux-cuda-12-0 && chmod +x ./bin/linux-cuda-12-0/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda-11-7.tar.gz -e --strip 1 -o ./bin/linux-cuda-11-7 && chmod +x ./bin/linux-cuda-11-7/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-vulkan.tar.gz -e --strip 1 -o ./bin/linux-vulkan && chmod +x ./bin/linux-vulkan/nitro",
|
||||
"downloadnitro:darwin": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-arm64.tar.gz -e --strip 1 -o ./bin/mac-arm64 && chmod +x ./bin/mac-arm64/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-amd64.tar.gz -e --strip 1 -o ./bin/mac-x64 && chmod +x ./bin/mac-x64/nitro",
|
||||
"downloadnitro:win32": "download.bat",
|
||||
"downloadnitro": "run-script-os",
|
||||
|
||||
@ -108,9 +108,6 @@ export default class JanInferenceNitroExtension extends InferenceExtension {
|
||||
events.on(InferenceEvent.OnInferenceStopped, () =>
|
||||
this.onInferenceStopped()
|
||||
)
|
||||
|
||||
// Attempt to fetch nvidia info
|
||||
await executeOnMain(NODE, 'updateNvidiaInfo', {})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,237 +0,0 @@
|
||||
import { writeFileSync, existsSync, readFileSync } from 'fs'
|
||||
import { exec, spawn } from 'child_process'
|
||||
import path from 'path'
|
||||
import { getJanDataFolderPath, log } from '@janhq/core/node'
|
||||
|
||||
/**
|
||||
* Default GPU settings
|
||||
* TODO: This needs to be refactored to support multiple accelerators
|
||||
**/
|
||||
const DEFALT_SETTINGS = {
|
||||
notify: true,
|
||||
run_mode: 'cpu',
|
||||
nvidia_driver: {
|
||||
exist: false,
|
||||
version: '',
|
||||
},
|
||||
cuda: {
|
||||
exist: false,
|
||||
version: '',
|
||||
},
|
||||
gpus: [],
|
||||
gpu_highest_vram: '',
|
||||
gpus_in_use: [],
|
||||
is_initial: true,
|
||||
// TODO: This needs to be set based on user toggle in settings
|
||||
vulkan: false
|
||||
}
|
||||
|
||||
/**
|
||||
* Path to the settings file
|
||||
**/
|
||||
export const GPU_INFO_FILE = path.join(
|
||||
getJanDataFolderPath(),
|
||||
'settings',
|
||||
'settings.json'
|
||||
)
|
||||
|
||||
/**
|
||||
* Current nitro process
|
||||
*/
|
||||
let nitroProcessInfo: NitroProcessInfo | undefined = undefined
|
||||
|
||||
/**
|
||||
* Nitro process info
|
||||
*/
|
||||
export interface NitroProcessInfo {
|
||||
isRunning: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* This will retrive GPU informations and persist settings.json
|
||||
* Will be called when the extension is loaded to turn on GPU acceleration if supported
|
||||
*/
|
||||
export async function updateNvidiaInfo() {
|
||||
if (process.platform !== 'darwin') {
|
||||
let data
|
||||
try {
|
||||
data = JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
} catch (error) {
|
||||
data = DEFALT_SETTINGS
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
}
|
||||
updateNvidiaDriverInfo()
|
||||
updateGpuInfo()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve current nitro process
|
||||
*/
|
||||
export const getNitroProcessInfo = (subprocess: any): NitroProcessInfo => {
|
||||
nitroProcessInfo = {
|
||||
isRunning: subprocess != null,
|
||||
}
|
||||
return nitroProcessInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate nvidia and cuda for linux and windows
|
||||
*/
|
||||
export async function updateNvidiaDriverInfo(): Promise<void> {
|
||||
exec(
|
||||
'nvidia-smi --query-gpu=driver_version --format=csv,noheader',
|
||||
(error, stdout) => {
|
||||
let data = JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
|
||||
if (!error) {
|
||||
const firstLine = stdout.split('\n')[0].trim()
|
||||
data['nvidia_driver'].exist = true
|
||||
data['nvidia_driver'].version = firstLine
|
||||
} else {
|
||||
data['nvidia_driver'].exist = false
|
||||
}
|
||||
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
Promise.resolve()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if file exists in paths
|
||||
*/
|
||||
export function checkFileExistenceInPaths(
|
||||
file: string,
|
||||
paths: string[]
|
||||
): boolean {
|
||||
return paths.some((p) => existsSync(path.join(p, file)))
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate cuda for linux and windows
|
||||
*/
|
||||
export function updateCudaExistence(
|
||||
data: Record<string, any> = DEFALT_SETTINGS
|
||||
): Record<string, any> {
|
||||
let filesCuda12: string[]
|
||||
let filesCuda11: string[]
|
||||
let paths: string[]
|
||||
let cudaVersion: string = ''
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
filesCuda12 = ['cublas64_12.dll', 'cudart64_12.dll', 'cublasLt64_12.dll']
|
||||
filesCuda11 = ['cublas64_11.dll', 'cudart64_11.dll', 'cublasLt64_11.dll']
|
||||
paths = process.env.PATH ? process.env.PATH.split(path.delimiter) : []
|
||||
} else {
|
||||
filesCuda12 = ['libcudart.so.12', 'libcublas.so.12', 'libcublasLt.so.12']
|
||||
filesCuda11 = ['libcudart.so.11.0', 'libcublas.so.11', 'libcublasLt.so.11']
|
||||
paths = process.env.LD_LIBRARY_PATH
|
||||
? process.env.LD_LIBRARY_PATH.split(path.delimiter)
|
||||
: []
|
||||
paths.push('/usr/lib/x86_64-linux-gnu/')
|
||||
}
|
||||
|
||||
let cudaExists = filesCuda12.every(
|
||||
(file) => existsSync(file) || checkFileExistenceInPaths(file, paths)
|
||||
)
|
||||
|
||||
if (!cudaExists) {
|
||||
cudaExists = filesCuda11.every(
|
||||
(file) => existsSync(file) || checkFileExistenceInPaths(file, paths)
|
||||
)
|
||||
if (cudaExists) {
|
||||
cudaVersion = '11'
|
||||
}
|
||||
} else {
|
||||
cudaVersion = '12'
|
||||
}
|
||||
|
||||
data['cuda'].exist = cudaExists
|
||||
data['cuda'].version = cudaVersion
|
||||
console.debug(data['is_initial'], data['gpus_in_use'])
|
||||
if (cudaExists && data['is_initial'] && data['gpus_in_use'].length > 0) {
|
||||
data.run_mode = 'gpu'
|
||||
}
|
||||
data.is_initial = false
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* Get GPU information
|
||||
*/
|
||||
export async function updateGpuInfo(): Promise<void> {
|
||||
let data = JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
|
||||
// Cuda
|
||||
if (data['vulkan'] === true) {
|
||||
// Vulkan
|
||||
exec(
|
||||
process.platform === 'win32'
|
||||
? `${__dirname}\\..\\bin\\vulkaninfoSDK.exe --summary`
|
||||
: `${__dirname}/../bin/vulkaninfo --summary`,
|
||||
(error, stdout) => {
|
||||
if (!error) {
|
||||
const output = stdout.toString()
|
||||
log(output)
|
||||
const gpuRegex = /GPU(\d+):(?:[\s\S]*?)deviceName\s*=\s*(.*)/g
|
||||
|
||||
let gpus = []
|
||||
let match
|
||||
while ((match = gpuRegex.exec(output)) !== null) {
|
||||
const id = match[1]
|
||||
const name = match[2]
|
||||
gpus.push({ id, vram: 0, name })
|
||||
}
|
||||
data.gpus = gpus
|
||||
|
||||
if (!data['gpus_in_use'] || data['gpus_in_use'].length === 0) {
|
||||
data.gpus_in_use = [data.gpus.length > 1 ? '1' : '0']
|
||||
}
|
||||
|
||||
data = updateCudaExistence(data)
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
}
|
||||
Promise.resolve()
|
||||
}
|
||||
)
|
||||
} else {
|
||||
exec(
|
||||
'nvidia-smi --query-gpu=index,memory.total,name --format=csv,noheader,nounits',
|
||||
(error, stdout) => {
|
||||
if (!error) {
|
||||
log(stdout)
|
||||
// Get GPU info and gpu has higher memory first
|
||||
let highestVram = 0
|
||||
let highestVramId = '0'
|
||||
let gpus = stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
let [id, vram, name] = line.split(', ')
|
||||
vram = vram.replace(/\r/g, '')
|
||||
if (parseFloat(vram) > highestVram) {
|
||||
highestVram = parseFloat(vram)
|
||||
highestVramId = id
|
||||
}
|
||||
return { id, vram, name }
|
||||
})
|
||||
|
||||
data.gpus = gpus
|
||||
data.gpu_highest_vram = highestVramId
|
||||
} else {
|
||||
data.gpus = []
|
||||
data.gpu_highest_vram = ''
|
||||
}
|
||||
|
||||
if (!data['gpus_in_use'] || data['gpus_in_use'].length === 0) {
|
||||
data.gpus_in_use = [data['gpu_highest_vram']]
|
||||
}
|
||||
|
||||
data = updateCudaExistence(data)
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
Promise.resolve()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,12 +1,19 @@
|
||||
import { getJanDataFolderPath } from '@janhq/core/node'
|
||||
import { readFileSync } from 'fs'
|
||||
import * as path from 'path'
|
||||
import { GPU_INFO_FILE } from './accelerator'
|
||||
|
||||
export interface NitroExecutableOptions {
|
||||
executablePath: string
|
||||
cudaVisibleDevices: string
|
||||
vkVisibleDevices: string
|
||||
}
|
||||
|
||||
export const GPU_INFO_FILE = path.join(
|
||||
getJanDataFolderPath(),
|
||||
'settings',
|
||||
'settings.json'
|
||||
)
|
||||
|
||||
/**
|
||||
* Find which executable file to run based on the current platform.
|
||||
* @returns The name of the executable file to run.
|
||||
|
||||
@ -4,7 +4,6 @@ import { ChildProcessWithoutNullStreams, spawn } from 'child_process'
|
||||
import tcpPortUsed from 'tcp-port-used'
|
||||
import fetchRT from 'fetch-retry'
|
||||
import { log, getSystemResourceInfo } from '@janhq/core/node'
|
||||
import { getNitroProcessInfo, updateNvidiaInfo } from './accelerator'
|
||||
import {
|
||||
Model,
|
||||
InferenceEngine,
|
||||
@ -385,11 +384,26 @@ function dispose() {
|
||||
killSubprocess()
|
||||
}
|
||||
|
||||
/**
|
||||
* Nitro process info
|
||||
*/
|
||||
export interface NitroProcessInfo {
|
||||
isRunning: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve current nitro process
|
||||
*/
|
||||
const getCurrentNitroProcessInfo = (): NitroProcessInfo => {
|
||||
return {
|
||||
isRunning: subprocess != null,
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
runModel,
|
||||
stopModel,
|
||||
killSubprocess,
|
||||
dispose,
|
||||
updateNvidiaInfo,
|
||||
getCurrentNitroProcessInfo: () => getNitroProcessInfo(subprocess),
|
||||
getCurrentNitroProcessInfo,
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ import {
|
||||
ImportingModel,
|
||||
LocalImportModelEvent,
|
||||
baseName,
|
||||
GpuSetting,
|
||||
DownloadRequest,
|
||||
} from '@janhq/core'
|
||||
|
||||
import { extractFileName } from './helpers/path'
|
||||
@ -29,10 +31,14 @@ export default class JanModelExtension extends ModelExtension {
|
||||
private static readonly _modelMetadataFileName = 'model.json'
|
||||
private static readonly _supportedModelFormat = '.gguf'
|
||||
private static readonly _incompletedModelFileName = '.download'
|
||||
private static readonly _offlineInferenceEngine = InferenceEngine.nitro
|
||||
|
||||
private static readonly _offlineInferenceEngine = [
|
||||
InferenceEngine.nitro,
|
||||
InferenceEngine.nitro_tensorrt_llm,
|
||||
]
|
||||
private static readonly _tensorRtEngineFormat = '.engine'
|
||||
private static readonly _configDirName = 'config'
|
||||
private static readonly _defaultModelFileName = 'default-model.json'
|
||||
private static readonly _supportedGpuArch = ['turing', 'ampere', 'ada']
|
||||
|
||||
/**
|
||||
* Called when the extension is loaded.
|
||||
@ -89,12 +95,52 @@ export default class JanModelExtension extends ModelExtension {
|
||||
*/
|
||||
async downloadModel(
|
||||
model: Model,
|
||||
gpuSettings?: GpuSetting,
|
||||
network?: { ignoreSSL?: boolean; proxy?: string }
|
||||
): Promise<void> {
|
||||
// create corresponding directory
|
||||
const modelDirPath = await joinPath([JanModelExtension._homeDir, model.id])
|
||||
if (!(await fs.existsSync(modelDirPath))) await fs.mkdirSync(modelDirPath)
|
||||
|
||||
if (model.engine === InferenceEngine.nitro_tensorrt_llm) {
|
||||
if (!gpuSettings || gpuSettings.gpus.length === 0) {
|
||||
console.error('No GPU found. Please check your GPU setting.')
|
||||
return
|
||||
}
|
||||
const firstGpu = gpuSettings.gpus[0]
|
||||
if (!firstGpu.name.toLowerCase().includes('nvidia')) {
|
||||
console.error('No Nvidia GPU found. Please check your GPU setting.')
|
||||
return
|
||||
}
|
||||
const gpuArch = firstGpu.arch
|
||||
if (gpuArch === undefined) {
|
||||
console.error(
|
||||
'No GPU architecture found. Please check your GPU setting.'
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
if (!JanModelExtension._supportedGpuArch.includes(gpuArch)) {
|
||||
console.error(
|
||||
`Your GPU: ${firstGpu} is not supported. Only 20xx, 30xx, 40xx series are supported.`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
const os = 'windows' // TODO: remove this hard coded value
|
||||
|
||||
const newSources = model.sources.map((source) => {
|
||||
const newSource = { ...source }
|
||||
newSource.url = newSource.url
|
||||
.replace(/<os>/g, os)
|
||||
.replace(/<gpuarch>/g, gpuArch)
|
||||
return newSource
|
||||
})
|
||||
model.sources = newSources
|
||||
}
|
||||
|
||||
console.debug(`Download sources: ${JSON.stringify(model.sources)}`)
|
||||
|
||||
if (model.sources.length > 1) {
|
||||
// path to model binaries
|
||||
for (const source of model.sources) {
|
||||
@ -105,8 +151,11 @@ export default class JanModelExtension extends ModelExtension {
|
||||
if (source.filename) {
|
||||
path = await joinPath([modelDirPath, source.filename])
|
||||
}
|
||||
|
||||
downloadFile(source.url, path, network)
|
||||
const downloadRequest: DownloadRequest = {
|
||||
url: source.url,
|
||||
localPath: path,
|
||||
}
|
||||
downloadFile(downloadRequest, network)
|
||||
}
|
||||
// TODO: handle multiple binaries for web later
|
||||
} else {
|
||||
@ -115,7 +164,11 @@ export default class JanModelExtension extends ModelExtension {
|
||||
JanModelExtension._supportedModelFormat
|
||||
)
|
||||
const path = await joinPath([modelDirPath, fileName])
|
||||
downloadFile(model.sources[0]?.url, path, network)
|
||||
const downloadRequest: DownloadRequest = {
|
||||
url: model.sources[0]?.url,
|
||||
localPath: path,
|
||||
}
|
||||
downloadFile(downloadRequest, network)
|
||||
|
||||
if (window && window.core?.api && window.core.api.baseApiUrl) {
|
||||
this.startPollingDownloadProgress(model.id)
|
||||
@ -238,7 +291,7 @@ export default class JanModelExtension extends ModelExtension {
|
||||
async getDownloadedModels(): Promise<Model[]> {
|
||||
return await this.getModelsMetadata(
|
||||
async (modelDir: string, model: Model) => {
|
||||
if (model.engine !== JanModelExtension._offlineInferenceEngine)
|
||||
if (!JanModelExtension._offlineInferenceEngine.includes(model.engine))
|
||||
return true
|
||||
|
||||
// model binaries (sources) are absolute path & exist
|
||||
@ -247,22 +300,32 @@ export default class JanModelExtension extends ModelExtension {
|
||||
)
|
||||
if (existFiles.every((exist) => exist)) return true
|
||||
|
||||
return await fs
|
||||
const result = await fs
|
||||
.readdirSync(await joinPath([JanModelExtension._homeDir, modelDir]))
|
||||
.then((files: string[]) => {
|
||||
// Model binary exists in the directory
|
||||
// Model binary name can match model ID or be a .gguf file and not be an incompleted model file
|
||||
return (
|
||||
files.includes(modelDir) ||
|
||||
files.filter(
|
||||
(file) =>
|
||||
files.filter((file) => {
|
||||
if (
|
||||
file.endsWith(JanModelExtension._incompletedModelFileName)
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return (
|
||||
file
|
||||
.toLowerCase()
|
||||
.includes(JanModelExtension._supportedModelFormat) &&
|
||||
!file.endsWith(JanModelExtension._incompletedModelFileName)
|
||||
)?.length >= model.sources.length
|
||||
.includes(JanModelExtension._supportedModelFormat) ||
|
||||
file
|
||||
.toLowerCase()
|
||||
.includes(JanModelExtension._tensorRtEngineFormat)
|
||||
)
|
||||
})?.length > 0 // TODO: NamH find better way (can use basename to check the file name with source url)
|
||||
)
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
0
extensions/monitoring-extension/bin/.gitkeep
Normal file
0
extensions/monitoring-extension/bin/.gitkeep
Normal file
2
extensions/monitoring-extension/download.bat
Normal file
2
extensions/monitoring-extension/download.bat
Normal file
@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
.\node_modules\.bin\download https://delta.jan.ai/vulkaninfoSDK.exe -o ./bin
|
||||
@ -3,21 +3,40 @@
|
||||
"version": "1.0.10",
|
||||
"description": "This extension provides system health and OS level data",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/module.js",
|
||||
"node": "dist/node/index.cjs.js",
|
||||
"author": "Jan <service@jan.ai>",
|
||||
"license": "AGPL-3.0",
|
||||
"scripts": {
|
||||
"build": "tsc -b . && webpack --config webpack.config.js",
|
||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts && npm run download-artifacts",
|
||||
"download-artifacts": "run-script-os && cpx \"bin/**\" \"dist/bin\"",
|
||||
"download-artifacts:darwin": "echo 'No artifacts to download for darwin'",
|
||||
"download-artifacts:win32": "download.bat",
|
||||
"download-artifacts:linux": "download https://delta.jan.ai/vulkaninfo -o ./bin && chmod +x ./bin/vulkaninfo",
|
||||
"build:publish": "rimraf *.tgz --glob && npm run build && npm pack && cpx *.tgz ../../pre-install"
|
||||
},
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./main": "./dist/node/index.cjs.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/node": "^20.11.4",
|
||||
"@types/node-os-utils": "^1.3.4",
|
||||
"run-script-os": "^1.1.6",
|
||||
"cpx": "^1.5.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"webpack": "^5.88.2",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"ts-loader": "^9.5.0"
|
||||
"rollup": "^2.38.5",
|
||||
"rollup-plugin-define": "^1.0.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"rollup-plugin-typescript2": "^0.36.0",
|
||||
"typescript": "^5.3.3",
|
||||
"download-cli": "^1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@janhq/core": "file:../../core",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"node-os-utils": "^1.3.7"
|
||||
},
|
||||
"files": [
|
||||
|
||||
68
extensions/monitoring-extension/rollup.config.ts
Normal file
68
extensions/monitoring-extension/rollup.config.ts
Normal file
@ -0,0 +1,68 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import sourceMaps from 'rollup-plugin-sourcemaps'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
import json from '@rollup/plugin-json'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
const packageJson = require('./package.json')
|
||||
|
||||
export default [
|
||||
{
|
||||
input: `src/index.ts`,
|
||||
output: [{ file: packageJson.main, format: 'es', sourcemap: true }],
|
||||
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
||||
external: [],
|
||||
watch: {
|
||||
include: 'src/**',
|
||||
},
|
||||
plugins: [
|
||||
replace({
|
||||
NODE: JSON.stringify(`${packageJson.name}/${packageJson.node}`),
|
||||
}),
|
||||
// Allow json resolution
|
||||
json(),
|
||||
// Compile TypeScript files
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
// Compile TypeScript files
|
||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||
commonjs(),
|
||||
// Allow node_modules resolution, so you can use 'external' to control
|
||||
// which external modules to include in the bundle
|
||||
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||
resolve({
|
||||
extensions: ['.js', '.ts', '.svelte'],
|
||||
}),
|
||||
|
||||
// Resolve source maps to the original source
|
||||
sourceMaps(),
|
||||
],
|
||||
},
|
||||
{
|
||||
input: `src/node/index.ts`,
|
||||
output: [
|
||||
{ file: 'dist/node/index.cjs.js', format: 'cjs', sourcemap: true },
|
||||
],
|
||||
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
|
||||
external: ['@janhq/core/node'],
|
||||
watch: {
|
||||
include: 'src/node/**',
|
||||
},
|
||||
plugins: [
|
||||
// Allow json resolution
|
||||
json(),
|
||||
// Compile TypeScript files
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
// Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
|
||||
commonjs(),
|
||||
// Allow node_modules resolution, so you can use 'external' to control
|
||||
// which external modules to include in the bundle
|
||||
// https://github.com/rollup/rollup-plugin-node-resolve#usage
|
||||
resolve({
|
||||
extensions: ['.ts', '.js', '.json'],
|
||||
}),
|
||||
|
||||
// Resolve source maps to the original source
|
||||
sourceMaps(),
|
||||
],
|
||||
},
|
||||
]
|
||||
@ -1 +1,18 @@
|
||||
declare const MODULE: string
|
||||
declare const NODE: string
|
||||
|
||||
type CpuGpuInfo = {
|
||||
cpu: {
|
||||
usage: number
|
||||
}
|
||||
gpu: GpuInfo[]
|
||||
}
|
||||
|
||||
type GpuInfo = {
|
||||
id: string
|
||||
name: string
|
||||
temperature: string
|
||||
utilization: string
|
||||
memoryTotal: string
|
||||
memoryFree: string
|
||||
memoryUtilization: string
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { MonitoringExtension, executeOnMain } from '@janhq/core'
|
||||
import { GpuSetting, MonitoringExtension, executeOnMain } from '@janhq/core'
|
||||
|
||||
/**
|
||||
* JanMonitoringExtension is a extension that provides system monitoring functionality.
|
||||
@ -8,19 +8,30 @@ export default class JanMonitoringExtension extends MonitoringExtension {
|
||||
/**
|
||||
* Called when the extension is loaded.
|
||||
*/
|
||||
async onLoad() {}
|
||||
async onLoad() {
|
||||
// Attempt to fetch nvidia info
|
||||
await executeOnMain(NODE, 'updateNvidiaInfo')
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the extension is unloaded.
|
||||
*/
|
||||
onUnload(): void {}
|
||||
|
||||
/**
|
||||
* Returns the GPU configuration.
|
||||
* @returns A Promise that resolves to an object containing the GPU configuration.
|
||||
*/
|
||||
async getGpuSetting(): Promise<GpuSetting | undefined> {
|
||||
return executeOnMain(NODE, 'getGpuConfig')
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the system resources.
|
||||
* @returns A Promise that resolves to an object containing information about the system resources.
|
||||
*/
|
||||
getResourcesInfo(): Promise<any> {
|
||||
return executeOnMain(MODULE, 'getResourcesInfo')
|
||||
return executeOnMain(NODE, 'getResourcesInfo')
|
||||
}
|
||||
|
||||
/**
|
||||
@ -28,6 +39,6 @@ export default class JanMonitoringExtension extends MonitoringExtension {
|
||||
* @returns A Promise that resolves to an object containing information about the current system load.
|
||||
*/
|
||||
getCurrentLoad(): Promise<any> {
|
||||
return executeOnMain(MODULE, 'getCurrentLoad')
|
||||
return executeOnMain(NODE, 'getCurrentLoad')
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,92 +0,0 @@
|
||||
const nodeOsUtils = require('node-os-utils')
|
||||
const getJanDataFolderPath = require('@janhq/core/node').getJanDataFolderPath
|
||||
const path = require('path')
|
||||
const { readFileSync } = require('fs')
|
||||
const exec = require('child_process').exec
|
||||
|
||||
const NVIDIA_INFO_FILE = path.join(
|
||||
getJanDataFolderPath(),
|
||||
'settings',
|
||||
'settings.json'
|
||||
)
|
||||
|
||||
const getResourcesInfo = () =>
|
||||
new Promise((resolve) => {
|
||||
nodeOsUtils.mem.used().then((ramUsedInfo) => {
|
||||
const totalMemory = ramUsedInfo.totalMemMb * 1024 * 1024
|
||||
const usedMemory = ramUsedInfo.usedMemMb * 1024 * 1024
|
||||
const response = {
|
||||
mem: {
|
||||
totalMemory,
|
||||
usedMemory,
|
||||
},
|
||||
}
|
||||
resolve(response)
|
||||
})
|
||||
})
|
||||
|
||||
const getCurrentLoad = () =>
|
||||
new Promise((resolve, reject) => {
|
||||
nodeOsUtils.cpu.usage().then((cpuPercentage) => {
|
||||
let data = {
|
||||
run_mode: 'cpu',
|
||||
gpus_in_use: [],
|
||||
}
|
||||
if (process.platform !== 'darwin') {
|
||||
data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, 'utf-8'))
|
||||
}
|
||||
if (data.run_mode === 'gpu' && data.gpus_in_use.length > 0) {
|
||||
const gpuIds = data['gpus_in_use'].join(',')
|
||||
if (gpuIds !== '' && data['vulkan'] !== true) {
|
||||
exec(
|
||||
`nvidia-smi --query-gpu=index,name,temperature.gpu,utilization.gpu,memory.total,memory.free,utilization.memory --format=csv,noheader,nounits --id=${gpuIds}`,
|
||||
(error, stdout, _) => {
|
||||
if (error) {
|
||||
console.error(`exec error: ${error}`)
|
||||
reject(error)
|
||||
return
|
||||
}
|
||||
const gpuInfo = stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
const [
|
||||
id,
|
||||
name,
|
||||
temperature,
|
||||
utilization,
|
||||
memoryTotal,
|
||||
memoryFree,
|
||||
memoryUtilization,
|
||||
] = line.split(', ').map((item) => item.replace(/\r/g, ''))
|
||||
return {
|
||||
id,
|
||||
name,
|
||||
temperature,
|
||||
utilization,
|
||||
memoryTotal,
|
||||
memoryFree,
|
||||
memoryUtilization,
|
||||
}
|
||||
})
|
||||
resolve({
|
||||
cpu: { usage: cpuPercentage },
|
||||
gpu: gpuInfo,
|
||||
})
|
||||
}
|
||||
)
|
||||
} else {
|
||||
// Handle the case where gpuIds is empty
|
||||
resolve({ cpu: { usage: cpuPercentage }, gpu: [] })
|
||||
}
|
||||
} else {
|
||||
// Handle the case where run_mode is not 'gpu' or no GPUs are in use
|
||||
resolve({ cpu: { usage: cpuPercentage }, gpu: [] })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
getResourcesInfo,
|
||||
getCurrentLoad,
|
||||
}
|
||||
322
extensions/monitoring-extension/src/node/index.ts
Normal file
322
extensions/monitoring-extension/src/node/index.ts
Normal file
@ -0,0 +1,322 @@
|
||||
import { GpuSetting, GpuSettingInfo, ResourceInfo } from '@janhq/core'
|
||||
import { getJanDataFolderPath, log } from '@janhq/core/node'
|
||||
import { mem, cpu } from 'node-os-utils'
|
||||
import { exec } from 'child_process'
|
||||
import { writeFileSync, existsSync, readFileSync, mkdirSync } from 'fs'
|
||||
import path from 'path'
|
||||
|
||||
/**
|
||||
* Path to the settings directory
|
||||
**/
|
||||
export const SETTINGS_DIR = path.join(getJanDataFolderPath(), 'settings')
|
||||
/**
|
||||
* Path to the settings file
|
||||
**/
|
||||
export const GPU_INFO_FILE = path.join(SETTINGS_DIR, 'settings.json')
|
||||
|
||||
/**
|
||||
* Default GPU settings
|
||||
* TODO: This needs to be refactored to support multiple accelerators
|
||||
**/
|
||||
const DEFAULT_SETTINGS: GpuSetting = {
|
||||
notify: true,
|
||||
run_mode: 'cpu',
|
||||
nvidia_driver: {
|
||||
exist: false,
|
||||
version: '',
|
||||
},
|
||||
cuda: {
|
||||
exist: false,
|
||||
version: '',
|
||||
},
|
||||
gpus: [],
|
||||
gpu_highest_vram: '',
|
||||
gpus_in_use: [],
|
||||
is_initial: true,
|
||||
// TODO: This needs to be set based on user toggle in settings
|
||||
vulkan: false,
|
||||
}
|
||||
|
||||
export const getGpuConfig = async (): Promise<GpuSetting | undefined> => {
|
||||
if (process.platform === 'darwin') return undefined
|
||||
return JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
}
|
||||
|
||||
export const getResourcesInfo = async (): Promise<ResourceInfo> => {
|
||||
const ramUsedInfo = await mem.used()
|
||||
const totalMemory = ramUsedInfo.totalMemMb * 1024 * 1024
|
||||
const usedMemory = ramUsedInfo.usedMemMb * 1024 * 1024
|
||||
|
||||
const resourceInfo: ResourceInfo = {
|
||||
mem: {
|
||||
totalMemory,
|
||||
usedMemory,
|
||||
},
|
||||
}
|
||||
|
||||
return resourceInfo
|
||||
}
|
||||
|
||||
export const getCurrentLoad = () =>
|
||||
new Promise<CpuGpuInfo>(async (resolve, reject) => {
|
||||
const cpuPercentage = await cpu.usage()
|
||||
let data = {
|
||||
run_mode: 'cpu',
|
||||
gpus_in_use: [],
|
||||
}
|
||||
|
||||
if (process.platform !== 'darwin') {
|
||||
data = JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
}
|
||||
|
||||
if (data.run_mode === 'gpu' && data.gpus_in_use.length > 0) {
|
||||
const gpuIds = data.gpus_in_use.join(',')
|
||||
if (gpuIds !== '' && data['vulkan'] !== true) {
|
||||
exec(
|
||||
`nvidia-smi --query-gpu=index,name,temperature.gpu,utilization.gpu,memory.total,memory.free,utilization.memory --format=csv,noheader,nounits --id=${gpuIds}`,
|
||||
(error, stdout, _) => {
|
||||
if (error) {
|
||||
console.error(`exec error: ${error}`)
|
||||
throw new Error(error.message)
|
||||
}
|
||||
const gpuInfo: GpuInfo[] = stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
const [
|
||||
id,
|
||||
name,
|
||||
temperature,
|
||||
utilization,
|
||||
memoryTotal,
|
||||
memoryFree,
|
||||
memoryUtilization,
|
||||
] = line.split(', ').map((item) => item.replace(/\r/g, ''))
|
||||
return {
|
||||
id,
|
||||
name,
|
||||
temperature,
|
||||
utilization,
|
||||
memoryTotal,
|
||||
memoryFree,
|
||||
memoryUtilization,
|
||||
}
|
||||
})
|
||||
|
||||
resolve({
|
||||
cpu: { usage: cpuPercentage },
|
||||
gpu: gpuInfo,
|
||||
})
|
||||
}
|
||||
)
|
||||
} else {
|
||||
// Handle the case where gpuIds is empty
|
||||
resolve({
|
||||
cpu: { usage: cpuPercentage },
|
||||
gpu: [],
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// Handle the case where run_mode is not 'gpu' or no GPUs are in use
|
||||
resolve({
|
||||
cpu: { usage: cpuPercentage },
|
||||
gpu: [],
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* This will retrive GPU informations and persist settings.json
|
||||
* Will be called when the extension is loaded to turn on GPU acceleration if supported
|
||||
*/
|
||||
export const updateNvidiaInfo = async () => {
|
||||
// ignore if macos
|
||||
if (process.platform === 'darwin') return
|
||||
|
||||
try {
|
||||
JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
} catch (error) {
|
||||
if (!existsSync(SETTINGS_DIR)) {
|
||||
mkdirSync(SETTINGS_DIR, {
|
||||
recursive: true,
|
||||
})
|
||||
}
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(DEFAULT_SETTINGS, null, 2))
|
||||
}
|
||||
|
||||
await updateNvidiaDriverInfo()
|
||||
await updateGpuInfo()
|
||||
}
|
||||
|
||||
const updateNvidiaDriverInfo = async () =>
|
||||
new Promise((resolve, reject) => {
|
||||
exec(
|
||||
'nvidia-smi --query-gpu=driver_version --format=csv,noheader',
|
||||
(error, stdout) => {
|
||||
const data: GpuSetting = JSON.parse(
|
||||
readFileSync(GPU_INFO_FILE, 'utf-8')
|
||||
)
|
||||
|
||||
if (!error) {
|
||||
const firstLine = stdout.split('\n')[0].trim()
|
||||
data.nvidia_driver.exist = true
|
||||
data.nvidia_driver.version = firstLine
|
||||
} else {
|
||||
data.nvidia_driver.exist = false
|
||||
}
|
||||
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
resolve({})
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
const getGpuArch = (gpuName: string): string => {
|
||||
if (!gpuName.toLowerCase().includes('nvidia')) return 'unknown'
|
||||
|
||||
if (gpuName.includes('20')) return 'turing'
|
||||
else if (gpuName.includes('30')) return 'ampere'
|
||||
else if (gpuName.includes('40')) return 'ada'
|
||||
else return 'unknown'
|
||||
}
|
||||
|
||||
const updateGpuInfo = async () =>
|
||||
new Promise((resolve, reject) => {
|
||||
let data: GpuSetting = JSON.parse(readFileSync(GPU_INFO_FILE, 'utf-8'))
|
||||
|
||||
// Cuda
|
||||
if (data.vulkan === true) {
|
||||
// Vulkan
|
||||
exec(
|
||||
process.platform === 'win32'
|
||||
? `${__dirname}\\..\\bin\\vulkaninfoSDK.exe --summary`
|
||||
: `${__dirname}/../bin/vulkaninfo --summary`,
|
||||
(error, stdout) => {
|
||||
if (!error) {
|
||||
const output = stdout.toString()
|
||||
|
||||
log(output)
|
||||
const gpuRegex = /GPU(\d+):(?:[\s\S]*?)deviceName\s*=\s*(.*)/g
|
||||
|
||||
const gpus: GpuSettingInfo[] = []
|
||||
let match
|
||||
while ((match = gpuRegex.exec(output)) !== null) {
|
||||
const id = match[1]
|
||||
const name = match[2]
|
||||
const arch = getGpuArch(name)
|
||||
gpus.push({ id, vram: '0', name, arch })
|
||||
}
|
||||
data.gpus = gpus
|
||||
|
||||
if (!data.gpus_in_use || data.gpus_in_use.length === 0) {
|
||||
data.gpus_in_use = [data.gpus.length > 1 ? '1' : '0']
|
||||
}
|
||||
|
||||
data = updateCudaExistence(data)
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
resolve({})
|
||||
} else {
|
||||
reject(error)
|
||||
}
|
||||
}
|
||||
)
|
||||
} else {
|
||||
exec(
|
||||
'nvidia-smi --query-gpu=index,memory.total,name --format=csv,noheader,nounits',
|
||||
(error, stdout) => {
|
||||
if (!error) {
|
||||
log(stdout)
|
||||
// Get GPU info and gpu has higher memory first
|
||||
let highestVram = 0
|
||||
let highestVramId = '0'
|
||||
const gpus: GpuSettingInfo[] = stdout
|
||||
.trim()
|
||||
.split('\n')
|
||||
.map((line) => {
|
||||
let [id, vram, name] = line.split(', ')
|
||||
const arch = getGpuArch(name)
|
||||
vram = vram.replace(/\r/g, '')
|
||||
if (parseFloat(vram) > highestVram) {
|
||||
highestVram = parseFloat(vram)
|
||||
highestVramId = id
|
||||
}
|
||||
return { id, vram, name, arch }
|
||||
})
|
||||
|
||||
data.gpus = gpus
|
||||
data.gpu_highest_vram = highestVramId
|
||||
} else {
|
||||
data.gpus = []
|
||||
data.gpu_highest_vram = ''
|
||||
}
|
||||
|
||||
if (!data.gpus_in_use || data.gpus_in_use.length === 0) {
|
||||
data.gpus_in_use = [data.gpu_highest_vram]
|
||||
}
|
||||
|
||||
data = updateCudaExistence(data)
|
||||
writeFileSync(GPU_INFO_FILE, JSON.stringify(data, null, 2))
|
||||
resolve({})
|
||||
}
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* Check if file exists in paths
|
||||
*/
|
||||
const checkFileExistenceInPaths = (file: string, paths: string[]): boolean => {
|
||||
return paths.some((p) => existsSync(path.join(p, file)))
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate cuda for linux and windows
|
||||
*/
|
||||
const updateCudaExistence = (
|
||||
data: GpuSetting = DEFAULT_SETTINGS
|
||||
): GpuSetting => {
|
||||
let filesCuda12: string[]
|
||||
let filesCuda11: string[]
|
||||
let paths: string[]
|
||||
let cudaVersion: string = ''
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
filesCuda12 = ['cublas64_12.dll', 'cudart64_12.dll', 'cublasLt64_12.dll']
|
||||
filesCuda11 = ['cublas64_11.dll', 'cudart64_11.dll', 'cublasLt64_11.dll']
|
||||
paths = process.env.PATH ? process.env.PATH.split(path.delimiter) : []
|
||||
} else {
|
||||
filesCuda12 = ['libcudart.so.12', 'libcublas.so.12', 'libcublasLt.so.12']
|
||||
filesCuda11 = ['libcudart.so.11.0', 'libcublas.so.11', 'libcublasLt.so.11']
|
||||
paths = process.env.LD_LIBRARY_PATH
|
||||
? process.env.LD_LIBRARY_PATH.split(path.delimiter)
|
||||
: []
|
||||
paths.push('/usr/lib/x86_64-linux-gnu/')
|
||||
}
|
||||
|
||||
let cudaExists = filesCuda12.every(
|
||||
(file) => existsSync(file) || checkFileExistenceInPaths(file, paths)
|
||||
)
|
||||
|
||||
if (!cudaExists) {
|
||||
cudaExists = filesCuda11.every(
|
||||
(file) => existsSync(file) || checkFileExistenceInPaths(file, paths)
|
||||
)
|
||||
if (cudaExists) {
|
||||
cudaVersion = '11'
|
||||
}
|
||||
} else {
|
||||
cudaVersion = '12'
|
||||
}
|
||||
|
||||
data.cuda.exist = cudaExists
|
||||
data.cuda.version = cudaVersion
|
||||
|
||||
console.debug(data.is_initial, data.gpus_in_use)
|
||||
|
||||
if (cudaExists && data.is_initial && data.gpus_in_use.length > 0) {
|
||||
data.run_mode = 'gpu'
|
||||
}
|
||||
|
||||
data.is_initial = false
|
||||
return data
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const packageJson = require('./package.json')
|
||||
|
||||
module.exports = {
|
||||
experiments: { outputModule: true },
|
||||
entry: './src/index.ts', // Adjust the entry point to match your project's main file
|
||||
mode: 'production',
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
output: {
|
||||
filename: 'index.js', // Adjust the output file name as needed
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
library: { type: 'module' }, // Specify ESM output format
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
MODULE: JSON.stringify(`${packageJson.name}/${packageJson.module}`),
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
// Add loaders and other configuration as needed for your project
|
||||
}
|
||||
79
extensions/tensorrt-llm-extension/README.md
Normal file
79
extensions/tensorrt-llm-extension/README.md
Normal file
@ -0,0 +1,79 @@
|
||||
# Tensorrt-LLM Extension
|
||||
|
||||
Created using Jan extension example
|
||||
|
||||
# Create a Jan Extension using Typescript
|
||||
|
||||
Use this template to bootstrap the creation of a TypeScript Jan extension. 🚀
|
||||
|
||||
## Create Your Own Extension
|
||||
|
||||
To create your own extension, you can use this repository as a template! Just follow the below instructions:
|
||||
|
||||
1. Click the Use this template button at the top of the repository
|
||||
2. Select Create a new repository
|
||||
3. Select an owner and name for your new repository
|
||||
4. Click Create repository
|
||||
5. Clone your new repository
|
||||
|
||||
## Initial Setup
|
||||
|
||||
After you've cloned the repository to your local machine or codespace, you'll need to perform some initial setup steps before you can develop your extension.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> You'll need to have a reasonably modern version of
|
||||
> [Node.js](https://nodejs.org) handy. If you are using a version manager like
|
||||
> [`nodenv`](https://github.com/nodenv/nodenv) or
|
||||
> [`nvm`](https://github.com/nvm-sh/nvm), you can run `nodenv install` in the
|
||||
> root of your repository to install the version specified in
|
||||
> [`package.json`](./package.json). Otherwise, 20.x or later should work!
|
||||
|
||||
1. :hammer_and_wrench: Install the dependencies
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
1. :building_construction: Package the TypeScript for distribution
|
||||
|
||||
```bash
|
||||
npm run bundle
|
||||
```
|
||||
|
||||
1. :white_check_mark: Check your artifact
|
||||
|
||||
There will be a tgz file in your extension directory now
|
||||
|
||||
## Update the Extension Metadata
|
||||
|
||||
The [`package.json`](package.json) file defines metadata about your extension, such as
|
||||
extension name, main entry, description and version.
|
||||
|
||||
When you copy this repository, update `package.json` with the name, description for your extension.
|
||||
|
||||
## Update the Extension Code
|
||||
|
||||
The [`src/`](./src/) directory is the heart of your extension! This contains the
|
||||
source code that will be run when your extension functions are invoked. You can replace the
|
||||
contents of this directory with your own code.
|
||||
|
||||
There are a few things to keep in mind when writing your extension code:
|
||||
|
||||
- Most Jan Extension functions are processed asynchronously.
|
||||
In `index.ts`, you will see that the extension function will return a `Promise<any>`.
|
||||
|
||||
```typescript
|
||||
import { events, MessageEvent, MessageRequest } from '@janhq/core'
|
||||
|
||||
function onStart(): Promise<any> {
|
||||
return events.on(MessageEvent.OnMessageSent, (data: MessageRequest) =>
|
||||
this.inference(data)
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
For more information about the Jan Extension Core module, see the
|
||||
[documentation](https://github.com/janhq/jan/blob/main/core/README.md).
|
||||
|
||||
So, what are you waiting for? Go ahead and start customizing your extension!
|
||||
49
extensions/tensorrt-llm-extension/models.json
Normal file
49
extensions/tensorrt-llm-extension/models.json
Normal file
@ -0,0 +1,49 @@
|
||||
[
|
||||
{
|
||||
"sources": [
|
||||
{
|
||||
"filename": "config.json",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/config.json"
|
||||
},
|
||||
{
|
||||
"filename": "rank0.engine",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/rank0.engine"
|
||||
},
|
||||
{
|
||||
"filename": "tokenizer.model",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/tokenizer.model"
|
||||
},
|
||||
{
|
||||
"filename": "special_tokens_map.json",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/special_tokens_map.json"
|
||||
},
|
||||
{
|
||||
"filename": "tokenizer.json",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/tokenizer.json"
|
||||
},
|
||||
{
|
||||
"filename": "tokenizer_config.json",
|
||||
"url": "https://delta.jan.ai/dist/models/<gpuarch>/<os>/LlamaCorn-1.1B-Chat-fp16/tokenizer_config.json"
|
||||
}
|
||||
],
|
||||
"id": "llamacorn-1.1b-chat-fp16",
|
||||
"object": "model",
|
||||
"name": "LlamaCorn 1.1B Chat FP16",
|
||||
"version": "1.0",
|
||||
"description": "LlamaCorn is a refined version of TinyLlama-1.1B, optimized for conversational quality, running on consumer devices through TensorRT-LLM",
|
||||
"format": "TensorRT-LLM",
|
||||
"settings": {
|
||||
"ctx_len": 2048,
|
||||
"text_model": false
|
||||
},
|
||||
"parameters": {
|
||||
"max_tokens": 4096
|
||||
},
|
||||
"metadata": {
|
||||
"author": "LLama",
|
||||
"tags": ["TensorRT-LLM", "1B", "Finetuned"],
|
||||
"size": 2151000000
|
||||
},
|
||||
"engine": "nitro-tensorrt-llm"
|
||||
}
|
||||
]
|
||||
75
extensions/tensorrt-llm-extension/package.json
Normal file
75
extensions/tensorrt-llm-extension/package.json
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"name": "@janhq/tensorrt-llm-extension",
|
||||
"version": "0.0.2",
|
||||
"description": "Enables accelerated inference leveraging Nvidia's TensorRT-LLM for optimal GPU hardware optimizations. Compatible with models in TensorRT-LLM format. Requires Nvidia GPU driver and CUDA Toolkit installation.",
|
||||
"main": "dist/index.js",
|
||||
"node": "dist/node/index.cjs.js",
|
||||
"author": "Jan <service@jan.ai>",
|
||||
"license": "AGPL-3.0",
|
||||
"config": {
|
||||
"host": "127.0.0.1",
|
||||
"port": "3928"
|
||||
},
|
||||
"compatibility": {
|
||||
"platform": [
|
||||
"win32",
|
||||
"linux"
|
||||
],
|
||||
"app": [
|
||||
"0.1.0"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
|
||||
"build:publish:win32": "rimraf *.tgz --glob && npm run build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||
"build:publish:linux": "rimraf *.tgz --glob && npm run build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||
"build:publish:darwin": "rimraf *.tgz --glob && npm run build && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../pre-install",
|
||||
"build:publish": "run-script-os"
|
||||
},
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./main": "./dist/node/index.cjs.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@rollup/plugin-replace": "^5.0.5",
|
||||
"@types/node": "^20.11.4",
|
||||
"@types/os-utils": "^0.0.4",
|
||||
"@types/tcp-port-used": "^1.0.4",
|
||||
"@types/decompress": "4.2.7",
|
||||
"cpx": "^1.5.0",
|
||||
"download-cli": "^1.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.38.5",
|
||||
"rollup-plugin-define": "^1.0.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"rollup-plugin-typescript2": "^0.36.0",
|
||||
"run-script-os": "^1.1.6",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@janhq/core": "file:../../core",
|
||||
"decompress": "^4.2.1",
|
||||
"fetch-retry": "^5.0.6",
|
||||
"path-browserify": "^1.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tcp-port-used": "^1.0.2",
|
||||
"ulid": "^2.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"package.json",
|
||||
"README.md"
|
||||
],
|
||||
"bundleDependencies": [
|
||||
"tcp-port-used",
|
||||
"fetch-retry",
|
||||
"decompress",
|
||||
"@janhq/core"
|
||||
]
|
||||
}
|
||||
73
extensions/tensorrt-llm-extension/rollup.config.ts
Normal file
73
extensions/tensorrt-llm-extension/rollup.config.ts
Normal file
@ -0,0 +1,73 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import sourceMaps from 'rollup-plugin-sourcemaps'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
import json from '@rollup/plugin-json'
|
||||
import replace from '@rollup/plugin-replace'
|
||||
const packageJson = require('./package.json')
|
||||
|
||||
export default [
|
||||
{
|
||||
input: `src/index.ts`,
|
||||
output: [{ file: packageJson.main, format: 'es', sourcemap: true }],
|
||||
watch: {
|
||||
include: 'src/**',
|
||||
},
|
||||
plugins: [
|
||||
replace({
|
||||
EXTENSION_NAME: JSON.stringify(packageJson.name),
|
||||
TENSORRT_VERSION: JSON.stringify('0.1.5'),
|
||||
DOWNLOAD_RUNNER_URL:
|
||||
process.platform === 'darwin' || process.platform === 'win32'
|
||||
? JSON.stringify(
|
||||
'https://github.com/janhq/nitro-tensorrt-llm/releases/download/windows-v<version>/nitro-windows-v<version>-amd64-tensorrt-llm-<gpuarch>.tar.gz'
|
||||
)
|
||||
: JSON.stringify(
|
||||
'https://github.com/janhq/nitro-tensorrt-llm/releases/download/linux-v<version>/nitro-linux-v<version>-amd64-tensorrt-llm-<gpuarch>.tar.gz'
|
||||
),
|
||||
NODE: JSON.stringify(`${packageJson.name}/${packageJson.node}`),
|
||||
INFERENCE_URL: JSON.stringify(
|
||||
process.env.INFERENCE_URL ||
|
||||
`${packageJson.config?.protocol ?? 'http'}://${packageJson.config?.host}:${packageJson.config?.port}/v1/chat/completions`
|
||||
),
|
||||
COMPATIBILITY: JSON.stringify(packageJson.compatibility),
|
||||
}),
|
||||
json(),
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
commonjs(),
|
||||
resolve({
|
||||
extensions: ['.js', '.ts', '.svelte'],
|
||||
}),
|
||||
sourceMaps(),
|
||||
],
|
||||
},
|
||||
{
|
||||
input: `src/node/index.ts`,
|
||||
output: [
|
||||
{ file: 'dist/node/index.cjs.js', format: 'cjs', sourcemap: true },
|
||||
],
|
||||
external: ['@janhq/core/node'],
|
||||
watch: {
|
||||
include: 'src/node/**',
|
||||
},
|
||||
plugins: [
|
||||
replace({
|
||||
LOAD_MODEL_URL: JSON.stringify(
|
||||
`${packageJson.config?.protocol ?? 'http'}://${packageJson.config?.host}:${packageJson.config?.port}/inferences/tensorrtllm/loadmodel`
|
||||
),
|
||||
TERMINATE_ENGINE_URL: JSON.stringify(
|
||||
`${packageJson.config?.protocol ?? 'http'}://${packageJson.config?.host}:${packageJson.config?.port}/inferences/processmanager/destroy`
|
||||
),
|
||||
ENGINE_HOST: JSON.stringify(packageJson.config?.host ?? '127.0.0.1'),
|
||||
ENGINE_PORT: JSON.stringify(packageJson.config?.port ?? '3928'),
|
||||
}),
|
||||
json(),
|
||||
typescript({ useTsconfigDeclarationDir: true }),
|
||||
commonjs(),
|
||||
resolve({
|
||||
extensions: ['.ts', '.js', '.json'],
|
||||
}),
|
||||
sourceMaps(),
|
||||
],
|
||||
},
|
||||
]
|
||||
10
extensions/tensorrt-llm-extension/src/@types/global.d.ts
vendored
Normal file
10
extensions/tensorrt-llm-extension/src/@types/global.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
declare const NODE: string
|
||||
declare const INFERENCE_URL: string
|
||||
declare const LOAD_MODEL_URL: string
|
||||
declare const TERMINATE_ENGINE_URL: string
|
||||
declare const ENGINE_HOST: string
|
||||
declare const ENGINE_PORT: string
|
||||
declare const DOWNLOAD_RUNNER_URL: string
|
||||
declare const TENSORRT_VERSION: string
|
||||
declare const COMPATIBILITY: object
|
||||
declare const EXTENSION_NAME: string
|
||||
154
extensions/tensorrt-llm-extension/src/index.ts
Normal file
154
extensions/tensorrt-llm-extension/src/index.ts
Normal file
@ -0,0 +1,154 @@
|
||||
/**
|
||||
* @module tensorrt-llm-extension/src/index
|
||||
*/
|
||||
|
||||
import {
|
||||
Compatibility,
|
||||
DownloadEvent,
|
||||
DownloadRequest,
|
||||
DownloadState,
|
||||
GpuSetting,
|
||||
InstallationState,
|
||||
Model,
|
||||
baseName,
|
||||
downloadFile,
|
||||
events,
|
||||
executeOnMain,
|
||||
joinPath,
|
||||
showToast,
|
||||
systemInformations,
|
||||
LocalOAIEngine,
|
||||
fs,
|
||||
MessageRequest,
|
||||
} from '@janhq/core'
|
||||
import models from '../models.json'
|
||||
|
||||
/**
|
||||
* TensorRTLLMExtension - Implementation of LocalOAIEngine
|
||||
* @extends BaseOAILocalInferenceProvider
|
||||
* Provide pre-populated models for TensorRTLLM
|
||||
*/
|
||||
export default class TensorRTLLMExtension extends LocalOAIEngine {
|
||||
/**
|
||||
* Override custom function name for loading and unloading model
|
||||
* Which are implemented from node module
|
||||
*/
|
||||
override provider = 'nitro-tensorrt-llm'
|
||||
override inferenceUrl = INFERENCE_URL
|
||||
override nodeModule = NODE
|
||||
|
||||
private supportedGpuArch = ['turing', 'ampere', 'ada']
|
||||
|
||||
compatibility() {
|
||||
return COMPATIBILITY as unknown as Compatibility
|
||||
}
|
||||
/**
|
||||
* models implemented by the extension
|
||||
* define pre-populated models
|
||||
*/
|
||||
async models(): Promise<Model[]> {
|
||||
if ((await this.installationState()) === 'Installed')
|
||||
return models as unknown as Model[]
|
||||
return []
|
||||
}
|
||||
|
||||
override async install(): Promise<void> {
|
||||
const info = await systemInformations()
|
||||
console.debug(
|
||||
`TensorRTLLMExtension installing pre-requisites... ${JSON.stringify(info)}`
|
||||
)
|
||||
const gpuSetting: GpuSetting | undefined = info.gpuSetting
|
||||
if (gpuSetting === undefined || gpuSetting.gpus.length === 0) {
|
||||
console.error('No GPU setting found. Please check your GPU setting.')
|
||||
return
|
||||
}
|
||||
|
||||
// TODO: we only check for the first graphics card. Need to refactor this later.
|
||||
const firstGpu = gpuSetting.gpus[0]
|
||||
if (!firstGpu.name.toLowerCase().includes('nvidia')) {
|
||||
console.error('No Nvidia GPU found. Please check your GPU setting.')
|
||||
return
|
||||
}
|
||||
|
||||
if (firstGpu.arch === undefined) {
|
||||
console.error('No GPU architecture found. Please check your GPU setting.')
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.supportedGpuArch.includes(firstGpu.arch)) {
|
||||
console.error(
|
||||
`Your GPU: ${firstGpu} is not supported. Only 20xx, 30xx, 40xx series are supported.`
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
const binaryFolderPath = await executeOnMain(
|
||||
this.nodeModule,
|
||||
'binaryFolder'
|
||||
)
|
||||
if (!(await fs.existsSync(binaryFolderPath))) {
|
||||
await fs.mkdirSync(binaryFolderPath)
|
||||
}
|
||||
|
||||
const placeholderUrl = DOWNLOAD_RUNNER_URL
|
||||
const tensorrtVersion = TENSORRT_VERSION
|
||||
|
||||
const url = placeholderUrl
|
||||
.replace(/<version>/g, tensorrtVersion)
|
||||
.replace(/<gpuarch>/g, firstGpu.arch)
|
||||
|
||||
const tarball = await baseName(url)
|
||||
|
||||
const tarballFullPath = await joinPath([binaryFolderPath, tarball])
|
||||
const downloadRequest: DownloadRequest = {
|
||||
url,
|
||||
localPath: tarballFullPath,
|
||||
extensionId: EXTENSION_NAME,
|
||||
downloadType: 'extension',
|
||||
}
|
||||
downloadFile(downloadRequest)
|
||||
|
||||
// TODO: wrap this into a Promise
|
||||
const onFileDownloadSuccess = async (state: DownloadState) => {
|
||||
// if other download, ignore
|
||||
if (state.fileName !== tarball) return
|
||||
events.off(DownloadEvent.onFileDownloadSuccess, onFileDownloadSuccess)
|
||||
await executeOnMain(this.nodeModule, 'decompressRunner', tarballFullPath)
|
||||
events.emit(DownloadEvent.onFileUnzipSuccess, state)
|
||||
|
||||
// Prepopulate models as soon as it's ready
|
||||
this.prePopulateModels().then(() => {
|
||||
showToast(
|
||||
'Extension installed successfully.',
|
||||
'New models are added to Model Hub.'
|
||||
)
|
||||
})
|
||||
}
|
||||
events.on(DownloadEvent.onFileDownloadSuccess, onFileDownloadSuccess)
|
||||
}
|
||||
|
||||
override async installationState(): Promise<InstallationState> {
|
||||
// For now, we just check the executable of nitro x tensor rt
|
||||
const isNitroExecutableAvailable = await executeOnMain(
|
||||
this.nodeModule,
|
||||
'isNitroExecutableAvailable'
|
||||
)
|
||||
|
||||
return isNitroExecutableAvailable ? 'Installed' : 'NotInstalled'
|
||||
}
|
||||
|
||||
override onInferenceStopped() {
|
||||
if (!this.isRunning) return
|
||||
showToast(
|
||||
'Unable to Stop Inference',
|
||||
'The model does not support stopping inference.'
|
||||
)
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
inference(data: MessageRequest): void {
|
||||
// TensorRT LLM Extension supports streaming only
|
||||
if (data.model) data.model.parameters.stream = true
|
||||
super.inference(data)
|
||||
}
|
||||
}
|
||||
191
extensions/tensorrt-llm-extension/src/node/index.ts
Normal file
191
extensions/tensorrt-llm-extension/src/node/index.ts
Normal file
@ -0,0 +1,191 @@
|
||||
import path from 'path'
|
||||
import { ChildProcessWithoutNullStreams, spawn } from 'child_process'
|
||||
import tcpPortUsed from 'tcp-port-used'
|
||||
import fetchRT from 'fetch-retry'
|
||||
import { log } from '@janhq/core/node'
|
||||
import { existsSync } from 'fs'
|
||||
import decompress from 'decompress'
|
||||
|
||||
// Polyfill fetch with retry
|
||||
const fetchRetry = fetchRT(fetch)
|
||||
|
||||
/**
|
||||
* The response object for model init operation.
|
||||
*/
|
||||
interface ModelLoadParams {
|
||||
engine_path: string
|
||||
ctx_len: number
|
||||
}
|
||||
|
||||
// The subprocess instance for Engine
|
||||
let subprocess: ChildProcessWithoutNullStreams | undefined = undefined
|
||||
|
||||
/**
|
||||
* Initializes a engine subprocess to load a machine learning model.
|
||||
* @param params - The model load settings.
|
||||
*/
|
||||
async function loadModel(params: any): Promise<{ error: Error | undefined }> {
|
||||
// modelFolder is the absolute path to the running model folder
|
||||
// e.g. ~/jan/models/llama-2
|
||||
let modelFolder = params.modelFolder
|
||||
|
||||
const settings: ModelLoadParams = {
|
||||
engine_path: modelFolder,
|
||||
ctx_len: params.model.settings.ctx_len ?? 2048,
|
||||
}
|
||||
return runEngineAndLoadModel(settings)
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops a Engine subprocess.
|
||||
*/
|
||||
function unloadModel(): Promise<any> {
|
||||
const controller = new AbortController()
|
||||
setTimeout(() => controller.abort(), 5000)
|
||||
debugLog(`Request to kill engine`)
|
||||
|
||||
subprocess?.kill()
|
||||
return fetch(TERMINATE_ENGINE_URL, {
|
||||
method: 'DELETE',
|
||||
signal: controller.signal,
|
||||
})
|
||||
.then(() => {
|
||||
subprocess = undefined
|
||||
})
|
||||
.catch(() => {}) // Do nothing with this attempt
|
||||
.then(() => tcpPortUsed.waitUntilFree(parseInt(ENGINE_PORT), 300, 5000)) // Wait for port available
|
||||
.then(() => debugLog(`Engine process is terminated`))
|
||||
.catch((err) => {
|
||||
debugLog(
|
||||
`Could not kill running process on port ${ENGINE_PORT}. Might be another process running on the same port? ${err}`
|
||||
)
|
||||
throw 'PORT_NOT_AVAILABLE'
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 1. Spawn engine process
|
||||
* 2. Load model into engine subprocess
|
||||
* @returns
|
||||
*/
|
||||
async function runEngineAndLoadModel(settings: ModelLoadParams) {
|
||||
return unloadModel()
|
||||
.then(runEngine)
|
||||
.then(() => loadModelRequest(settings))
|
||||
.catch((err) => {
|
||||
// TODO: Broadcast error so app could display proper error message
|
||||
debugLog(`${err}`, 'Error')
|
||||
return { error: err }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a LLM model into the Engine subprocess by sending a HTTP POST request.
|
||||
*/
|
||||
function loadModelRequest(
|
||||
settings: ModelLoadParams
|
||||
): Promise<{ error: Error | undefined }> {
|
||||
debugLog(`Loading model with params ${JSON.stringify(settings)}`)
|
||||
return fetchRetry(LOAD_MODEL_URL, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(settings),
|
||||
retries: 3,
|
||||
retryDelay: 500,
|
||||
})
|
||||
.then((res) => {
|
||||
debugLog(`Load model success with response ${JSON.stringify(res)}`)
|
||||
return Promise.resolve({ error: undefined })
|
||||
})
|
||||
.catch((err) => {
|
||||
debugLog(`Load model failed with error ${err}`, 'Error')
|
||||
return Promise.resolve({ error: err })
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawns engine subprocess.
|
||||
*/
|
||||
function runEngine(): Promise<any> {
|
||||
debugLog(`Spawning engine subprocess...`)
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
// Current directory by default
|
||||
let binaryFolder = path.join(__dirname, '..', 'bin')
|
||||
// Binary path
|
||||
const binary = path.join(
|
||||
binaryFolder,
|
||||
process.platform === 'win32' ? 'nitro.exe' : 'nitro'
|
||||
)
|
||||
|
||||
const args: string[] = ['1', ENGINE_HOST, ENGINE_PORT]
|
||||
// Execute the binary
|
||||
debugLog(`Spawn nitro at path: ${binary}, and args: ${args}`)
|
||||
subprocess = spawn(binary, args, {
|
||||
cwd: binaryFolder,
|
||||
env: {
|
||||
...process.env,
|
||||
},
|
||||
})
|
||||
|
||||
// Handle subprocess output
|
||||
subprocess.stdout.on('data', (data: any) => {
|
||||
debugLog(`${data}`)
|
||||
})
|
||||
|
||||
subprocess.stderr.on('data', (data: any) => {
|
||||
debugLog(`${data}`)
|
||||
})
|
||||
|
||||
subprocess.on('close', (code: any) => {
|
||||
debugLog(`Engine exited with code: ${code}`)
|
||||
subprocess = undefined
|
||||
reject(`child process exited with code ${code}`)
|
||||
})
|
||||
|
||||
tcpPortUsed.waitUntilUsed(parseInt(ENGINE_PORT), 300, 30000).then(() => {
|
||||
debugLog(`Engine is ready`)
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function debugLog(message: string, level: string = 'Debug') {
|
||||
log(`[TENSORRT_LLM_NITRO]::${level}:${message}`)
|
||||
}
|
||||
|
||||
const binaryFolder = async (): Promise<string> => {
|
||||
return path.join(__dirname, '..', 'bin')
|
||||
}
|
||||
|
||||
const decompressRunner = async (zipPath: string) => {
|
||||
const output = path.join(__dirname, '..', 'bin')
|
||||
console.debug(`Decompressing ${zipPath} to ${output}...`)
|
||||
try {
|
||||
const files = await decompress(zipPath, output)
|
||||
console.debug('Decompress finished!', files)
|
||||
} catch (err) {
|
||||
console.error(`Decompress ${zipPath} failed: ${err}`)
|
||||
}
|
||||
}
|
||||
|
||||
const isNitroExecutableAvailable = async (): Promise<boolean> => {
|
||||
const binary = path.join(
|
||||
__dirname,
|
||||
'..',
|
||||
'bin',
|
||||
process.platform === 'win32' ? 'nitro.exe' : 'nitro'
|
||||
)
|
||||
|
||||
return existsSync(binary)
|
||||
}
|
||||
|
||||
export default {
|
||||
binaryFolder,
|
||||
decompressRunner,
|
||||
loadModel,
|
||||
unloadModel,
|
||||
dispose: unloadModel,
|
||||
isNitroExecutableAvailable,
|
||||
}
|
||||
20
extensions/tensorrt-llm-extension/tsconfig.json
Normal file
20
extensions/tensorrt-llm-extension/tsconfig.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "es5",
|
||||
"module": "ES2020",
|
||||
"lib": ["es2015", "es2016", "es2017", "dom"],
|
||||
"strict": true,
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"declarationDir": "dist/types",
|
||||
"outDir": "dist",
|
||||
"importHelpers": true,
|
||||
"resolveJsonModule": true,
|
||||
"typeRoots": ["node_modules/@types"]
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
.badge {
|
||||
@apply focus:ring-ring border-border inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
|
||||
@apply focus:ring-ring border-border inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
|
||||
|
||||
&-primary {
|
||||
@apply border-transparent bg-blue-100 text-blue-600;
|
||||
|
||||
@ -29,15 +29,15 @@ const SelectedText = ({ onCleared }: { onCleared?: () => void }) => {
|
||||
return shouldShowSelectedText ? (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="relative rounded-lg border-[1px] border-[#0000000F] bg-[#0000000A] p-[10px]"
|
||||
className="relative rounded-lg border border-border bg-secondary p-[10px]"
|
||||
>
|
||||
<div
|
||||
className="absolute right-1 top-1 flex h-6 w-6 items-center justify-center rounded-full border-[1px] border-[#0000000F] bg-white drop-shadow"
|
||||
className="absolute right-2 top-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border border-border bg-white shadow dark:bg-black/80"
|
||||
onClick={onClearClicked}
|
||||
>
|
||||
<X size={16} />
|
||||
<X size={14} className="text-muted-foreground" />
|
||||
</div>
|
||||
<p className="font-semibold text-[#00000099]">{text}</p>
|
||||
<p className="pr-8 font-medium text-muted-foreground">{text}</p>
|
||||
</div>
|
||||
) : (
|
||||
<div />
|
||||
|
||||
@ -56,7 +56,7 @@ const UserInput: React.FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-3 p-3">
|
||||
<div className="flex flex-col space-y-3 bg-white p-3 dark:bg-background">
|
||||
<form
|
||||
ref={formRef}
|
||||
className="flex h-full w-full items-center justify-center"
|
||||
@ -66,7 +66,7 @@ const UserInput: React.FC = () => {
|
||||
<LogoMark width={28} height={28} className="mx-auto" />
|
||||
<input
|
||||
ref={inputRef}
|
||||
className="flex-1 bg-transparent font-bold text-black focus:outline-none"
|
||||
className="flex-1 bg-transparent font-bold focus:outline-none"
|
||||
type="text"
|
||||
value={inputValue}
|
||||
onChange={handleChange}
|
||||
@ -77,7 +77,6 @@ const UserInput: React.FC = () => {
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<SelectedText onCleared={() => inputRef?.current?.focus()} />
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -4,7 +4,7 @@ import UserInput from './UserInput'
|
||||
|
||||
const Search: React.FC = () => {
|
||||
return (
|
||||
<div className="h-screen w-screen overflow-hidden bg-white">
|
||||
<div className="h-screen w-screen overflow-hidden bg-white dark:bg-background">
|
||||
<UserInput />
|
||||
</div>
|
||||
)
|
||||
|
||||
@ -73,8 +73,9 @@ const DropdownListSidebar = ({
|
||||
|
||||
const [copyId, setCopyId] = useState('')
|
||||
|
||||
// TODO: Update filter condition for the local model
|
||||
const localModel = downloadedModels.filter(
|
||||
(model) => model.engine === InferenceEngine.nitro
|
||||
(model) => model.engine !== InferenceEngine.openai
|
||||
)
|
||||
const remoteModel = downloadedModels.filter(
|
||||
(model) => model.engine === InferenceEngine.openai
|
||||
@ -293,7 +294,7 @@ const DropdownListSidebar = ({
|
||||
<span className="font-bold text-muted-foreground">
|
||||
{toGibibytes(x.metadata.size)}
|
||||
</span>
|
||||
{x.engine == InferenceEngine.nitro && (
|
||||
{x.metadata.size && (
|
||||
<ModelLabel size={x.metadata.size} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
import { useCallback, useEffect } from 'react'
|
||||
|
||||
import { abortDownload } from '@janhq/core'
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
ModalContent,
|
||||
ModalHeader,
|
||||
ModalTitle,
|
||||
Progress,
|
||||
} from '@janhq/uikit'
|
||||
import { atom, useAtom, useAtomValue } from 'jotai'
|
||||
|
||||
import {
|
||||
formatDownloadPercentage,
|
||||
formatExtensionsName,
|
||||
} from '@/utils/converter'
|
||||
|
||||
import {
|
||||
InstallingExtensionState,
|
||||
installingExtensionAtom,
|
||||
} from '@/helpers/atoms/Extension.atom'
|
||||
|
||||
export const showInstallingExtensionModalAtom = atom(false)
|
||||
|
||||
const InstallingExtensionModal: React.FC = () => {
|
||||
const [showInstallingExtensionModal, setShowInstallingExtensionModal] =
|
||||
useAtom(showInstallingExtensionModalAtom)
|
||||
const installingExtensions = useAtomValue(installingExtensionAtom)
|
||||
|
||||
useEffect(() => {
|
||||
if (installingExtensions.length === 0) {
|
||||
setShowInstallingExtensionModal(false)
|
||||
}
|
||||
}, [installingExtensions, setShowInstallingExtensionModal])
|
||||
|
||||
const onAbortInstallingExtensionClick = useCallback(
|
||||
(item: InstallingExtensionState) => {
|
||||
if (item.localPath) {
|
||||
abortDownload(item.localPath)
|
||||
}
|
||||
},
|
||||
[]
|
||||
)
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open={showInstallingExtensionModal}
|
||||
onOpenChange={() => setShowInstallingExtensionModal(false)}
|
||||
>
|
||||
<ModalContent>
|
||||
<ModalHeader>
|
||||
<ModalTitle>Installing Extension</ModalTitle>
|
||||
</ModalHeader>
|
||||
{Object.values(installingExtensions).map((item) => (
|
||||
<div className="pt-2" key={item.extensionId}>
|
||||
<Progress
|
||||
className="mb-2 h-2"
|
||||
value={
|
||||
formatDownloadPercentage(item.percentage, {
|
||||
hidePercentage: true,
|
||||
}) as number
|
||||
}
|
||||
/>
|
||||
<div className="flex items-center justify-between gap-x-2">
|
||||
<div className="flex gap-x-2">
|
||||
<p className="line-clamp-1">
|
||||
{formatExtensionsName(item.extensionId)}
|
||||
</p>
|
||||
<span>{formatDownloadPercentage(item.percentage)}</span>
|
||||
</div>
|
||||
<Button
|
||||
themes="outline"
|
||||
size="sm"
|
||||
onClick={() => onAbortInstallingExtensionClick(item)}
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
|
||||
export default InstallingExtensionModal
|
||||
@ -0,0 +1,52 @@
|
||||
import { Fragment, useCallback } from 'react'
|
||||
|
||||
import { Progress } from '@janhq/uikit'
|
||||
import { useAtomValue, useSetAtom } from 'jotai'
|
||||
|
||||
import { showInstallingExtensionModalAtom } from './InstallingExtensionModal'
|
||||
|
||||
import { installingExtensionAtom } from '@/helpers/atoms/Extension.atom'
|
||||
|
||||
const InstallingExtension: React.FC = () => {
|
||||
const installingExtensions = useAtomValue(installingExtensionAtom)
|
||||
const setShowInstallingExtensionModal = useSetAtom(
|
||||
showInstallingExtensionModalAtom
|
||||
)
|
||||
const shouldShowInstalling = installingExtensions.length > 0
|
||||
|
||||
let totalPercentage = 0
|
||||
let totalExtensions = 0
|
||||
for (const installation of installingExtensions) {
|
||||
totalPercentage += installation.percentage
|
||||
totalExtensions++
|
||||
}
|
||||
const progress = (totalPercentage / totalExtensions) * 100
|
||||
|
||||
const onClick = useCallback(() => {
|
||||
setShowInstallingExtensionModal(true)
|
||||
}, [setShowInstallingExtensionModal])
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
{shouldShowInstalling ? (
|
||||
<div
|
||||
className="flex cursor-pointer flex-row items-center space-x-2"
|
||||
onClick={onClick}
|
||||
>
|
||||
<p className="text-xs font-semibold text-muted-foreground">
|
||||
Installing Extension
|
||||
</p>
|
||||
|
||||
<div className="flex flex-row items-center justify-center space-x-2 rounded-md bg-secondary px-2 py-[2px]">
|
||||
<Progress className="h-2 w-24" value={progress} />
|
||||
<span className="text-xs font-bold text-muted-foreground">
|
||||
{progress.toFixed(2)}%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
||||
export default InstallingExtension
|
||||
@ -16,6 +16,7 @@ import ProgressBar from '@/containers/ProgressBar'
|
||||
import { appDownloadProgress } from '@/containers/Providers/Jotai'
|
||||
|
||||
import ImportingModelState from './ImportingModelState'
|
||||
import InstallingExtension from './InstallingExtension'
|
||||
import SystemMonitor from './SystemMonitor'
|
||||
import UpdatedFailedModal from './UpdateFailedModal'
|
||||
|
||||
@ -46,6 +47,7 @@ const BottomBar = () => {
|
||||
<ImportingModelState />
|
||||
<DownloadingState />
|
||||
<UpdatedFailedModal />
|
||||
<InstallingExtension />
|
||||
</div>
|
||||
<div className="flex items-center gap-x-3">
|
||||
<SystemMonitor />
|
||||
|
||||
@ -22,6 +22,8 @@ import ImportModelOptionModal from '@/screens/Settings/ImportModelOptionModal'
|
||||
import ImportingModelModal from '@/screens/Settings/ImportingModelModal'
|
||||
import SelectingModelModal from '@/screens/Settings/SelectingModelModal'
|
||||
|
||||
import InstallingExtensionModal from './BottomBar/InstallingExtension/InstallingExtensionModal'
|
||||
|
||||
import { mainViewStateAtom } from '@/helpers/atoms/App.atom'
|
||||
|
||||
const BaseLayout = (props: PropsWithChildren) => {
|
||||
@ -68,6 +70,7 @@ const BaseLayout = (props: PropsWithChildren) => {
|
||||
{importModelStage === 'IMPORTING_MODEL' && <ImportingModelModal />}
|
||||
{importModelStage === 'EDIT_MODEL_INFO' && <EditModelInfoModal />}
|
||||
{importModelStage === 'CONFIRM_CANCEL' && <CancelModelImportModal />}
|
||||
<InstallingExtensionModal />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -10,7 +10,10 @@ import useGetSystemResources from '@/hooks/useGetSystemResources'
|
||||
import useModels from '@/hooks/useModels'
|
||||
import useThreads from '@/hooks/useThreads'
|
||||
|
||||
import { janDataFolderPathAtom } from '@/helpers/atoms/AppConfig.atom'
|
||||
import {
|
||||
janDataFolderPathAtom,
|
||||
quickAskEnabledAtom,
|
||||
} from '@/helpers/atoms/AppConfig.atom'
|
||||
|
||||
type Props = {
|
||||
children: ReactNode
|
||||
@ -18,6 +21,7 @@ type Props = {
|
||||
|
||||
const DataLoader: React.FC<Props> = ({ children }) => {
|
||||
const setJanDataFolderPath = useSetAtom(janDataFolderPathAtom)
|
||||
const setQuickAskEnabled = useSetAtom(quickAskEnabledAtom)
|
||||
|
||||
useModels()
|
||||
useThreads()
|
||||
@ -29,8 +33,9 @@ const DataLoader: React.FC<Props> = ({ children }) => {
|
||||
?.getAppConfigurations()
|
||||
?.then((appConfig: AppConfiguration) => {
|
||||
setJanDataFolderPath(appConfig.data_folder)
|
||||
setQuickAskEnabled(appConfig.quick_ask)
|
||||
})
|
||||
}, [setJanDataFolderPath])
|
||||
}, [setJanDataFolderPath, setQuickAskEnabled])
|
||||
|
||||
console.debug('Load Data...')
|
||||
|
||||
|
||||
@ -7,6 +7,10 @@ import { useSetAtom } from 'jotai'
|
||||
|
||||
import { setDownloadStateAtom } from '@/hooks/useDownloadState'
|
||||
|
||||
import { formatExtensionsName } from '@/utils/converter'
|
||||
|
||||
import { toaster } from '../Toast'
|
||||
|
||||
import AppUpdateListener from './AppUpdateListener'
|
||||
import ClipboardListener from './ClipboardListener'
|
||||
import EventHandler from './EventHandler'
|
||||
@ -14,46 +18,89 @@ import EventHandler from './EventHandler'
|
||||
import ModelImportListener from './ModelImportListener'
|
||||
import QuickAskListener from './QuickAskListener'
|
||||
|
||||
import {
|
||||
InstallingExtensionState,
|
||||
removeInstallingExtensionAtom,
|
||||
setInstallingExtensionAtom,
|
||||
} from '@/helpers/atoms/Extension.atom'
|
||||
|
||||
const EventListenerWrapper = ({ children }: PropsWithChildren) => {
|
||||
const setDownloadState = useSetAtom(setDownloadStateAtom)
|
||||
const setInstallingExtension = useSetAtom(setInstallingExtensionAtom)
|
||||
const removeInstallingExtension = useSetAtom(removeInstallingExtensionAtom)
|
||||
|
||||
const onFileDownloadUpdate = useCallback(
|
||||
async (state: DownloadState) => {
|
||||
console.debug('onFileDownloadUpdate', state)
|
||||
setDownloadState(state)
|
||||
if (state.downloadType === 'extension') {
|
||||
const installingExtensionState: InstallingExtensionState = {
|
||||
extensionId: state.extensionId!,
|
||||
percentage: state.percent,
|
||||
localPath: state.localPath,
|
||||
}
|
||||
setInstallingExtension(state.extensionId!, installingExtensionState)
|
||||
} else {
|
||||
setDownloadState(state)
|
||||
}
|
||||
},
|
||||
[setDownloadState]
|
||||
[setDownloadState, setInstallingExtension]
|
||||
)
|
||||
|
||||
const onFileDownloadError = useCallback(
|
||||
(state: DownloadState) => {
|
||||
console.debug('onFileDownloadError', state)
|
||||
setDownloadState(state)
|
||||
if (state.downloadType === 'extension') {
|
||||
removeInstallingExtension(state.extensionId!)
|
||||
} else {
|
||||
setDownloadState(state)
|
||||
}
|
||||
},
|
||||
[setDownloadState]
|
||||
[setDownloadState, removeInstallingExtension]
|
||||
)
|
||||
|
||||
const onFileDownloadSuccess = useCallback(
|
||||
(state: DownloadState) => {
|
||||
console.debug('onFileDownloadSuccess', state)
|
||||
setDownloadState(state)
|
||||
if (state.downloadType !== 'extension') {
|
||||
setDownloadState(state)
|
||||
}
|
||||
},
|
||||
[setDownloadState]
|
||||
)
|
||||
|
||||
const onFileUnzipSuccess = useCallback(
|
||||
(state: DownloadState) => {
|
||||
console.debug('onFileUnzipSuccess', state)
|
||||
toaster({
|
||||
title: 'Success',
|
||||
description: `Install ${formatExtensionsName(state.extensionId!)} successfully.`,
|
||||
type: 'success',
|
||||
})
|
||||
removeInstallingExtension(state.extensionId!)
|
||||
},
|
||||
[removeInstallingExtension]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
console.debug('EventListenerWrapper: registering event listeners...')
|
||||
events.on(DownloadEvent.onFileDownloadUpdate, onFileDownloadUpdate)
|
||||
events.on(DownloadEvent.onFileDownloadError, onFileDownloadError)
|
||||
events.on(DownloadEvent.onFileDownloadSuccess, onFileDownloadSuccess)
|
||||
events.on(DownloadEvent.onFileUnzipSuccess, onFileUnzipSuccess)
|
||||
|
||||
return () => {
|
||||
console.debug('EventListenerWrapper: unregistering event listeners...')
|
||||
events.off(DownloadEvent.onFileDownloadUpdate, onFileDownloadUpdate)
|
||||
events.off(DownloadEvent.onFileDownloadError, onFileDownloadError)
|
||||
events.off(DownloadEvent.onFileDownloadSuccess, onFileDownloadSuccess)
|
||||
events.off(DownloadEvent.onFileUnzipSuccess, onFileUnzipSuccess)
|
||||
}
|
||||
}, [onFileDownloadUpdate, onFileDownloadError, onFileDownloadSuccess])
|
||||
}, [
|
||||
onFileDownloadUpdate,
|
||||
onFileDownloadError,
|
||||
onFileDownloadSuccess,
|
||||
onFileUnzipSuccess,
|
||||
])
|
||||
|
||||
return (
|
||||
<AppUpdateListener>
|
||||
|
||||
@ -24,10 +24,6 @@ export default function KeyListener({ children }: Props) {
|
||||
|
||||
useEffect(() => {
|
||||
const onKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') {
|
||||
window.core?.api?.hideMainWindow()
|
||||
}
|
||||
|
||||
const prefixKey = isMac ? e.metaKey : e.ctrlKey
|
||||
|
||||
if (e.key === 'b' && prefixKey) {
|
||||
|
||||
@ -4,6 +4,8 @@ import { PropsWithChildren, useEffect, useState } from 'react'
|
||||
|
||||
import { Toaster } from 'react-hot-toast'
|
||||
|
||||
import { usePathname } from 'next/navigation'
|
||||
|
||||
import { TooltipProvider } from '@janhq/uikit'
|
||||
|
||||
import GPUDriverPrompt from '@/containers/GPUDriverPromptModal'
|
||||
@ -29,6 +31,7 @@ import { extensionManager } from '@/extension'
|
||||
|
||||
const Providers = (props: PropsWithChildren) => {
|
||||
const { children } = props
|
||||
const pathname = usePathname()
|
||||
|
||||
const [setupCore, setSetupCore] = useState(false)
|
||||
const [activated, setActivated] = useState(false)
|
||||
@ -40,6 +43,11 @@ const Providers = (props: PropsWithChildren) => {
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!isCoreExtensionInstalled()) {
|
||||
// TODO: Proper window handle
|
||||
// Do not migrate extension from quick ask window
|
||||
if (pathname === '/search') {
|
||||
return
|
||||
}
|
||||
setSettingUp(true)
|
||||
await setupBaseExtensions()
|
||||
return
|
||||
|
||||
@ -23,7 +23,9 @@ export class ExtensionManager {
|
||||
* @param type - The type of the extension to retrieve.
|
||||
* @returns The extension, if found.
|
||||
*/
|
||||
get<T extends BaseExtension>(type: ExtensionTypeEnum): T | undefined {
|
||||
get<T extends BaseExtension>(
|
||||
type: ExtensionTypeEnum | string
|
||||
): T | undefined {
|
||||
return this.extensions.get(type) as T | undefined
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user