Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: revamp new homepage #2423

Merged
merged 75 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
ba02b58
docs: Update developer build engine content
aindrajaya Mar 12, 2024
120fe21
docs: update manual import content
aindrajaya Mar 12, 2024
cac079b
docs: update http proxy content
aindrajaya Mar 12, 2024
f2008ba
docs: Update the sidebars.js to input advanced settings menu
aindrajaya Mar 12, 2024
8dd925f
Merge branch 'docs-pena-team' of github.com:janhq/jan into docs-pena-…
aindrajaya Mar 12, 2024
6017ab1
docs: Update API reference documentation to incorporate scalar implem…
aindrajaya Mar 13, 2024
5663d31
docs: Update the engine anatomy to under development
aindrajaya Mar 13, 2024
29587ab
docs: Update the installation section, particularly the macOS install…
aindrajaya Mar 13, 2024
463a8c7
Merge branch 'dev' into docs-pena-team
aindrajaya Mar 13, 2024
98d7022
Merge branch 'dev' into docs-pena-team
0xHieu01 Mar 13, 2024
2498d0d
Merge branch 'dev' into docs-pena-team
0xHieu01 Mar 14, 2024
2c98ae9
Revert "docs: Update API reference documentation to incorporate scala…
aindrajaya Mar 14, 2024
c397f64
Merge branch 'dev' into docs-pena-team
aindrajaya Mar 15, 2024
86f8004
docs: Update broken-build.mdx
freelerobot Mar 15, 2024
9229773
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 15, 2024
a6b483c
docs: Update broken-build.mdx (#2385)
0xHieu01 Mar 15, 2024
5f19983
fix: some regressions for tensorrt nightly build (#2380)
namchuai Mar 15, 2024
ed6bd14
chore: temporary remove linux from tensorrt support (#2386)
namchuai Mar 15, 2024
82a751b
fix: line height typography blog and docs (#2390)
urmauur Mar 16, 2024
cf69480
Merge branch 'dev' into docs-pena-team
0xHieu01 Mar 16, 2024
b0920e4
docs: revert original content
0xHieu01 Mar 16, 2024
2596001
docs: Update sidebar and content for http proxy and import model (#2328)
0xHieu01 Mar 16, 2024
e74345e
fix: clean working dir with long space support on Windows (#2399)
louis-menlo Mar 17, 2024
5633195
fix: fail-fast would block matrix jobs as soon as a job is failed (#2…
louis-menlo Mar 17, 2024
6dfa23c
fix: unable to start web with quick ask (#2402)
namchuai Mar 17, 2024
6c81d83
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 17, 2024
4470d3a
feat: revamp homepage
urmauur Mar 12, 2024
50983e1
prepare section new homepage
urmauur Mar 12, 2024
d60f318
update copies from feedback
urmauur Mar 13, 2024
b42d6c5
Added input for newsletter on footer and section CTA bottom
urmauur Mar 13, 2024
3df00ef
Added table responsive on philosophy section
urmauur Mar 13, 2024
083d10c
Added custome field env for client side, and auto click next for feat…
urmauur Mar 14, 2024
5e7a28c
fix resposnive feature section
urmauur Mar 14, 2024
c77d881
Added section wall of love or testimonial
urmauur Mar 14, 2024
f1c67b2
Add image feature
urmauur Mar 14, 2024
d67c829
fix bold tagline
urmauur Mar 14, 2024
7970c18
disabled temporay auto next item on feature section
urmauur Mar 14, 2024
f4e1958
add loading lazy for youtube thumbnail
urmauur Mar 14, 2024
ac10c1a
Update image preview feature thumbnail
urmauur Mar 14, 2024
cfde9f8
Hide extra button twitter embeded
urmauur Mar 14, 2024
199f1f4
Replace assests using webp intead of png
urmauur Mar 14, 2024
d7247b4
Temporary disable background sidebar has a submenu
urmauur Mar 14, 2024
9026f54
Improvement feedback
urmauur Mar 15, 2024
1db5cdd
update title and meta description
urmauur Mar 17, 2024
1b6568f
fix border not align on table element
urmauur Mar 17, 2024
7d3bf01
feat: standalone download page
urmauur Mar 17, 2024
b3e24d7
Update broken-build.mdx
freelerobot Mar 17, 2024
0348aa3
feat: Groq Inference Extension (#2263)
metaspartan Mar 17, 2024
7d3b2ab
docs: Update broken-build.mdx (#2406)
0xHieu01 Mar 18, 2024
a0c5c4b
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 18, 2024
bb4f597
Added link installation and changelog
urmauur Mar 18, 2024
bb6cd4e
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 18, 2024
d52feec
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 18, 2024
c27c146
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 18, 2024
93045b4
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 18, 2024
0ea94ec
docs: change download stat
0xHieu01 Mar 19, 2024
465e0e4
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 19, 2024
d1a17f0
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 19, 2024
4a267ff
feat: Add SEO header tag with OpenAI GPT-4
hiro-v Mar 18, 2024
f8d9704
chore: Update head metadata
hiro-v Mar 19, 2024
5edc6e4
fix: metadata end tag
hiro-v Mar 19, 2024
e61985c
feat: download page (#2409)
0xHieu01 Mar 19, 2024
642ee43
chore: Update misc
hiro-v Mar 19, 2024
dd11ba2
Update README.md with Stable Download URLs
jan-service-account Mar 19, 2024
6976e5a
Merge branch 'dev' into feat/doc_seo_meta
0xHieu01 Mar 19, 2024
912f602
Fix download page layout UI
urmauur Mar 19, 2024
cb5b170
update content and image using items start
urmauur Mar 19, 2024
489e8aa
Sync release 0.4.9 to dev (#2407)
louis-menlo Mar 19, 2024
1df2812
Merge branch 'dev' into feat/doc_seo_meta
0xHieu01 Mar 19, 2024
0b815b7
feat: Add SEO header tag with OpenAI GPT-4 (#2420)
0xHieu01 Mar 19, 2024
6857224
janhq/jan: Update README.md with nightly build artifact URL
jan-service-account Mar 19, 2024
4be979c
Merge branch 'dev' into feat/revamp-website
0xHieu01 Mar 19, 2024
4c6657d
feat: update og-image.svg
0xHieu01 Mar 19, 2024
a599ba3
feat: repoint img to og-image.svg
0xHieu01 Mar 19, 2024
a1c16fa
feat: revamp homepage (#2332)
0xHieu01 Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/jan-electron-linter-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
branches:
- main
- dev
- release/**
paths:
- "electron/**"
- .github/workflows/jan-electron-linter-and-test.yml
Expand Down Expand Up @@ -67,16 +68,17 @@ jobs:

test-on-windows:
strategy:
fail-fast: false
matrix:
antivirus-tools: ['mcafee', 'default-windows-security','bit-defender']
runs-on: windows-desktop-${{ matrix.antivirus-tools }}
steps:
- name: Clean workspace
run: |
Remove-Item -Path .\* -Force -Recurse
Remove-Item -Path "\\?\$(Get-Location)\*" -Force -Recurse
$path = "$Env:APPDATA\jan"
if (Test-Path $path) {
Remove-Item $path -Recurse -Force
Remove-Item "\\?\$path" -Recurse -Force
} else {
Write-Output "Folder does not exist."
}
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,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>Stable (Recommended)</b></td>
<td style="text-align:center">
<a href='https://github.com/janhq/jan/releases/download/v0.4.8/jan-win-x64-0.4.8.exe'>
<a href='https://github.com/janhq/jan/releases/download/v0.4.9/jan-win-x64-0.4.9.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://github.com/janhq/jan/releases/download/v0.4.8/jan-mac-x64-0.4.8.dmg'>
<a href='https://github.com/janhq/jan/releases/download/v0.4.9/jan-mac-x64-0.4.9.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://github.com/janhq/jan/releases/download/v0.4.8/jan-mac-arm64-0.4.8.dmg'>
<a href='https://github.com/janhq/jan/releases/download/v0.4.9/jan-mac-arm64-0.4.9.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://github.com/janhq/jan/releases/download/v0.4.8/jan-linux-amd64-0.4.8.deb'>
<a href='https://github.com/janhq/jan/releases/download/v0.4.9/jan-linux-amd64-0.4.9.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://github.com/janhq/jan/releases/download/v0.4.8/jan-linux-x86_64-0.4.8.AppImage'>
<a href='https://github.com/janhq/jan/releases/download/v0.4.9/jan-linux-x86_64-0.4.9.AppImage'>
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
<b>jan.AppImage</b>
</a>
Expand All @@ -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-323.exe'>
<a href='https://delta.jan.ai/latest/jan-win-x64-0.4.9-334.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-323.dmg'>
<a href='https://delta.jan.ai/latest/jan-mac-x64-0.4.9-334.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-323.dmg'>
<a href='https://delta.jan.ai/latest/jan-mac-arm64-0.4.9-334.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-323.deb'>
<a href='https://delta.jan.ai/latest/jan-linux-amd64-0.4.9-334.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-323.AppImage'>
<a href='https://delta.jan.ai/latest/jan-linux-x86_64-0.4.9-334.AppImage'>
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
<b>jan.AppImage</b>
</a>
Expand Down Expand Up @@ -327,6 +327,7 @@ Jan builds on top of other open-source projects:
- [llama.cpp](https://github.com/ggerganov/llama.cpp)
- [LangChain](https://github.com/langchain-ai)
- [TensorRT](https://github.com/NVIDIA/TensorRT)
- [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM)

## Contact

Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"devDependencies": {
"@types/jest": "^29.5.12",
"@types/node": "^12.0.2",
"@types/node": "^20.11.4",
"eslint": "8.57.0",
"eslint-plugin-jest": "^27.9.0",
"jest": "^29.7.0",
Expand Down
4 changes: 3 additions & 1 deletion core/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export enum AppRoute {
stopServer = 'stopServer',
log = 'log',
logServer = 'logServer',
systemInformations = 'systemInformations',
systemInformation = 'systemInformation',
showToast = 'showToast',
}

Expand Down Expand Up @@ -95,6 +95,8 @@ export enum FileManagerRoute {
getUserHomePath = 'getUserHomePath',
fileStat = 'fileStat',
writeBlob = 'writeBlob',
mkdir = 'mkdir',
rm = 'rm',
}

export type ApiFunction = (...args: any[]) => any
Expand Down
7 changes: 4 additions & 3 deletions core/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DownloadRequest, FileStat, NetworkConfig } from './types'
import { DownloadRequest, FileStat, NetworkConfig, SystemInformation } from './types'

/**
* Execute a extension module function in main process
Expand Down Expand Up @@ -110,7 +110,8 @@ const isSubdirectory: (from: string, to: string) => Promise<boolean> = (from: st
* Get system information
* @returns {Promise<any>} - A promise that resolves with the system information.
*/
const systemInformations: () => Promise<any> = () => global.core.api?.systemInformations()
const systemInformation: () => Promise<SystemInformation> = () =>
global.core.api?.systemInformation()

/**
* Show toast message from browser processes.
Expand Down Expand Up @@ -146,7 +147,7 @@ export {
log,
isSubdirectory,
getUserHomePath,
systemInformations,
systemInformation,
showToast,
FileStat,
}
8 changes: 8 additions & 0 deletions core/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface Compatibility {
const ALL_INSTALLATION_STATE = [
'NotRequired', // not required.
'Installed', // require and installed. Good to go.
'Updatable', // require and installed but need to be updated.
'NotInstalled', // require to be installed.
'Corrupted', // require but corrupted. Need to redownload.
] as const
Expand Down Expand Up @@ -59,6 +60,13 @@ export abstract class BaseExtension implements ExtensionType {
return undefined
}

/**
* Determine if the extension is updatable.
*/
updatable(): boolean {
return false
}

/**
* Determine if the prerequisites for the extension are installed.
*
Expand Down
6 changes: 3 additions & 3 deletions core/src/extensions/ai-engines/LocalOAIEngine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { executeOnMain, getJanDataFolderPath, joinPath } from '../../core'
import { executeOnMain, getJanDataFolderPath, joinPath, systemInformation } from '../../core'
import { events } from '../../events'
import { Model, ModelEvent } from '../../types'
import { OAIEngine } from './OAIEngine'
Expand Down Expand Up @@ -30,11 +30,11 @@ export abstract class LocalOAIEngine extends OAIEngine {
if (model.engine.toString() !== this.provider) return

const modelFolder = await joinPath([await getJanDataFolderPath(), this.modelFolder, model.id])

const systemInfo = await systemInformation()
const res = await executeOnMain(this.nodeModule, this.loadModelFunctionName, {
modelFolder,
model,
})
}, systemInfo)

if (res?.error) {
events.emit(ModelEvent.OnModelFail, {
Expand Down
3 changes: 2 additions & 1 deletion core/src/extensions/monitoring.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseExtension, ExtensionTypeEnum } from '../extension'
import { GpuSetting, MonitoringInterface } from '../index'
import { GpuSetting, MonitoringInterface, OperatingSystemInfo } from '../index'

/**
* Monitoring extension for system monitoring.
Expand All @@ -16,4 +16,5 @@ export abstract class MonitoringExtension extends BaseExtension implements Monit
abstract getGpuSetting(): Promise<GpuSetting>
abstract getResourcesInfo(): Promise<any>
abstract getCurrentLoad(): Promise<any>
abstract getOsInfo(): Promise<OperatingSystemInfo>
}
7 changes: 7 additions & 0 deletions core/src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ const readdirSync = (...args: any[]) => global.core.api?.readdirSync(...args)
*/
const mkdirSync = (...args: any[]) => global.core.api?.mkdirSync(...args)

const mkdir = (...args: any[]) => global.core.api?.mkdir(...args)

/**
* Removes a directory at the specified path.
* @returns {Promise<any>} A Promise that resolves when the directory is removed successfully.
*/
const rmdirSync = (...args: any[]) =>
global.core.api?.rmdirSync(...args, { recursive: true, force: true })

const rm = (path: string) => global.core.api?.rm(path)

/**
* Deletes a file from the local file system.
* @param {string} path - The path of the file to delete.
Expand Down Expand Up @@ -92,7 +97,9 @@ export const fs = {
existsSync,
readdirSync,
mkdirSync,
mkdir,
rmdirSync,
rm,
unlinkSync,
appendFileSync,
copyFileSync,
Expand Down
24 changes: 24 additions & 0 deletions core/src/node/api/processors/fsExt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,28 @@ export class FSExt implements Processor {
})
})
}

mkdir(path: string): Promise<void> {
return new Promise((resolve, reject) => {
fs.mkdir(path, { recursive: true }, (err) => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}

rmdir(path: string): Promise<void> {
return new Promise((resolve, reject) => {
fs.rm(path, { recursive: true }, (err) => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
}
19 changes: 10 additions & 9 deletions core/src/node/extension/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,24 +93,25 @@ export function persistExtensions() {
*/
export async function installExtensions(extensions: any) {
const installed: Extension[] = []
for (const ext of extensions) {
// Set install options and activation based on input type
const installations = extensions.map((ext: any): Promise<void> => {
const isObject = typeof ext === 'object'
const spec = isObject ? [ext.specifier, ext] : [ext]
const activate = isObject ? ext.activate !== false : true

// Install and possibly activate extension
const extension = new Extension(...spec)
if (!extension.origin) {
continue
return Promise.resolve()
}
await extension._install()
if (activate) extension.setActive(true)
return extension._install().then(() => {
if (activate) extension.setActive(true)
// Add extension to store if needed
addExtension(extension)
installed.push(extension)
})
})

// Add extension to store if needed
addExtension(extension)
installed.push(extension)
}
await Promise.all(installations)

// Return list of all installed extensions
return installed
Expand Down
50 changes: 29 additions & 21 deletions core/src/node/helper/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,26 +82,34 @@ export const getJanExtensionsPath = (): string => {
*/
export const physicalCpuCount = async (): Promise<number> => {
const platform = os.platform()
if (platform === 'linux') {
const output = await exec('lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l')
return parseInt(output.trim(), 10)
} else if (platform === 'darwin') {
const output = await exec('sysctl -n hw.physicalcpu_max')
return parseInt(output.trim(), 10)
} else if (platform === 'win32') {
const output = await exec('WMIC CPU Get NumberOfCores')
return output
.split(os.EOL)
.map((line: string) => parseInt(line))
.filter((value: number) => !isNaN(value))
.reduce((sum: number, number: number) => sum + number, 1)
} else {
const cores = os.cpus().filter((cpu: any, index: number) => {
const hasHyperthreading = cpu.model.includes('Intel')
const isOdd = index % 2 === 1
return !hasHyperthreading || isOdd
})
return cores.length
try {
if (platform === 'linux') {
const output = await exec('lscpu -p | egrep -v "^#" | sort -u -t, -k 2,4 | wc -l')
return parseInt(output.trim(), 10)
} else if (platform === 'darwin') {
const output = await exec('sysctl -n hw.physicalcpu_max')
return parseInt(output.trim(), 10)
} else if (platform === 'win32') {
const output = await exec('WMIC CPU Get NumberOfCores')
return output
.split(os.EOL)
.map((line: string) => parseInt(line))
.filter((value: number) => !isNaN(value))
.reduce((sum: number, number: number) => sum + number, 1)
} else {
const cores = os.cpus().filter((cpu: any, index: number) => {
const hasHyperthreading = cpu.model.includes('Intel')
const isOdd = index % 2 === 1
return !hasHyperthreading || isOdd
})
return cores.length
}
} catch (err) {
console.warn('Failed to get physical CPU count', err)
// Divide by 2 to get rid of hyper threading
const coreCount = Math.ceil(os.cpus().length / 2)
console.debug('Using node API to get physical CPU count:', coreCount)
return coreCount
}
}

Expand All @@ -118,7 +126,7 @@ const exec = async (command: string): Promise<string> => {
}

export const getEngineConfiguration = async (engineId: string) => {
if (engineId !== 'openai') {
if (engineId !== 'openai' && engineId !== 'groq') {
return undefined
}
const directoryPath = join(getJanDataFolderPath(), 'engines')
Expand Down
2 changes: 1 addition & 1 deletion core/src/node/helper/resource.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SystemResourceInfo } from '../../types'
import { physicalCpuCount } from './config'
import { log, logServer } from './log'
import { log } from './log'

export const getSystemResourceInfo = async (): Promise<SystemResourceInfo> => {
const cpu = await physicalCpuCount()
Expand Down
Loading
Loading