fix: merge conflict

This commit is contained in:
0xSage 2023-12-13 13:29:14 +08:00
commit 5dd5702a87
317 changed files with 6344 additions and 3533 deletions

View File

@ -68,13 +68,13 @@ jobs:
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg name: jan-mac-x64-${{ steps.version_update.outputs.new_version }}
path: ./electron/dist/jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg path: ./electron/dist/jan-mac-x64-${{ steps.version_update.outputs.new_version }}.dmg
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg name: jan-mac-arm64-${{ steps.version_update.outputs.new_version }}
path: ./electron/dist/jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg path: ./electron/dist/jan-mac-arm64-${{ steps.version_update.outputs.new_version }}.dmg
build-windows-x64: build-windows-x64:
@ -124,7 +124,7 @@ jobs:
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: jan-win-x64-${{ steps.version_update.outputs.new_version }}.exe name: jan-win-x64-${{ steps.version_update.outputs.new_version }}
path: ./electron/dist/*.exe path: ./electron/dist/*.exe
build-linux-x64: build-linux-x64:
@ -170,14 +170,21 @@ jobs:
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: jan-linux-amd64-${{ steps.version_update.outputs.new_version }}.deb name: jan-linux-amd64-${{ steps.version_update.outputs.new_version }}
path: ./electron/dist/*.deb path: ./electron/dist/*.deb
noti-discord-nightly: noti-discord-nightly-and-update-url-readme:
needs: [build-macos, build-windows-x64, build-linux-x64] needs: [build-macos, build-windows-x64, build-linux-x64]
environment: production
if: github.event_name == 'schedule' if: github.event_name == 'schedule'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: "0"
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
- name: Notify Discord - name: Notify Discord
uses: Ilshidur/action-discord@master uses: Ilshidur/action-discord@master
with: with:
@ -185,14 +192,45 @@ jobs:
env: env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
noti-discord-manual: - name: Update README.md with artifact URL
run: |
sed -i "s|<a href='https://github.com/janhq/jan/actions/runs/.*'>|<a href='https://github.com/janhq/jan/actions/runs/${GITHUB_RUN_ID}'>|" README.md
git config --global user.email "service@jan.ai"
git config --global user.name "Service Account"
git add README.md
git commit -m "${GITHUB_REPOSITORY}: Update README.md with nightly build artifact URL"
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
env:
GITHUB_RUN_ID: ${{ github.run_id }}
noti-discord-manual-and-update-url-readme:
needs: [build-macos, build-windows-x64, build-linux-x64] needs: [build-macos, build-windows-x64, build-linux-x64]
environment: production
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: "0"
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
- name: Notify Discord - name: Notify Discord
uses: Ilshidur/action-discord@master uses: Ilshidur/action-discord@master
with: with:
args: "Manual build artifact: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}" args: "Manual build artifact: https://github.com/janhq/jan/actions/runs/{{ GITHUB_RUN_ID }}"
env: env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# Update README.md with artifact URL if manual build from main branch
- name: Update README.md with artifact URL
if: github.ref == 'refs/heads/main'
run: |
sed -i "s|<a href='https://github.com/janhq/jan/actions/runs/.*'>|<a href='https://github.com/janhq/jan/actions/runs/${GITHUB_RUN_ID}'>|" README.md
git config --global user.email "service@jan.ai"
git config --global user.name "Service Account"
git add README.md
git commit -m "${GITHUB_REPOSITORY}: Update README.md with nightly build artifact URL"
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main
env:
GITHUB_RUN_ID: ${{ github.run_id }}

View File

@ -11,6 +11,9 @@ on:
- "package.json" - "package.json"
- "node_modules/**" - "node_modules/**"
- "yarn.lock" - "yarn.lock"
- "core/**"
- "extensions/**"
- "!README.md"
pull_request: pull_request:
branches: branches:
@ -43,6 +46,11 @@ jobs:
with: with:
node-version: 20 node-version: 20
- name: "Cleanup cache"
continue-on-error: true
run: |
make clean
- name: Linter and test - name: Linter and test
run: | run: |
make test make test
@ -69,6 +77,13 @@ jobs:
with: with:
node-version: 20 node-version: 20
# Clean cache, continue on error
- name: "Cleanup cache"
shell: powershell
continue-on-error: true
run: |
make clean
- name: Linter and test - name: Linter and test
shell: powershell shell: powershell
run: | run: |
@ -92,6 +107,11 @@ jobs:
with: with:
node-version: 20 node-version: 20
- name: "Cleanup cache"
continue-on-error: true
run: |
make clean
- name: Linter and test - name: Linter and test
run: | run: |
export DISPLAY=$(w -h | awk 'NR==1 {print $2}') export DISPLAY=$(w -h | awk 'NR==1 {print $2}')

View File

@ -0,0 +1,48 @@
name: Update Download URLs
on:
release:
types:
- published
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: "0"
token: ${{ secrets.PAT_SERVICE_ACCOUNT }}
ref: main
- name: Get Latest Release
uses: pozetroninc/github-action-get-latest-release@v0.7.0
id: get-latest-release
with:
repository: ${{ github.repository }}
- name: Update Download URLs in README.md
run: |
echo "Latest Release: ${{ steps.get-latest-release.outputs.release }}"
tag=$(/bin/echo -n "${{ steps.get-latest-release.outputs.release }}")
echo "Tag: $tag"
# Remove the v prefix
release=${tag:1}
echo "Release: $release"
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-win-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-win-x64-${release}.exe'>|" README.md
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-x64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-x64-${release}.dmg'>|" README.md
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-mac-arm64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-mac-arm64-${release}.dmg'>|" README.md
sed -i "s|<a href='https://github.com/janhq/jan/releases/download/v.*/jan-linux-amd64-.*'>|<a href='https://github.com/janhq/jan/releases/download/v${release}/jan-linux-amd64-${release}.deb'>|" README.md
- name: Commit and Push changes
if: github.event_name == 'release'
run: |
git config --global user.email "service@jan.ai"
git config --global user.name "Service Account"
git add README.md
git commit -m "Update README.md with Stable Download URLs"
git -c http.extraheader="AUTHORIZATION: bearer ${{ secrets.PAT_SERVICE_ACCOUNT }}" push origin HEAD:main

10
.gitignore vendored
View File

@ -17,7 +17,9 @@ package-lock.json
core/lib/** core/lib/**
# Nitro binary files # Nitro binary files
extensions/inference-extension/nitro/*/nitro extensions/inference-nitro-extension/bin/*/nitro
extensions/inference-extension/nitro/*/*.exe extensions/inference-nitro-extension/bin/*/*.metal
extensions/inference-extension/nitro/*/*.dll extensions/inference-nitro-extension/bin/*/*.exe
extensions/inference-extension/nitro/*/*.metal extensions/inference-nitro-extension/bin/*/*.dll
extensions/inference-nitro-extension/bin/*/*.exp
extensions/inference-nitro-extension/bin/*/*.lib

View File

@ -1,4 +1,4 @@
# Jan - Own Your AI # Jan - Bring AI to your Desktop
![Jan banner](https://github.com/janhq/jan/assets/89722390/35daac7d-b895-487c-a6ac-6663daaad78e) ![Jan banner](https://github.com/janhq/jan/assets/89722390/35daac7d-b895-487c-a6ac-6663daaad78e)
@ -21,7 +21,7 @@
> ⚠️ **Jan is currently in Development**: Expect breaking changes and bugs! > ⚠️ **Jan is currently in Development**: Expect breaking changes and bugs!
Jan is a free, open-source alternative to OpenAI's platform that runs on a local folder of open-format files. Jan is an open-source ChatGPT alternative that runs 100% offline on your computer.
**Jan runs on any hardware.** From PCs to multi-GPU clusters, Jan supports universal architectures: **Jan runs on any hardware.** From PCs to multi-GPU clusters, Jan supports universal architectures:
@ -31,27 +31,83 @@ Jan is a free, open-source alternative to OpenAI's platform that runs on a local
- [x] Linux Debian - [x] Linux Debian
- [x] Windows x64 - [x] Windows x64
> Download Jan at https://jan.ai/ ## Download
<table>
<tr>
<td style="text-align:center"><b>Version Type</b></td>
<td style="text-align:center"><b>Windows</b></td>
<td colspan="2" style="text-align:center"><b>MacOS</b></td>
<td style="text-align:center"><b>Linux</b></td>
</tr>
<tr>
<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.0/jan-win-x64-0.4.0.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.0/jan-mac-x64-0.4.0.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.0/jan-mac-arm64-0.4.0.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.0/jan-linux-amd64-0.4.0.deb'>
<img src='./docs/static/img/linux.png' style="height:14px; width: 14px" />
<b>jan.deb</b>
</a>
</td>
</tr>
<tr style="text-align: center">
<td style="text-align:center"><b>Experimental (Nighlty Build)</b></td>
<td style="text-align:center" colspan="4">
<a href='https://github.com/janhq/jan/actions/runs/7190839060'>
<b>Github action artifactory</b>
</a>
</td>
</tr>
</table>
Download the latest version of Jan at https://jan.ai/ or visit the **[GitHub Releases](https://github.com/janhq/jan/releases)** to download any previous release.
## Demo ## Demo
<p align="center"> <p align="center">
<video src="https://github.com/janhq/jan/assets/89722390/47988dcc-13ed-4ca0-87f7-74d00f4d47d8"> <video src="https://github.com/janhq/jan/assets/89722390/43adfddc-7980-4ae6-b544-719f04660dd7">
</video> </video>
</p> </p>
_Video: Jan v0.3.0 on Mac Air M2, 16GB Ventura_
_Video: Jan v0.4.0 on Mac Air M2, 16GB Ventura_
## Quicklinks ## Quicklinks
#### Jan
- [Jan website](https://jan.ai/)
- [Jan Github](https://github.com/janhq/jan)
- [User Guides](https://jan.ai/docs) - [User Guides](https://jan.ai/docs)
- [Developer docs](https://jan.ai/docs) - [Developer docs](https://jan.ai/docs/extensions/)
- [API reference](https://jan.ai/api/overview) - [API reference](https://jan.ai/api-reference/)
- [Nitro Github](https://nitro.jan.ai): Nitro is a C++ inference engine - [Specs](https://jan.ai/specs/)
#### Nitro:
Nitro is a high-efficiency C++ inference engine for edge computing, powering Jan. It is lightweight and embeddable, ideal for product integration.
- [Nitro Website](https://nitro.jan.ai)
- [Nitro Github](https://github.com/janhq/nitro)
- [Documentation](https://nitro.jan.ai/docs)
- [API Reference](https://nitro.jan.ai/api-reference)
## Troubleshooting ## Troubleshooting
As Jan is development mode, you might get stuck on a broken build. As Jan is in development mode, you might get stuck on a broken build.
To reset your installation: To reset your installation:

13
core/.editorconfig Normal file
View File

@ -0,0 +1,13 @@
#root = true
[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
indent_size = 2
[*.md]
trim_trailing_whitespace = false

12
core/.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
node_modules
coverage
.nyc_output
.DS_Store
*.log
.vscode
.idea
dist
compiled
.awcache
.rpt2_cache
docs

View File

@ -8,28 +8,83 @@
], ],
"homepage": "https://jan.ai", "homepage": "https://jan.ai",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"main": "lib/index.js", "main": "dist/core.umd.js",
"types": "lib/index.d.ts", "module": "dist/core.es5.js",
"directories": { "typings": "dist/types/index.d.ts",
"lib": "lib",
"test": "__tests__"
},
"exports": {
".": "./lib/index.js"
},
"files": [ "files": [
"lib", "dist"
"README.md",
"LICENSE.md",
"package.json",
"!.DS_Store"
], ],
"author": "Jan <service@jan.ai>",
"repository": {
"type": "git",
"url": ""
},
"engines": {
"node": ">=6.0.0"
},
"scripts": { "scripts": {
"test": "echo \"Error: run tests from root\" && exit 1", "lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
"build": "tsc" "prebuild": "rimraf dist",
"build": "tsc --module commonjs && rollup -c rollup.config.ts",
"start": "rollup -c rollup.config.ts -w"
},
"lint-staged": {
"{src,test}/**/*.ts": [
"prettier --write",
"git add"
]
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
},
"jest": {
"transform": {
".(ts|tsx)": "ts-jest"
},
"testEnvironment": "node",
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/test/"
],
"coverageThreshold": {
"global": {
"branches": 90,
"functions": 95,
"lines": 95,
"statements": 95
}
},
"collectCoverageFrom": [
"src/*.{js,ts}"
]
},
"prettier": {
"semi": false,
"singleQuote": true
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^12.0.2", "@types/node": "^12.0.2",
"rollup": "^2.38.5",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-typescript2": "^0.36.0",
"ts-node": "^7.0.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2" "typescript": "^5.2.2"
} }
} }

37
core/rollup.config.ts Normal file
View File

@ -0,0 +1,37 @@
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'
const pkg = require('./package.json')
const libraryName = 'core'
export default {
input: `src/index.ts`,
output: [
{ file: pkg.main, name: libraryName, format: 'umd', sourcemap: true },
{ file: pkg.module, format: 'es', sourcemap: true },
],
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
include: 'src/**',
},
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(),
// Resolve source maps to the original source
sourceMaps(),
],
}

View File

@ -1,7 +1,10 @@
export {}; export {}
declare global { declare global {
interface Window { namespace NodeJS {
core?: any; interface Global {
core: any
}
} }
var core: any | undefined
} }

100
core/src/api/index.ts Normal file
View File

@ -0,0 +1,100 @@
/**
* App Route APIs
* @description Enum of all the routes exposed by the app
*/
export enum AppRoute {
setNativeThemeLight = 'setNativeThemeLight',
setNativeThemeDark = 'setNativeThemeDark',
setNativeThemeSystem = 'setNativeThemeSystem',
appDataPath = 'appDataPath',
appVersion = 'appVersion',
getResourcePath = 'getResourcePath',
openExternalUrl = 'openExternalUrl',
openAppDirectory = 'openAppDirectory',
openFileExplore = 'openFileExplorer',
relaunch = 'relaunch',
}
export enum AppEvent {
onAppUpdateDownloadUpdate = 'onAppUpdateDownloadUpdate',
onAppUpdateDownloadError = 'onAppUpdateDownloadError',
onAppUpdateDownloadSuccess = 'onAppUpdateDownloadSuccess',
}
export enum DownloadRoute {
abortDownload = 'abortDownload',
downloadFile = 'downloadFile',
pauseDownload = 'pauseDownload',
resumeDownload = 'resumeDownload',
}
export enum DownloadEvent {
onFileDownloadUpdate = 'onFileDownloadUpdate',
onFileDownloadError = 'onFileDownloadError',
onFileDownloadSuccess = 'onFileDownloadSuccess',
}
export enum ExtensionRoute {
baseExtensions = 'baseExtensions',
getActiveExtensions = 'getActiveExtensions',
installExtension = 'installExtension',
invokeExtensionFunc = 'invokeExtensionFunc',
updateExtension = 'updateExtension',
uninstallExtension = 'uninstallExtension',
}
export enum FileSystemRoute {
appendFile = 'appendFile',
copyFile = 'copyFile',
deleteFile = 'deleteFile',
exists = 'exists',
getResourcePath = 'getResourcePath',
getUserSpace = 'getUserSpace',
isDirectory = 'isDirectory',
listFiles = 'listFiles',
mkdir = 'mkdir',
readFile = 'readFile',
readLineByLine = 'readLineByLine',
rmdir = 'rmdir',
writeFile = 'writeFile',
}
export type ApiFunction = (...args: any[]) => any
export type AppRouteFunctions = {
[K in AppRoute]: ApiFunction
}
export type AppEventFunctions = {
[K in AppEvent]: ApiFunction
}
export type DownloadRouteFunctions = {
[K in DownloadRoute]: ApiFunction
}
export type DownloadEventFunctions = {
[K in DownloadEvent]: ApiFunction
}
export type ExtensionRouteFunctions = {
[K in ExtensionRoute]: ApiFunction
}
export type FileSystemRouteFunctions = {
[K in FileSystemRoute]: ApiFunction
}
export type APIFunctions = AppRouteFunctions &
AppEventFunctions &
DownloadRouteFunctions &
DownloadEventFunctions &
ExtensionRouteFunctions &
FileSystemRouteFunctions
export const APIRoutes = [
...Object.values(AppRoute),
...Object.values(DownloadRoute),
...Object.values(ExtensionRoute),
...Object.values(FileSystemRoute),
]
export const APIEvents = [...Object.values(AppEvent), ...Object.values(DownloadEvent)]

View File

@ -7,12 +7,11 @@
* @returns Promise<any> * @returns Promise<any>
* *
*/ */
const executeOnMain: ( const executeOnMain: (extension: string, method: string, ...args: any[]) => Promise<any> = (
extension: string, extension,
method: string, method,
...args: any[] ...args
) => Promise<any> = (extension, method, ...args) => ) => global.core?.api?.invokeExtensionFunc(extension, method, ...args)
window.core?.api?.invokeExtensionFunc(extension, method, ...args);
/** /**
* Downloads a file from a URL and saves it to the local file system. * Downloads a file from a URL and saves it to the local file system.
@ -20,10 +19,8 @@ const executeOnMain: (
* @param {string} fileName - The name to use for the downloaded file. * @param {string} fileName - The name to use for the downloaded file.
* @returns {Promise<any>} A promise that resolves when the file is downloaded. * @returns {Promise<any>} A promise that resolves when the file is downloaded.
*/ */
const downloadFile: (url: string, fileName: string) => Promise<any> = ( const downloadFile: (url: string, fileName: string) => Promise<any> = (url, fileName) =>
url, global.core?.api?.downloadFile(url, fileName)
fileName
) => window.core?.api?.downloadFile(url, fileName);
/** /**
* Aborts the download of a specific file. * Aborts the download of a specific file.
@ -31,20 +28,13 @@ const downloadFile: (url: string, fileName: string) => Promise<any> = (
* @returns {Promise<any>} A promise that resolves when the download has been aborted. * @returns {Promise<any>} A promise that resolves when the download has been aborted.
*/ */
const abortDownload: (fileName: string) => Promise<any> = (fileName) => const abortDownload: (fileName: string) => Promise<any> = (fileName) =>
window.core.api?.abortDownload(fileName); global.core.api?.abortDownload(fileName)
/**
* Retrieves the path to the app data directory using the `coreAPI` object.
* If the `coreAPI` object is not available, the function returns `undefined`.
* @returns A Promise that resolves with the path to the app data directory, or `undefined` if the `coreAPI` object is not available.
*/
const appDataPath: () => Promise<any> = () => window.core.api?.appDataPath();
/** /**
* Gets the user space path. * Gets the user space path.
* @returns {Promise<any>} A Promise that resolves with the user space path. * @returns {Promise<any>} A Promise that resolves with the user space path.
*/ */
const getUserSpace = (): Promise<string> => window.core.api?.getUserSpace(); const getUserSpace = (): Promise<string> => global.core.api?.getUserSpace()
/** /**
* Opens the file explorer at a specific path. * Opens the file explorer at a specific path.
@ -52,10 +42,9 @@ const getUserSpace = (): Promise<string> => window.core.api?.getUserSpace();
* @returns {Promise<any>} A promise that resolves when the file explorer is opened. * @returns {Promise<any>} A promise that resolves when the file explorer is opened.
*/ */
const openFileExplorer: (path: string) => Promise<any> = (path) => const openFileExplorer: (path: string) => Promise<any> = (path) =>
window.core.api?.openFileExplorer(path); global.core.api?.openFileExplorer(path)
const getResourcePath: () => Promise<string> = () => const getResourcePath: () => Promise<string> = () => global.core.api?.getResourcePath()
window.core.api?.getResourcePath();
/** /**
* Register extension point function type definition * Register extension point function type definition
@ -64,8 +53,8 @@ export type RegisterExtensionPoint = (
extensionName: string, extensionName: string,
extensionId: string, extensionId: string,
method: Function, method: Function,
priority?: number priority?: number,
) => void; ) => void
/** /**
* Functions exports * Functions exports
@ -74,8 +63,7 @@ export {
executeOnMain, executeOnMain,
downloadFile, downloadFile,
abortDownload, abortDownload,
appDataPath,
getUserSpace, getUserSpace,
openFileExplorer, openFileExplorer,
getResourcePath, getResourcePath,
}; }

View File

@ -8,6 +8,18 @@ export enum EventName {
OnMessageResponse = "OnMessageResponse", OnMessageResponse = "OnMessageResponse",
/** The `OnMessageUpdate` event is emitted when a message is updated. */ /** The `OnMessageUpdate` event is emitted when a message is updated. */
OnMessageUpdate = "OnMessageUpdate", OnMessageUpdate = "OnMessageUpdate",
/** The `OnModelInit` event is emitted when a model inits. */
OnModelInit = "OnModelInit",
/** The `OnModelReady` event is emitted when a model ready. */
OnModelReady = "OnModelReady",
/** The `OnModelFail` event is emitted when a model fails loading. */
OnModelFail = "OnModelFail",
/** The `OnModelStop` event is emitted when a model start to stop. */
OnModelStop = "OnModelStop",
/** The `OnModelStopped` event is emitted when a model stopped ok. */
OnModelStopped = "OnModelStopped",
/** The `OnInferenceStopped` event is emitted when a inference is stopped. */
OnInferenceStopped = "OnInferenceStopped",
} }
/** /**
@ -20,7 +32,7 @@ const on: (eventName: string, handler: Function) => void = (
eventName, eventName,
handler handler
) => { ) => {
window.core?.events?.on(eventName, handler); global.core?.events?.on(eventName, handler);
}; };
/** /**
@ -33,7 +45,7 @@ const off: (eventName: string, handler: Function) => void = (
eventName, eventName,
handler handler
) => { ) => {
window.core?.events?.off(eventName, handler); global.core?.events?.off(eventName, handler);
}; };
/** /**
@ -43,7 +55,7 @@ const off: (eventName: string, handler: Function) => void = (
* @param object The object to pass to the event callback. * @param object The object to pass to the event callback.
*/ */
const emit: (eventName: string, object: any) => void = (eventName, object) => { const emit: (eventName: string, object: any) => void = (eventName, object) => {
window.core?.events?.emit(eventName, object); global.core?.events?.emit(eventName, object);
}; };
export const events = { export const events = {

View File

@ -5,26 +5,10 @@ import { BaseExtension } from "../extension";
* Inference extension. Start, stop and inference models. * Inference extension. Start, stop and inference models.
*/ */
export abstract class InferenceExtension extends BaseExtension { export abstract class InferenceExtension extends BaseExtension {
/**
* Initializes the model for the extension.
* @param modelId - The ID of the model to initialize.
*/
abstract initModel(modelId: string, settings?: ModelSettingParams): Promise<void>;
/**
* Stops the model for the extension.
*/
abstract stopModel(): Promise<void>;
/**
* Stops the streaming inference.
*/
abstract stopInference(): Promise<void>;
/** /**
* Processes an inference request. * Processes an inference request.
* @param data - The data for the inference request. * @param data - The data for the inference request.
* @returns The result of the inference request. * @returns The result of the inference request.
*/ */
abstract inferenceRequest(data: MessageRequest): Promise<ThreadMessage>; abstract inference(data: MessageRequest): Promise<ThreadMessage>;
} }

View File

@ -5,54 +5,52 @@
* @returns {Promise<any>} A Promise that resolves when the file is written successfully. * @returns {Promise<any>} A Promise that resolves when the file is written successfully.
*/ */
const writeFile: (path: string, data: string) => Promise<any> = (path, data) => const writeFile: (path: string, data: string) => Promise<any> = (path, data) =>
window.core.api?.writeFile(path, data); global.core.api?.writeFile(path, data)
/** /**
* Checks whether the path is a directory. * Checks whether the path is a directory.
* @param path - The path to check. * @param path - The path to check.
* @returns {boolean} A boolean indicating whether the path is a directory. * @returns {boolean} A boolean indicating whether the path is a directory.
*/ */
const isDirectory = (path: string): Promise<boolean> => const isDirectory = (path: string): Promise<boolean> => global.core.api?.isDirectory(path)
window.core.api?.isDirectory(path);
/** /**
* Reads the contents of a file at the specified path. * Reads the contents of a file at the specified path.
* @param {string} path - The path of the file to read. * @param {string} path - The path of the file to read.
* @returns {Promise<any>} A Promise that resolves with the contents of the file. * @returns {Promise<any>} A Promise that resolves with the contents of the file.
*/ */
const readFile: (path: string) => Promise<any> = (path) => const readFile: (path: string) => Promise<any> = (path) => global.core.api?.readFile(path)
window.core.api?.readFile(path); /**
* Check whether the file exists
* @param {string} path
* @returns {boolean} A boolean indicating whether the path is a file.
*/
const exists = (path: string): Promise<boolean> => global.core.api?.exists(path)
/** /**
* List the directory files * List the directory files
* @param {string} path - The path of the directory to list files. * @param {string} path - The path of the directory to list files.
* @returns {Promise<any>} A Promise that resolves with the contents of the directory. * @returns {Promise<any>} A Promise that resolves with the contents of the directory.
*/ */
const listFiles: (path: string) => Promise<any> = (path) => const listFiles: (path: string) => Promise<any> = (path) => global.core.api?.listFiles(path)
window.core.api?.listFiles(path);
/** /**
* Creates a directory at the specified path. * Creates a directory at the specified path.
* @param {string} path - The path of the directory to create. * @param {string} path - The path of the directory to create.
* @returns {Promise<any>} A Promise that resolves when the directory is created successfully. * @returns {Promise<any>} A Promise that resolves when the directory is created successfully.
*/ */
const mkdir: (path: string) => Promise<any> = (path) => const mkdir: (path: string) => Promise<any> = (path) => global.core.api?.mkdir(path)
window.core.api?.mkdir(path);
/** /**
* Removes a directory at the specified path. * Removes a directory at the specified path.
* @param {string} path - The path of the directory to remove. * @param {string} path - The path of the directory to remove.
* @returns {Promise<any>} A Promise that resolves when the directory is removed successfully. * @returns {Promise<any>} A Promise that resolves when the directory is removed successfully.
*/ */
const rmdir: (path: string) => Promise<any> = (path) => const rmdir: (path: string) => Promise<any> = (path) => global.core.api?.rmdir(path)
window.core.api?.rmdir(path);
/** /**
* Deletes a file from the local file system. * Deletes a file from the local file system.
* @param {string} path - The path of the file to delete. * @param {string} path - The path of the file to delete.
* @returns {Promise<any>} A Promise that resolves when the file is deleted. * @returns {Promise<any>} A Promise that resolves when the file is deleted.
*/ */
const deleteFile: (path: string) => Promise<any> = (path) => const deleteFile: (path: string) => Promise<any> = (path) => global.core.api?.deleteFile(path)
window.core.api?.deleteFile(path);
/** /**
* Appends data to a file at the specified path. * Appends data to a file at the specified path.
@ -60,10 +58,10 @@ const deleteFile: (path: string) => Promise<any> = (path) =>
* @param data data to append * @param data data to append
*/ */
const appendFile: (path: string, data: string) => Promise<any> = (path, data) => const appendFile: (path: string, data: string) => Promise<any> = (path, data) =>
window.core.api?.appendFile(path, data); global.core.api?.appendFile(path, data)
const copyFile: (src: string, dest: string) => Promise<any> = (src, dest) => const copyFile: (src: string, dest: string) => Promise<any> = (src, dest) =>
window.core.api?.copyFile(src, dest); global.core.api?.copyFile(src, dest)
/** /**
* Reads a file line by line. * Reads a file line by line.
@ -71,12 +69,13 @@ const copyFile: (src: string, dest: string) => Promise<any> = (src, dest) =>
* @returns {Promise<any>} A promise that resolves to the lines of the file. * @returns {Promise<any>} A promise that resolves to the lines of the file.
*/ */
const readLineByLine: (path: string) => Promise<any> = (path) => const readLineByLine: (path: string) => Promise<any> = (path) =>
window.core.api?.readLineByLine(path); global.core.api?.readLineByLine(path)
export const fs = { export const fs = {
isDirectory, isDirectory,
writeFile, writeFile,
readFile, readFile,
exists,
listFiles, listFiles,
mkdir, mkdir,
rmdir, rmdir,
@ -84,4 +83,4 @@ export const fs = {
appendFile, appendFile,
readLineByLine, readLineByLine,
copyFile, copyFile,
}; }

View File

@ -2,34 +2,39 @@
* Export all types. * Export all types.
* @module * @module
*/ */
export * from "./types/index"; export * from './types/index'
/**
* Export all routes
*/
export * from './api'
/** /**
* Export Core module * Export Core module
* @module * @module
*/ */
export * from "./core"; export * from './core'
/** /**
* Export Event module. * Export Event module.
* @module * @module
*/ */
export * from "./events"; export * from './events'
/** /**
* Export Filesystem module. * Export Filesystem module.
* @module * @module
*/ */
export * from "./fs"; export * from './fs'
/** /**
* Export Extension module. * Export Extension module.
* @module * @module
*/ */
export * from "./extension"; export * from './extension'
/** /**
* Export all base extensions. * Export all base extensions.
* @module * @module
*/ */
export * from "./extensions/index"; export * from './extensions/index'

View File

@ -41,8 +41,8 @@ export type MessageRequest = {
/** Messages for constructing a chat completion request **/ /** Messages for constructing a chat completion request **/
messages?: ChatCompletionMessage[]; messages?: ChatCompletionMessage[];
/** Runtime parameters for constructing a chat completion request **/ /** Settings for constructing a chat completion request **/
parameters?: ModelRuntimeParam; model?: ModelInfo;
}; };
/** /**
@ -71,9 +71,9 @@ export type ThreadMessage = {
object: string; object: string;
/** Thread id, default is a ulid. **/ /** Thread id, default is a ulid. **/
thread_id: string; thread_id: string;
/** The role of the author of this message. **/ /** The assistant id of this thread. **/
assistant_id?: string; assistant_id?: string;
// TODO: comment /** The role of the author of this message. **/
role: ChatCompletionRole; role: ChatCompletionRole;
/** The content of this message. **/ /** The content of this message. **/
content: ThreadContent[]; content: ThreadContent[];
@ -125,8 +125,6 @@ export interface Thread {
title: string; title: string;
/** Assistants in this thread. **/ /** Assistants in this thread. **/
assistants: ThreadAssistantInfo[]; assistants: ThreadAssistantInfo[];
// if the thread has been init will full assistant info
isFinishInit: boolean;
/** The timestamp indicating when this thread was created, represented in ISO 8601 format. **/ /** The timestamp indicating when this thread was created, represented in ISO 8601 format. **/
created: number; created: number;
/** The timestamp indicating when this thread was updated, represented in ISO 8601 format. **/ /** The timestamp indicating when this thread was updated, represented in ISO 8601 format. **/
@ -153,7 +151,8 @@ export type ThreadAssistantInfo = {
export type ModelInfo = { export type ModelInfo = {
id: string; id: string;
settings: ModelSettingParams; settings: ModelSettingParams;
parameters: ModelRuntimeParam; parameters: ModelRuntimeParams;
engine?: InferenceEngine;
}; };
/** /**
@ -165,7 +164,19 @@ export type ThreadState = {
waitingForResponse: boolean; waitingForResponse: boolean;
error?: Error; error?: Error;
lastMessage?: string; lastMessage?: string;
isFinishInit?: boolean;
}; };
/**
* Represents the inference engine.
* @stored
*/
enum InferenceEngine {
nitro = "nitro",
openai = "openai",
triton_trtllm = "triton_trtllm",
hf_endpoint = "hf_endpoint",
}
/** /**
* Model type defines the shape of a model object. * Model type defines the shape of a model object.
@ -183,6 +194,11 @@ export interface Model {
*/ */
version: number; version: number;
/**
* The format of the model.
*/
format: string;
/** /**
* The model download source. It can be an external url or a local filepath. * The model download source. It can be an external url or a local filepath.
*/ */
@ -213,7 +229,7 @@ export interface Model {
* Default: "to_download" * Default: "to_download"
* Enum: "to_download" "downloading" "ready" "running" * Enum: "to_download" "downloading" "ready" "running"
*/ */
state: ModelState; state?: ModelState;
/** /**
* The model settings. * The model settings.
@ -223,18 +239,23 @@ export interface Model {
/** /**
* The model runtime parameters. * The model runtime parameters.
*/ */
parameters: ModelRuntimeParam; parameters: ModelRuntimeParams;
/** /**
* Metadata of the model. * Metadata of the model.
*/ */
metadata: ModelMetadata; metadata: ModelMetadata;
/**
* The model engine.
*/
engine: InferenceEngine;
} }
export type ModelMetadata = { export type ModelMetadata = {
author: string; author: string;
tags: string[]; tags: string[];
size: number; size: number;
cover?: string;
}; };
/** /**
@ -254,6 +275,7 @@ export type ModelSettingParams = {
ngl?: number; ngl?: number;
embedding?: boolean; embedding?: boolean;
n_parallel?: number; n_parallel?: number;
cpu_threads?: number;
system_prompt?: string; system_prompt?: string;
user_prompt?: string; user_prompt?: string;
ai_prompt?: string; ai_prompt?: string;
@ -262,13 +284,16 @@ export type ModelSettingParams = {
/** /**
* The available model runtime parameters. * The available model runtime parameters.
*/ */
export type ModelRuntimeParam = { export type ModelRuntimeParams = {
temperature?: number; temperature?: number;
token_limit?: number; token_limit?: number;
top_k?: number; top_k?: number;
top_p?: number; top_p?: number;
stream?: boolean; stream?: boolean;
max_tokens?: number; max_tokens?: number;
stop?: string[];
frequency_penalty?: number;
presence_penalty?: number;
}; };
/** /**

View File

@ -1,15 +1,19 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es2016", "moduleResolution": "node",
"module": "ES6", "target": "es5",
"outDir": "./lib", "module": "es2015",
"esModuleInterop": true, "lib": ["es2015", "es2016", "es2017", "dom"],
"forceConsistentCasingInFileNames": true,
"strict": true, "strict": true,
"skipLibCheck": true, "sourceMap": true,
"declaration": true, "declaration": true,
"rootDir": "./src" "allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declarationDir": "dist/types",
"outDir": "dist/lib",
"importHelpers": true,
"typeRoots": ["node_modules/@types"]
}, },
"include": ["./src"], "include": ["src"]
"exclude": ["lib", "node_modules", "**/*.test.ts", "**/__mocks__/*"]
} }

6
core/tslint.json Normal file
View File

@ -0,0 +1,6 @@
{
"extends": [
"tslint-config-standard",
"tslint-config-prettier"
]
}

View File

@ -1,7 +1,7 @@
--- ---
title: About Jan title: About Jan
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
Jan believes in the need for an open source AI ecosystem, and are building the infra and tooling to allow open source AIs to compete on a level playing field with proprietary ones. Jan believes in the need for an open source AI ecosystem, and are building the infra and tooling to allow open source AIs to compete on a level playing field with proprietary ones.

View File

@ -1,7 +1,7 @@
--- ---
title: Community title: Community
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
- [ ] Social media links - [ ] Social media links

View File

@ -1,5 +1,5 @@
--- ---
title: Build an Assistant title: Build an Assistant
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---

View File

@ -1,7 +1,7 @@
--- ---
title: Extending Jan title: Extending Jan
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Overview ## Overview

View File

@ -1,5 +1,5 @@
--- ---
title: Build a Module title: Build a Module
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---

View File

@ -1,5 +1,5 @@
--- ---
title: Build a Theme title: Build a Theme
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---

View File

@ -1,5 +1,5 @@
--- ---
title: Build a Tool title: Build a Tool
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---

View File

@ -1,7 +1,7 @@
--- ---
title: How Jan Works title: How Jan Works
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
- Local Filesystem - Local Filesystem

View File

@ -4,18 +4,18 @@ slug: /guides
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: keywords:
[ [
Jan AI,
Jan, Jan,
ChatGPT alternative, ChatGPT alternative,
on-premises AI,
local API server,
local AI, local AI,
llm, private AI,
conversational AI, conversational AI,
no-subscription fee, no-subscription fee,
large language model,
] ]
--- ---
Jan is a ChatGPT-alternative that runs on your own computer, with a [local API server](/api). Jan is a ChatGPT-alternative that runs on your own computer, with a [local API server](/api-reference/).
Jan uses [open-source AI models](/docs/models), stores data in [open file formats](/specs/data-structures), is highly customizable via [extensions](/docs/extensions). Jan uses [open-source AI models](/docs/models), stores data in [open file formats](/specs/data-structures), is highly customizable via [extensions](/docs/extensions).

View File

@ -1,5 +1,5 @@
--- ---
title: Model Management title: Model Management
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---

View File

@ -1,7 +1,7 @@
--- ---
title: Quickstart title: Quickstart
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
- Write in the style of comics, explanation - Write in the style of comics, explanation

View File

@ -1,7 +1,7 @@
--- ---
title: API Server title: API Server
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::warning :::warning

View File

@ -1,7 +1,7 @@
--- ---
title: Engineering title: Engineering
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Connecting to Rigs ## Connecting to Rigs

View File

@ -2,7 +2,7 @@
title: Onboarding Checklist title: Onboarding Checklist
slug: /handbook slug: /handbook
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
# Welcome # Welcome

View File

@ -1,7 +1,7 @@
--- ---
title: Hardware Examples title: Hardware Examples
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Add your own example ## Add your own example

View File

@ -1,7 +1,7 @@
--- ---
title: From Source title: From Source
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
# Install Jan from Source # Install Jan from Source

View File

@ -1,7 +1,7 @@
--- ---
title: Linux title: Linux
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
# Installing Jan on Linux # Installing Jan on Linux

View File

@ -1,7 +1,7 @@
--- ---
title: Mac title: Mac
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
# Installing Jan on MacOS # Installing Jan on MacOS

View File

@ -1,7 +1,7 @@
--- ---
title: Overview title: Overview
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
Getting up and running open-source AI models on your own computer with Jan is quick and easy. Jan is lightweight and can run on a variety of hardware and platform versions. Specific requirements tailored to your platform are outlined below. Getting up and running open-source AI models on your own computer with Jan is quick and easy. Jan is lightweight and can run on a variety of hardware and platform versions. Specific requirements tailored to your platform are outlined below.

View File

@ -1,7 +1,7 @@
--- ---
title: Windows title: Windows
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
# Installing Jan on Windows # Installing Jan on Windows

View File

@ -2,7 +2,7 @@
title: Architecture title: Architecture
slug: /specs slug: /specs
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::warning :::warning

View File

@ -2,7 +2,7 @@
title: "Assistants" title: "Assistants"
slug: /specs/assistants slug: /specs/assistants
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::caution :::caution
@ -40,6 +40,10 @@ In Jan, assistants are `primary` entities with the following capabilities:
## `assistant.json` ## `assistant.json`
- Each `assistant` folder contains an `assistant.json` file, which is a representation of an assistant.
- `assistant.json` contains metadata and model parameter overrides
- There are no required fields.
```js ```js
{ {
"id": "asst_abc123", // Defaults to foldername "id": "asst_abc123", // Defaults to foldername

View File

@ -2,7 +2,7 @@
title: Chats title: Chats
slug: /specs/chats slug: /specs/chats
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::caution :::caution

View File

@ -2,7 +2,7 @@
title: "Files" title: "Files"
slug: /specs/files slug: /specs/files
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::warning :::warning

View File

@ -2,7 +2,7 @@
title: "Fine-tuning" title: "Fine-tuning"
slug: /specs/finetuning slug: /specs/finetuning
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
Todo: @hiro Todo: @hiro

View File

@ -2,7 +2,7 @@
title: Messages title: Messages
slug: /specs/messages slug: /specs/messages
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::caution :::caution

View File

@ -2,7 +2,7 @@
title: Models title: Models
slug: /specs/models slug: /specs/models
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::caution :::caution

View File

@ -2,7 +2,7 @@
title: Prompts title: Prompts
slug: /specs/prompts slug: /specs/prompts
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
- [ ] /prompts folder - [ ] /prompts folder

View File

@ -2,7 +2,7 @@
title: Threads title: Threads
slug: /specs/threads slug: /specs/threads
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::caution :::caution

View File

@ -1,7 +1,7 @@
--- ---
title: File-based Approach title: File-based Approach
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::warning :::warning

View File

@ -1,7 +1,7 @@
--- ---
title: Jan (Assistant) title: Jan (Assistant)
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Jan: a "global" assistant ## Jan: a "global" assistant

View File

@ -2,7 +2,7 @@
title: Chat title: Chat
slug: /specs/chat slug: /specs/chat
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Overview ## Overview

View File

@ -2,7 +2,7 @@
title: Hub title: Hub
slug: /specs/hub slug: /specs/hub
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Overview ## Overview

View File

@ -2,7 +2,7 @@
title: Settings title: Settings
slug: /specs/settings slug: /specs/settings
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Overview ## Overview

View File

@ -2,7 +2,7 @@
title: System Monitor title: System Monitor
slug: /specs/system-monitor slug: /specs/system-monitor
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
## Overview ## Overview

View File

@ -1,7 +1,7 @@
--- ---
title: User Interface title: User Interface
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords: [Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee] keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ]
--- ---
:::warning :::warning

View File

@ -3,7 +3,6 @@
require("dotenv").config(); require("dotenv").config();
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula"); const darkCodeTheme = require("prism-react-renderer/themes/dracula");
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
@ -115,11 +114,10 @@ const config = {
primaryColor: "#1a73e8", primaryColor: "#1a73e8",
primaryColorDark: "#1a73e8", primaryColorDark: "#1a73e8",
options: { options: {
requiredPropsFirst: true, requiredPropsFirst: true,
noAutoAuth: true, noAutoAuth: true,
hideDownloadButton: true, hideDownloadButton: true,
disableSearch: true, },
},
}, },
}, },
], ],
@ -127,7 +125,7 @@ const config = {
// Docs: https://docusaurus.io/docs/api/themes/configuration // Docs: https://docusaurus.io/docs/api/themes/configuration
themeConfig: { themeConfig: {
image: "img/jan-social-card.png", image: "img/og-image.png",
// Only for react live // Only for react live
liveCodeBlock: { liveCodeBlock: {
playgroundPosition: "bottom", playgroundPosition: "bottom",
@ -135,48 +133,78 @@ const config = {
docs: { docs: {
sidebar: { sidebar: {
hideable: true, hideable: true,
autoCollapseCategories: true, autoCollapseCategories: false,
}, },
}, },
// SEO Docusarus // SEO Docusarus
metadata: [ metadata: [
{ name: 'description', content: 'Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.' }, {
{ name: 'keywords', content: 'Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee' }, name: "description",
{ name: 'robots', content: 'index, follow' }, content:
{ property: 'og:title', content: 'Run your own AI | Jan' }, "Jan runs 100% offline on your computer, utilizes open-source AI models, prioritizes privacy, and is highly customizable.",
{ property: 'og:description', content: 'Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.' }, },
{ property: 'og:image', content: 'https://jan.ai/img/jan-social-card.png' }, {
{ property: 'og:type', content: 'website' }, name: "keywords",
{ property: 'twitter:card', content: 'summary_large_image' }, content:
{ property: 'twitter:site', content: '@janhq_' }, "Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ",
{ property: 'twitter:title', content: 'Run your own AI | Jan' }, },
{ property: 'twitter:description', content: 'Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.' }, { name: "robots", content: "index, follow" },
{ property: 'twitter:image', content: 'https://jan.ai/img/jan-social-card.png' }, {
property: "og:title",
content: "Jan | Open-source ChatGPT Alternative",
},
{
property: "og:description",
content:
"Jan runs 100% offline on your computer, utilizes open-source AI models, prioritizes privacy, and is highly customizable.",
},
{
property: "og:image",
content: "https://jan.ai/img/og-image.png",
},
{ property: "og:type", content: "website" },
{ property: "twitter:card", content: "summary_large_image" },
{ property: "twitter:site", content: "@janhq_" },
{
property: "twitter:title",
content: "Jan | Open-source ChatGPT Alternative",
},
{
property: "twitter:description",
content:
"Jan runs 100% offline on your computer, utilizes open-source AI models, prioritizes privacy, and is highly customizable.",
},
{
property: "twitter:image",
content: "https://jan.ai/img/og-image.png",
},
], ],
headTags: [ headTags: [
// Declare a <link> preconnect tag // Declare a <link> preconnect tag
{ {
tagName: 'link', tagName: "link",
attributes: { attributes: {
rel: 'preconnect', rel: "preconnect",
href: 'https://jan.ai/', href: "https://jan.ai/",
}, },
}, },
// Declare some json-ld structured data // Declare some json-ld structured data
{ {
tagName: 'script', tagName: "script",
attributes: { attributes: {
type: 'application/ld+json', type: "application/ld+json",
}, },
innerHTML: JSON.stringify({ innerHTML: JSON.stringify({
'@context': 'https://schema.org/', "@context": "https://schema.org/",
'@type': 'localAI', "@type": "localAI",
name: 'Jan', name: "Jan",
description: "Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.", description:
keywords: "Jan, ChatGPT alternative, on-premises AI, local API server, local AI, llm, conversational AI, no-subscription fee", "Jan runs 100% offline on your computer, utilizes open-source AI models, prioritizes privacy, and is highly customizable.",
keywords:
"Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ",
applicationCategory: "BusinessApplication", applicationCategory: "BusinessApplication",
operatingSystem: "Multiple", operatingSystem: "Multiple",
url: 'https://jan.ai/', url: "https://jan.ai/",
}), }),
}, },
], ],
@ -234,10 +262,10 @@ const config = {
prism: { prism: {
theme: darkCodeTheme, theme: darkCodeTheme,
darkTheme: darkCodeTheme, darkTheme: darkCodeTheme,
additionalLanguages: ["python"], additionalLanguages: ["python", "powershell", "bash"],
}, },
colorMode: { colorMode: {
defaultMode: "dark", defaultMode: "light",
disableSwitch: false, disableSwitch: false,
respectPrefersColorScheme: false, respectPrefersColorScheme: false,
}, },

View File

@ -1,28 +1,32 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: API Reference title: API Reference
description: | description: >
# Introduction # Introduction
Jan API is compatible with the [OpenAI API](https://platform.openai.com/docs/api-reference).
version: "0.1.8" Jan API is compatible with the [OpenAI
API](https://platform.openai.com/docs/api-reference).
version: 0.1.8
contact: contact:
name: Jan Discord name: Jan Discord
url: https://discord.gg/7EcEz7MrvA url: "https://discord.gg/7EcEz7MrvA"
license: license:
name: AGPLv3 name: AGPLv3
url: https://github.com/janhq/nitro/blob/main/LICENSE url: "https://github.com/janhq/nitro/blob/main/LICENSE"
servers: servers:
- url: https://localhost:1337/v1/ - url: "https://localhost:1337/v1/"
tags: tags:
- name: Models - name: Models
description: List and describe the various models available in the API. description: List and describe the various models available in the API.
- name: Chat - name: Chat
description: | description: >
Given a list of messages comprising a conversation, the model will return a response. Given a list of messages comprising a conversation, the model will return
a response.
- name: Messages - name: Messages
description: | description: >
Messages capture a conversation's content. This can include the content from LLM responses and other metadata from [chat completions](/specs/chats). Messages capture a conversation's content. This can include the content
from LLM responses and other metadata from [chat
completions](/specs/chats).
- name: Threads - name: Threads
- name: Assistants - name: Assistants
description: Configures and utilizes different AI assistants for varied tasks description: Configures and utilizes different AI assistants for varied tasks
@ -44,8 +48,10 @@ paths:
- Chat - Chat
summary: | summary: |
Create chat completion Create chat completion
description: | description: >
Creates a model response for the given chat conversation. <a href = "https://platform.openai.com/docs/api-reference/chat/create"> Equivalent to OpenAI's create chat completion. </a> Creates a model response for the given chat conversation. <a href =
"https://platform.openai.com/docs/api-reference/chat/create"> Equivalent
to OpenAI's create chat completion. </a>
requestBody: requestBody:
content: content:
application/json: application/json:
@ -59,9 +65,10 @@ paths:
schema: schema:
$ref: "specs/chat.yaml#/components/schemas/ChatCompletionResponse" $ref: "specs/chat.yaml#/components/schemas/ChatCompletionResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: >
curl -X POST 'http://localhost:3982/inferences/llamacpp/chat_completion' \ curl -X POST
'http://localhost:3982/inferences/llamacpp/chat_completion' \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"llama_model_path": "/path/to/your/model.gguf", "llama_model_path": "/path/to/your/model.gguf",
@ -72,16 +79,17 @@ paths:
}, },
] ]
}' }'
### MODELS
/models: /models:
get: get:
operationId: listModels operationId: listModels
tags: tags:
- Models - Models
summary: List models summary: List models
description: | description: >
Lists the currently available models, and provides basic information about each one such as the owner and availability. <a href = "https://platform.openai.com/docs/api-reference/models/list"> Equivalent to OpenAI's list model. </a> Lists the currently available models, and provides basic information
about each one such as the owner and availability. <a href =
"https://platform.openai.com/docs/api-reference/models/list"> Equivalent
to OpenAI's list model. </a>
responses: responses:
"200": "200":
description: OK description: OK
@ -90,7 +98,7 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/ListModelsResponse" $ref: "specs/models.yaml#/components/schemas/ListModelsResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl https://localhost:1337/v1/models curl https://localhost:1337/v1/models
post: post:
@ -108,27 +116,29 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/DownloadModelResponse" $ref: "specs/models.yaml#/components/schemas/DownloadModelResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X POST https://localhost:1337/v1/models curl -X POST https://localhost:1337/v1/models
/models/{model_id}: "/models/{model_id}":
get: get:
operationId: retrieveModel operationId: retrieveModel
tags: tags:
- Models - Models
summary: Retrieve model summary: Retrieve model
description: | description: >
Get a model instance, providing basic information about the model such as the owner and permissioning. <a href = "https://platform.openai.com/docs/api-reference/models/retrieve"> Equivalent to OpenAI's retrieve model. </a> Get a model instance, providing basic information about the model such
as the owner and permissioning. <a href =
"https://platform.openai.com/docs/api-reference/models/retrieve">
Equivalent to OpenAI's retrieve model. </a>
parameters: parameters:
- in: path - in: path
name: model_id name: model_id
required: true required: true
schema: schema:
type: string type: string
# ideally this will be an actual ID, so this will always work from browser
example: zephyr-7b example: zephyr-7b
description: | description: |
The ID of the model to use for this request The ID of the model to use for this request.
responses: responses:
"200": "200":
description: OK description: OK
@ -137,16 +147,18 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/GetModelResponse" $ref: "specs/models.yaml#/components/schemas/GetModelResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl https://localhost:1337/v1/models/zephyr-7b curl https://localhost:1337/v1/models/{model_id}
delete: delete:
operationId: deleteModel operationId: deleteModel
tags: tags:
- Models - Models
summary: Delete model summary: Delete model
description: | description: >
Delete a model. <a href = "https://platform.openai.com/docs/api-reference/models/delete"> Equivalent to OpenAI's delete model. </a> Delete a model. <a href =
"https://platform.openai.com/docs/api-reference/models/delete">
Equivalent to OpenAI's delete model. </a>
parameters: parameters:
- in: path - in: path
name: model name: model
@ -164,10 +176,10 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/DeleteModelResponse" $ref: "specs/models.yaml#/components/schemas/DeleteModelResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X DELETE https://localhost:1337/v1/models/zephyr-7b curl -X DELETE https://localhost:1337/v1/models/{model_id}
/models/{model_id}/start: "/models/{model_id}/start":
put: put:
operationId: startModel operationId: startModel
tags: tags:
@ -181,7 +193,6 @@ paths:
required: true required: true
schema: schema:
type: string type: string
# ideally this will be an actual ID, so this will always work from browser
example: zephyr-7b example: zephyr-7b
description: | description: |
The ID of the model to use for this request The ID of the model to use for this request
@ -193,10 +204,10 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/StartModelResponse" $ref: "specs/models.yaml#/components/schemas/StartModelResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X PUT https://localhost:1337/v1/models/zephyr-7b/start curl -X PUT https://localhost:1337/v1/models/{model_id}/start
/models/{model_id}/stop: "/models/{model_id}/stop":
put: put:
operationId: stopModel operationId: stopModel
tags: tags:
@ -210,7 +221,6 @@ paths:
required: true required: true
schema: schema:
type: string type: string
# ideally this will be an actual ID, so this will always work from browser
example: zephyr-7b example: zephyr-7b
description: The ID of the model to use for this request description: The ID of the model to use for this request
responses: responses:
@ -221,19 +231,19 @@ paths:
schema: schema:
$ref: "specs/models.yaml#/components/schemas/StopModelResponse" $ref: "specs/models.yaml#/components/schemas/StopModelResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X PUT https://localhost:1337/v1/models/zephyr-7b/stop curl -X PUT https://localhost:1337/v1/models/{model_id}/stop
### THREADS
/threads: /threads:
post: post:
operationId: createThread operationId: createThread
tags: tags:
- Threads - Threads
summary: Create thread summary: Create thread
description: | description: >
Create a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/createThread"> Equivalent to OpenAI's create thread. </a> Create a thread. <a href =
"https://platform.openai.com/docs/api-reference/threads/createThread">
Equivalent to OpenAI's create thread. </a>
requestBody: requestBody:
required: false required: false
content: content:
@ -243,18 +253,18 @@ paths:
properties: properties:
messages: messages:
type: array type: array
description: "Initial set of messages for the thread." description: Initial set of messages for the thread.
items: items:
$ref: 'specs/threads.yaml#/components/schemas/ThreadMessageObject' $ref: "specs/threads.yaml#/components/schemas/ThreadMessageObject"
responses: responses:
"200": "200":
description: Thread created successfully description: Thread created successfully
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/threads.yaml#/components/schemas/CreateThreadResponse' $ref: "specs/threads.yaml#/components/schemas/CreateThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "cURL" - lang: cURL
source: | source: |
curl -X POST http://localhost:1337/v1/threads \ curl -X POST http://localhost:1337/v1/threads \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
@ -283,33 +293,38 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: 'specs/threads.yaml#/components/schemas/ThreadObject' $ref: "specs/threads.yaml#/components/schemas/ThreadObject"
example: example:
- id: "thread_abc123" - id: thread_abc123
object: "thread" object: thread
created_at: 1699014083 created_at: 1699014083
assistants: ["assistant-001"] assistants:
- assistant-001
metadata: {} metadata: {}
messages: [] messages: []
- id: "thread_abc456" - id: thread_abc456
object: "thread" object: thread
created_at: 1699014083 created_at: 1699014083
assistants: ["assistant-002", "assistant-003"] assistants:
- assistant-002
- assistant-003
metadata: {} metadata: {}
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl http://localhost:1337/v1/threads \ curl http://localhost:1337/v1/threads \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
"/threads/{thread_id}":
/threads/{thread_id}:
get: get:
operationId: getThread operationId: getThread
tags: tags:
- Threads - Threads
summary: Retrieve thread summary: Retrieve thread
description: | description: >
Retrieves detailed information about a specific thread using its thread_id. <a href = "https://platform.openai.com/docs/api-reference/threads/getThread"> Equivalent to OpenAI's retrieve thread. </a> Retrieves detailed information about a specific thread using its
thread_id. <a href =
"https://platform.openai.com/docs/api-reference/threads/getThread">
Equivalent to OpenAI's retrieve thread. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -319,7 +334,6 @@ paths:
example: thread_abc123 example: thread_abc123
description: | description: |
The ID of the thread to retrieve. The ID of the thread to retrieve.
responses: responses:
"200": "200":
description: Thread details retrieved successfully description: Thread details retrieved successfully
@ -328,7 +342,7 @@ paths:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: "specs/threads.yaml#/components/schemas/GetThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl http://localhost:1337/v1/threads/{thread_id} curl http://localhost:1337/v1/threads/{thread_id}
post: post:
@ -336,8 +350,10 @@ paths:
tags: tags:
- Threads - Threads
summary: Modify thread summary: Modify thread
description: | description: >
Modifies a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/modifyThread"> Equivalent to OpenAI's modify thread. </a> Modifies a thread. <a href =
"https://platform.openai.com/docs/api-reference/threads/modifyThread">
Equivalent to OpenAI's modify thread. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -347,7 +363,6 @@ paths:
example: thread_abc123 example: thread_abc123
description: | description: |
The ID of the thread to be modified. The ID of the thread to be modified.
requestBody: requestBody:
required: false required: false
content: content:
@ -357,38 +372,40 @@ paths:
properties: properties:
messages: messages:
type: array type: array
description: "Set of messages to update in the thread." description: Set of messages to update in the thread.
items: items:
$ref: 'specs/threads.yaml#/components/schemas/ThreadMessageObject' $ref: "specs/threads.yaml#/components/schemas/ThreadMessageObject"
responses: responses:
"200": "200":
description: Thread modified successfully description: Thread modified successfully
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/threads.yaml#/components/schemas/ModifyThreadResponse' $ref: "specs/threads.yaml#/components/schemas/ModifyThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X POST http://localhost:1337/v1/threads/{thread_id} \ curl -X POST http://localhost:1337/v1/threads/{thread_id} \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"messages": [{ "messages": [{
"role": "user", "role": "user",
"content": "Hello, what is AI?", "content": "Hello, what is AI?",
"file_ids": ["file-abc123"] "file_ids": ["file-abc123"]
}, { }, {
"role": "user", "role": "user",
"content": "How does AI work? Explain it in simple terms." "content": "How does AI work? Explain it in simple terms."
}] }]
}' }'
delete: delete:
operationId: deleteThread operationId: deleteThread
tags: tags:
- Threads - Threads
summary: Delete thread summary: Delete thread
description: | description: >
Delete a thread. <a href = "https://platform.openai.com/docs/api-reference/threads/deleteThread"> Equivalent to OpenAI's delete thread. </a> Delete a thread. <a href =
"https://platform.openai.com/docs/api-reference/threads/deleteThread">
Equivalent to OpenAI's delete thread. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -404,20 +421,19 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/threads.yaml#/components/schemas/DeleteThreadResponse' $ref: "specs/threads.yaml#/components/schemas/DeleteThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X DELETE http://localhost:1337/v1/threads/{thread_id} curl -X DELETE http://localhost:1337/v1/threads/{thread_id}
"/threads/{thread_id}/assistants":
/threads/{thread_id}/assistants:
get: get:
operationId: getThreadAssistants operationId: getThreadAssistants
tags: tags:
- Threads - Threads
summary: Get Thread.Assistants summary: Get Thread.Assistants
description: | description: |
Can achieve this goal by calling Get thread API Can achieve this goal by calling Get thread API.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -434,29 +450,26 @@ paths:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: "specs/threads.yaml#/components/schemas/GetThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl http://localhost:1337/v1/threads/{thread_id}/assistants curl http://localhost:1337/v1/threads/{thread_id}/assistants
"/threads/{thread_id}/assistants/{assistants_id}":
/threads/{thread_id}/assistants/{assistants_id}:
post: post:
operationId: postThreadAssistants operationId: postThreadAssistants
tags: tags:
- Threads - Threads
summary: Modify Thread.Assistants summary: Modify Thread.Assistants
description: | description: >
Can achieve this goal by calling Modify Assistant API with
thread.assistant[].
Can achieve this goal by calling Modify Assistant API with thread.assistant[] "/threads/{thread_id}/":
/threads/{thread_id}/:
get: get:
operationId: listThreadMessage operationId: listThreadMessage
tags: tags:
- Threads - Threads
summary: List Thread.Messages summary: List Thread.Messages
description: | description: |
Can achieve this goal by calling Get Thread API Can achieve this goal by calling Get Thread API.
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -473,19 +486,246 @@ paths:
schema: schema:
$ref: "specs/threads.yaml#/components/schemas/GetThreadResponse" $ref: "specs/threads.yaml#/components/schemas/GetThreadResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl http://localhost:1337/v1/threads/{thread_id} curl http://localhost:1337/v1/threads/{thread_id}
/assistants/:
### MESSAGES get:
/threads/{thread_id}/messages: operationId: listAssistants
tags:
- Assistants
summary: List assistants
description: >
Return a list of assistants. <a href =
"https://platform.openai.com/docs/api-reference/assistants/listAssistants">
Equivalent to OpenAI's list assistants. </a>
responses:
"200":
description: List of threads retrieved successfully
content:
application/json:
schema:
type: array
example:
- id: asst_abc123
object: assistant
version: 1
created_at: 1698984975
name: Math Tutor
description: null
avatar: "https://pic.png"
models:
- model_id: model_0
instructions: Be concise
events:
in: []
out: []
metadata: {}
- id: asst_abc456
object: assistant
version: 1
created_at: 1698984975
name: Physics Tutor
description: null
avatar: "https://pic.png"
models:
- model_id: model_1
instructions: Be concise!
events:
in: []
out: []
metadata: {}
responses: null
x-codeSamples:
- lang: cURL
source: |
curl http://localhost:1337/v1/assistants \
-H "Content-Type: application/json" \
post:
operationId: createAssistant
tags:
- Assistants
summary: Create assistant
description: >
Create an assistant with a model and instructions. <a href =
"https://platform.openai.com/docs/api-reference/assistants/createAssistant">
Equivalent to OpenAI's create assistants. </a>
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
models:
type: array
description: >-
List of models associated with the assistant. Jan-specific
property.
items:
type: object
properties:
model_id:
type: string
example: model_0
responses:
"200":
description: null
content:
application/json:
schema:
$ref: >-
specs/assistants.yaml#/components/schemas/CreateAssistantResponse
x-codeSamples:
- lang: cURL
source: |
curl http://localhost:1337/v1/assistants \
-H "Content-Type: application/json" \
-d '{
"models": [
{
"model_id": "model_0"
}
]
}'
"/assistants/{assistant_id}":
get:
operationId: getAssistant
tags:
- Assistants
summary: Retrieve assistant
description: >
Retrieves an assistant. <a href =
"https://platform.openai.com/docs/api-reference/assistants/getAssistant">
Equivalent to OpenAI's retrieve assistants. </a>
parameters:
- in: path
name: assistant_id
required: true
schema:
type: string
example: asst_abc123
description: |
The ID of the assistant to retrieve.
responses:
"200":
description: null
content:
application/json:
schema:
$ref: >-
specs/assistants.yaml#/components/schemas/RetrieveAssistantResponse
x-codeSamples:
- lang: cURL
source: |
curl http://localhost:1337/v1/assistants/{assistant_id} \
-H "Content-Type: application/json" \
post:
operationId: modifyAssistant
tags:
- Assistants
summary: Modify assistant
description: >
Modifies an assistant. <a href =
"https://platform.openai.com/docs/api-reference/assistants/modifyAssistant">
Equivalent to OpenAI's modify assistant. </a>
parameters:
- in: path
name: assistant_id
required: true
schema:
type: string
example: asst_abc123
description: |
The ID of the assistant to modify.
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
models:
type: array
description: >-
List of models associated with the assistant. Jan-specific
property.
items:
type: object
properties:
model_id:
type: string
example: model_0
name:
type: string
description: Name of the assistant.
example: Physics Tutor
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise!
responses:
"200":
description: null
content:
application/json:
schema:
$ref: >-
specs/assistants.yaml#/components/schemas/ModifyAssistantResponse
x-codeSamples:
- lang: cURL
source: |
curl http://localhost:1337/v1/assistants/{assistant_id} \
-H "Content-Type: application/json" \
-d '{
"models": [
{
"model_id": "model_0"
}
],
"name": "Physics Tutor",
"instructions": "Be concise!",
}'
delete:
operationId: deleteAssistant
tags:
- Assistants
summary: Delete assistant
description: >
Delete an assistant. <a href =
"https://platform.openai.com/docs/api-reference/assistants/deleteAssistant">
Equivalent to OpenAI's delete assistant. </a>
parameters:
- in: path
name: assistant_id
required: true
schema:
type: string
example: asst_abc123
description: |
The ID of the assistant to delete.
responses:
"200":
description: Deletion status
content:
application/json:
schema:
$ref: >-
specs/assistants.yaml#/components/schemas/DeleteAssistantResponse
x-codeSamples:
- lang: cURL
source: |
curl -X DELETE http://localhost:1337/v1/assistants/{assistant_id}
"/threads/{thread_id}/messages":
get: get:
operationId: listMessages operationId: listMessages
tags: tags:
- Messages - Messages
summary: List messages summary: List messages
description: | description: >
Retrieves all messages from the given thread. <a href = "https://platform.openai.com/docs/api-reference/messages/listMessages"> Equivalent to OpenAI's list messages. </a> Retrieves all messages from the given thread. <a href =
"https://platform.openai.com/docs/api-reference/messages/listMessages">
Equivalent to OpenAI's list messages. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -503,7 +743,7 @@ paths:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/ListMessagesResponse" $ref: "specs/messages.yaml#/components/schemas/ListMessagesResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl http://localhost:1337/v1/threads/{thread_id}/messages \ curl http://localhost:1337/v1/threads/{thread_id}/messages \
-H "Content-Type: application/json" -H "Content-Type: application/json"
@ -512,8 +752,10 @@ paths:
tags: tags:
- Messages - Messages
summary: Create message summary: Create message
description: | description: >
Create a message. <a href = "https://platform.openai.com/docs/api-reference/messages/createMessage"> Equivalent to OpenAI's list messages. </a> Create a message. <a href =
"https://platform.openai.com/docs/api-reference/messages/createMessage">
Equivalent to OpenAI's list messages. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -533,18 +775,16 @@ paths:
role: role:
type: string type: string
description: | description: |
"Role of the sender, either 'user' or 'assistant'." Role of the sender, either 'user' or 'assistant'.
example: user
<span style="color:#228B22">OpenAI compatible</span> enum:
example: "user" - user
enum: ["user", "assistant"] - assistant
content: content:
type: string type: string
description: | description: |
"Text content of the message." Text content of the message.
example: How does AI work? Explain it in simple terms.
<span style="color:#228B22">OpenAI compatible</span>
example: "How does AI work? Explain it in simple terms."
required: required:
- role - role
- content - content
@ -556,23 +796,25 @@ paths:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/CreateMessageResponse" $ref: "specs/messages.yaml#/components/schemas/CreateMessageResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: |
curl -X POST http://localhost:1337/v1/threads/{thread_id}/messages \ curl -X POST http://localhost:1337/v1/threads/{thread_id}/messages \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{ -d '{
"role": "user", "role": "user",
"content": "How does AI work? Explain it in simple terms." "content": "How does AI work? Explain it in simple terms."
}' }'
"/threads/{thread_id}/messages/{message_id}":
/threads/{thread_id}/messages/{message_id}:
get: get:
operationId: retrieveMessage operationId: retrieveMessage
tags: tags:
- Messages - Messages
summary: Retrieve message summary: Retrieve message
description: | description: >
Retrieve a specific message from a thread using its thread_id and message_id. <a href = "https://platform.openai.com/docs/api-reference/messages/getMessage"> Equivalent to OpenAI's retrieve messages. </a> Retrieve a specific message from a thread using its thread_id and
message_id. <a href =
"https://platform.openai.com/docs/api-reference/messages/getMessage">
Equivalent to OpenAI's retrieve messages. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -582,7 +824,6 @@ paths:
example: thread_abc123 example: thread_abc123
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -591,7 +832,6 @@ paths:
example: msg_abc123 example: msg_abc123
description: | description: |
The ID of the message to retrieve. The ID of the message to retrieve.
responses: responses:
"200": "200":
description: OK description: OK
@ -600,20 +840,22 @@ paths:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/GetMessageResponse" $ref: "specs/messages.yaml#/components/schemas/GetMessageResponse"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: >
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id} \ curl
-H "Content-Type: application/json" http://localhost:1337/v1/threads/{thread_id}/messages/{message_id} \
-H "Content-Type: application/json"
/threads/{thread_id}/messages/{message_id}/files: "/threads/{thread_id}/messages/{message_id}/files":
get: get:
operationId: listMessageFiles operationId: listMessageFiles
tags: tags:
- Messages - Messages
summary: | summary: |
List message files List message files
description: | description: >
Returns a list of message files. <a href = "https://platform.openai.com/docs/api-reference/messages/listMessageFiles"> Equivalent to OpenAI's list message files. </a> Returns a list of message files. <a href =
"https://platform.openai.com/docs/api-reference/messages/listMessageFiles">
Equivalent to OpenAI's list message files. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -623,7 +865,6 @@ paths:
example: thread_abc123 example: thread_abc123
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -632,28 +873,32 @@ paths:
example: msg_abc123 example: msg_abc123
description: | description: |
The ID of the message whose files are to be listed. The ID of the message whose files are to be listed.
responses: responses:
"200": "200":
description: List of files retrieved successfully description: List of files retrieved successfully
content: content:
application/json: application/json:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/ListMessageFilesResponse" $ref: >-
specs/messages.yaml#/components/schemas/ListMessageFilesResponse
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: >
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files \ curl
http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files
\
-H "Content-Type: application/json" -H "Content-Type: application/json"
"/threads/{thread_id}/messages/{message_id}/files/{file_id}":
/threads/{thread_id}/messages/{message_id}/files/{file_id}:
get: get:
operationId: retrieveMessageFile operationId: retrieveMessageFile
tags: tags:
- Messages - Messages
summary: Retrieve message file summary: Retrieve message file
description: | description: >
Retrieves a file associated with a specific message in a thread. <a href = "https://platform.openai.com/docs/api-reference/messages/getMessageFile"> Equivalent to OpenAI's retrieve message file. </a> Retrieves a file associated with a specific message in a thread. <a
href =
"https://platform.openai.com/docs/api-reference/messages/getMessageFile">
Equivalent to OpenAI's retrieve message file. </a>
parameters: parameters:
- in: path - in: path
name: thread_id name: thread_id
@ -663,7 +908,6 @@ paths:
example: thread_abc123 example: thread_abc123
description: | description: |
The ID of the thread containing the message. The ID of the thread containing the message.
- in: path - in: path
name: message_id name: message_id
required: true required: true
@ -672,7 +916,6 @@ paths:
example: msg_abc123 example: msg_abc123
description: | description: |
The ID of the message associated with the file. The ID of the message associated with the file.
- in: path - in: path
name: file_id name: file_id
required: true required: true
@ -681,7 +924,6 @@ paths:
example: file-abc123 example: file-abc123
description: | description: |
The ID of the file to retrieve. The ID of the file to retrieve.
responses: responses:
"200": "200":
description: File retrieved successfully description: File retrieved successfully
@ -690,17 +932,20 @@ paths:
schema: schema:
$ref: "specs/messages.yaml#/components/schemas/MessageFileObject" $ref: "specs/messages.yaml#/components/schemas/MessageFileObject"
x-codeSamples: x-codeSamples:
- lang: "curl" - lang: cURL
source: | source: >
curl http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files/{file_id} \ curl
http://localhost:1337/v1/threads/{thread_id}/messages/{message_id}/files/{file_id}
\
-H "Content-Type: application/json" -H "Content-Type: application/json"
x-webhooks: x-webhooks:
ModelObject: ModelObject:
post: post:
summary: The model object summary: The model object
description: | description: >
Describe a model offering that can be used with the API. <a href = "https://platform.openai.com/docs/api-reference/models/object"> Equivalent to OpenAI's model object. </a> Describe a model offering that can be used with the API. <a href =
"https://platform.openai.com/docs/api-reference/models/object">
Equivalent to OpenAI's model object. </a>
operationId: ModelObject operationId: ModelObject
tags: tags:
- Models - Models
@ -708,12 +953,29 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/models.yaml#/components/schemas/ModelObject' $ref: "specs/models.yaml#/components/schemas/ModelObject"
AssistantObject:
post:
summary: The assistant object
description: >
Build assistants that can call models and use tools to perform tasks.
<a href = "https://platform.openai.com/docs/api-reference/assistants">
Equivalent to OpenAI's assistants object. </a>
operationId: AssistantObjects
tags:
- Assistants
requestBody:
content:
application/json:
schema:
$ref: "specs/assistants.yaml#/components/schemas/AssistantObject"
MessageObject: MessageObject:
post: post:
summary: The message object summary: The message object
description: | description: >
Information about a message in the thread. <a href = "https://platform.openai.com/docs/api-reference/messages/object"> Equivalent to OpenAI's message object. </a> Information about a message in the thread. <a href =
"https://platform.openai.com/docs/api-reference/messages/object">
Equivalent to OpenAI's message object. </a>
operationId: MessageObject operationId: MessageObject
tags: tags:
- Messages - Messages
@ -721,11 +983,14 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/messages.yaml#/components/schemas/MessageObject' $ref: "specs/messages.yaml#/components/schemas/MessageObject"
ThreadObject: ThreadObject:
post: post:
summary: The thread object summary: The thread object
description: Represents a thread that contains messages. <a href = "https://platform.openai.com/docs/api-reference/threads/object"> Equivalent to OpenAI's thread object. </a> description: >-
Represents a thread that contains messages. <a href =
"https://platform.openai.com/docs/api-reference/threads/object">
Equivalent to OpenAI's thread object. </a>
operationId: ThreadObject operationId: ThreadObject
tags: tags:
- Threads - Threads
@ -733,4 +998,4 @@ x-webhooks:
content: content:
application/json: application/json:
schema: schema:
$ref: 'specs/threads.yaml#/components/schemas/ThreadObject' $ref: "specs/threads.yaml#/components/schemas/ThreadObject"

View File

@ -1,59 +0,0 @@
AssistantObject:
type: object
properties:
avatar:
type: string
description: "URL of the assistant's avatar. Jan-specific property."
example: "https://lala.png"
id:
type: string
description: "The identifier of the assistant."
example: "asst_abc123"
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: "assistant"
version:
type: integer
description: "Version number of the assistant."
example: 1
created_at:
type: integer
format: int64
description: "Unix timestamp representing the creation time of the assistant."
name:
type: string
description: "Name of the assistant."
example: "Math Tutor"
description:
type: string
description: "Description of the assistant. Can be null."
models:
type: array
description: "List of models associated with the assistant. Jan-specific property."
items:
type: object
properties:
model_id:
type: string
# Additional properties for models can be added here
events:
type: object
description: "Event subscription settings for the assistant."
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
# If there are specific event types, they can be detailed here
metadata:
type: object
description: "Metadata associated with the assistant."
required:
- name
- models
- events

View File

@ -0,0 +1,318 @@
components:
schemas:
AssistantObject:
type: object
properties:
id:
type: string
description: The identifier of the assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: assistant
version:
type: integer
description: Version number of the assistant.
example: 1
created_at:
type: integer
format: int64
description: Unix timestamp representing the creation time of the assistant.
example: 1698984975
name:
type: string
description: Name of the assistant.
example: Math Tutor
description:
type: string
description: Description of the assistant. Can be null.
example: null
avatar:
type: string
description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png"
models:
type: array
description: List of models associated with the assistant. Jan-specific property.
items:
type: object
properties:
model_id:
type: string
example: model_0
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise
events:
type: object
description: Event subscription settings for the assistant.
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
metadata:
type: object
description: Metadata associated with the assistant.
ListAssistantsResponse: null
CreateAssistantResponse:
type: object
properties:
id:
type: string
description: The identifier of the assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: assistant
version:
type: integer
description: Version number of the assistant.
example: 1
created_at:
type: integer
format: int64
description: Unix timestamp representing the creation time of the assistant.
example: 1698984975
name:
type: string
description: Name of the assistant.
example: Math Tutor
description:
type: string
description: Description of the assistant. Can be null.
example: null
avatar:
type: string
description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png"
models:
type: array
description: List of models associated with the assistant. Jan-specific property.
items:
type: object
properties:
model_id:
type: string
example: model_0
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise
events:
type: object
description: Event subscription settings for the assistant.
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
metadata:
type: object
description: Metadata associated with the assistant.
RetrieveAssistantResponse:
type: object
properties:
id:
type: string
description: The identifier of the assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: assistant
version:
type: integer
description: Version number of the assistant.
example: 1
created_at:
type: integer
format: int64
description: Unix timestamp representing the creation time of the assistant.
example: 1698984975
name:
type: string
description: Name of the assistant.
example: Math Tutor
description:
type: string
description: Description of the assistant. Can be null.
example: null
avatar:
type: string
description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png"
models:
type: array
description: List of models associated with the assistant. Jan-specific property.
items:
type: object
properties:
model_id:
type: string
example: model_0
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise
events:
type: object
description: Event subscription settings for the assistant.
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
metadata:
type: object
description: Metadata associated with the assistant.
ModifyAssistantObject:
type: object
properties:
id:
type: string
description: The identifier of the assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: assistant
version:
type: integer
description: Version number of the assistant.
example: 1
created_at:
type: integer
format: int64
description: Unix timestamp representing the creation time of the assistant.
example: 1698984975
name:
type: string
description: Name of the assistant.
example: Math Tutor
description:
type: string
description: Description of the assistant. Can be null.
example: null
avatar:
type: string
description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png"
models:
type: array
description: List of models associated with the assistant. Jan-specific property.
items:
type: object
properties:
model_id:
type: string
example: model_0
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise
events:
type: object
description: Event subscription settings for the assistant.
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
metadata:
type: object
description: Metadata associated with the assistant.
ModifyAssistantResponse:
type: object
properties:
id:
type: string
description: The identifier of the assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating it's an assistant."
default: assistant
version:
type: integer
description: Version number of the assistant.
example: 1
created_at:
type: integer
format: int64
description: Unix timestamp representing the creation time of the assistant.
example: 1698984975
name:
type: string
description: Name of the assistant.
example: Physics Tutor
description:
type: string
description: Description of the assistant. Can be null.
example: null
avatar:
type: string
description: URL of the assistant's avatar. Jan-specific property.
example: "https://pic.png"
models:
type: array
description: List of models associated with the assistant. Jan-specific property.
items:
type: object
properties:
model_id:
type: string
example: model_0
instructions:
type: string
description: A system prompt for the assistant.
example: Be concise!
events:
type: object
description: Event subscription settings for the assistant.
properties:
in:
type: array
items:
type: string
out:
type: array
items:
type: string
metadata:
type: object
description: Metadata associated with the assistant.
DeleteAssistantResponse:
type: object
properties:
id:
type: string
description: The identifier of the deleted assistant.
example: asst_abc123
object:
type: string
description: "Type of the object, indicating the assistant has been deleted."
example: assistant.deleted
deleted:
type: boolean
description: Indicates whether the assistant was successfully deleted.
example: true

View File

@ -6,48 +6,59 @@ components:
messages: messages:
type: arrays type: arrays
description: | description: |
Contains input data or prompts for the model to process Contains input data or prompts for the model to process.
example: example:
[ - content: "Hello there :wave:"
{ "content": "Hello there :wave:", "role": "assistant" }, role: assistant
{ "content": "Can you write a long story", "role": "user" }, - content: Can you write a long story
] role: user
stream: stream:
type: boolean type: boolean
default: true default: true
description: Enables continuous output generation, allowing for streaming of model responses description: >-
Enables continuous output generation, allowing for streaming of
model responses.
model: model:
type: string type: string
example: "gpt-3.5-turbo" example: gpt-3.5-turbo
description: Specifies the model being used for inference or processing tasks description: Specifies the model being used for inference or processing tasks.
max_tokens: max_tokens:
type: number type: number
default: 2048 default: 2048
description: The maximum number of tokens the model will generate in a single response description: >-
The maximum number of tokens the model will generate in a single
response.
stop: stop:
type: arrays type: arrays
example: ["hello"] example:
description: Defines specific tokens or phrases at which the model will stop generating further output - hello
description: >-
Defines specific tokens or phrases at which the model will stop
generating further output/
frequency_penalty: frequency_penalty:
type: number type: number
default: 0 default: 0
description: Adjusts the likelihood of the model repeating words or phrases in its output description: >-
Adjusts the likelihood of the model repeating words or phrases in
its output.
presence_penalty: presence_penalty:
type: number type: number
default: 0 default: 0
description: Influences the generation of new and varied concepts in the model's output description: >-
Influences the generation of new and varied concepts in the model's
output.
temperature: temperature:
type: number type: number
default: 0.7 default: 0.7
min: 0 min: 0
max: 1 max: 1
description: Controls the randomness of the model's output description: Controls the randomness of the model's output.
top_p: top_p:
type: number type: number
default: 0.95 default: 0.95
min: 0 min: 0
max: 1 max: 1
description: Set probability threshold for more relevant outputs description: Set probability threshold for more relevant outputs.
cache_prompt: cache_prompt:
type: boolean type: boolean
default: true default: true
@ -58,59 +69,62 @@ components:
messages: messages:
type: arrays type: arrays
description: | description: |
Contains input data or prompts for the model to process Contains input data or prompts for the model to process.
example: example:
[ - content: "Hello there :wave:"
{ "content": "Hello there :wave:", "role": "assistant" }, role: assistant
{ "content": "Can you write a long story", "role": "user" }, - content: Can you write a long story
] role: user
model: model:
type: string type: string
example: model-zephyr-7B example: model-zephyr-7B
description: | description: |
Specifies the model being used for inference or processing tasks Specifies the model being used for inference or processing tasks.
stream: stream:
type: boolean type: boolean
default: true default: true
description: | description: >
Enables continuous output generation, allowing for streaming of model responses Enables continuous output generation, allowing for streaming of
model responses.
max_tokens: max_tokens:
type: number type: number
default: 2048 default: 2048
description: | description: >
The maximum number of tokens the model will generate in a single response The maximum number of tokens the model will generate in a single
response.
stop: stop:
type: arrays type: arrays
example: ["hello"] example:
description: | - hello
Defines specific tokens or phrases at which the model will stop generating further output description: >
Defines specific tokens or phrases at which the model will stop
generating further output.
frequency_penalty: frequency_penalty:
type: number type: number
default: 0 default: 0
description: | description: >
Adjusts the likelihood of the model repeating words or phrases in its output Adjusts the likelihood of the model repeating words or phrases in
its output.
presence_penalty: presence_penalty:
type: number type: number
default: 0 default: 0
description: | description: >
Influences the generation of new and varied concepts in the model's output Influences the generation of new and varied concepts in the model's
output.
temperature: temperature:
type: number type: number
default: 0.7 default: 0.7
min: 0 min: 0
max: 1 max: 1
description: | description: |
Controls the randomness of the model's output Controls the randomness of the model's output.
top_p: top_p:
type: number type: number
default: 0.95 default: 0.95
min: 0 min: 0
max: 1 max: 1
description: | description: |
Set probability threshold for more relevant outputs Set probability threshold for more relevant outputs.
ChatCompletionResponse: ChatCompletionResponse:
type: object type: object
description: Description of the response structure description: Description of the response structure
@ -125,7 +139,7 @@ components:
type: string type: string
nullable: true nullable: true
example: null example: null
description: Reason for finishing the response, if applicable description: "Reason for finishing the response, if applicable"
index: index:
type: integer type: integer
example: 0 example: 0
@ -135,7 +149,7 @@ components:
properties: properties:
content: content:
type: string type: string
example: "Hello user. What can I help you with?" example: Hello user. What can I help you with?
description: Content of the message description: Content of the message
role: role:
type: string type: string

View File

@ -6,34 +6,37 @@ components:
id: id:
type: string type: string
description: | description: |
"Sequential or UUID identifier of the message." Sequential or UUID identifier of the message.
example: 0 example: 0
object: object:
type: string type: string
description: | description: |
"Type of the object, defaults to 'thread.message'." Type of the object, defaults to 'thread.message'.
example: thread.message example: thread.message
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: | description: |
"Unix timestamp representing the creation time of the message." Unix timestamp representing the creation time of the message.
thread_id: thread_id:
type: string type: string
description: | description: >
"Identifier of the thread to which this message belongs. Defaults to parent thread." Identifier of the thread to which this message belongs. Defaults to
example: "thread_asdf" parent thread.
example: thread_asdf
assistant_id: assistant_id:
type: string type: string
description: | description: >
"Identifier of the assistant involved in the message. Defaults to parent thread." Identifier of the assistant involved in the message. Defaults to
parent thread.
example: jan example: jan
role: role:
type: string type: string
enum: ["user", "assistant"] enum:
- user
- assistant
description: | description: |
"Role of the sender, either 'user' or 'assistant'." Role of the sender, either 'user' or 'assistant'.
content: content:
type: array type: array
items: items:
@ -42,37 +45,33 @@ components:
type: type:
type: string type: string
description: | description: |
"Type of content, e.g., 'text'." Type of content, e.g., 'text'.
text: text:
type: object type: object
properties: properties:
value: value:
type: string type: string
description: | description: |
"Text content of the message." Text content of the message.
example: "Hi!?" example: Hi!?
annotations: annotations:
type: array type: array
items: items:
type: string type: string
description: | description: |
"Annotations for the text content, if any." Annotations for the text content, if any.
example: [] example: []
metadata: metadata:
type: object type: object
description: | description: |
"Metadata associated with the message, defaults to an empty object." Metadata associated with the message, defaults to an empty object.
example: {} example: {}
GetMessageResponse: GetMessageResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the message." description: The identifier of the message.
example: msg_abc123 example: msg_abc123
object: object:
type: string type: string
@ -81,11 +80,11 @@ components:
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the message." description: Unix timestamp representing the creation time of the message.
example: 1699017614 example: 1699017614
thread_id: thread_id:
type: string type: string
description: "Identifier of the thread to which this message belongs." description: Identifier of the thread to which this message belongs.
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
@ -105,8 +104,8 @@ components:
properties: properties:
value: value:
type: string type: string
description: "Text content of the message." description: Text content of the message.
example: "How does AI work? Explain it in simple terms." example: How does AI work? Explain it in simple terms.
annotations: annotations:
type: array type: array
items: items:
@ -129,15 +128,14 @@ components:
example: null example: null
metadata: metadata:
type: object type: object
description: "Metadata associated with the message." description: Metadata associated with the message.
example: {} example: {}
CreateMessageResponse: CreateMessageResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the created message." description: The identifier of the created message.
example: msg_abc123 example: msg_abc123
object: object:
type: string type: string
@ -146,11 +144,11 @@ components:
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the message." description: Unix timestamp representing the creation time of the message.
example: 1699017614 example: 1699017614
thread_id: thread_id:
type: string type: string
description: "Identifier of the thread to which this message belongs." description: Identifier of the thread to which this message belongs.
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
@ -170,8 +168,8 @@ components:
properties: properties:
value: value:
type: string type: string
description: "Text content of the message." description: Text content of the message.
example: "How does AI work? Explain it in simple terms." example: How does AI work? Explain it in simple terms.
annotations: annotations:
type: array type: array
items: items:
@ -194,39 +192,37 @@ components:
example: null example: null
metadata: metadata:
type: object type: object
description: "Metadata associated with the message." description: Metadata associated with the message.
example: {} example: {}
ListMessagesResponse: ListMessagesResponse:
type: object type: object
properties: properties:
object: object:
type: string type: string
description: "Type of the object, indicating it's a list." description: "Type of the object, indicating it's a list."
default: "list" default: list
data: data:
type: array type: array
items: items:
$ref: '#/components/schemas/ListMessageObject' $ref: "#/components/schemas/ListMessageObject"
first_id: first_id:
type: string type: string
description: "Identifier of the first message in the list." description: Identifier of the first message in the list.
example: "msg_abc123" example: msg_abc123
last_id: last_id:
type: string type: string
description: "Identifier of the last message in the list." description: Identifier of the last message in the list.
example: "msg_abc456" example: msg_abc456
has_more: has_more:
type: boolean type: boolean
description: "Indicates whether there are more messages to retrieve." description: Indicates whether there are more messages to retrieve.
example: false example: false
ListMessageObject: ListMessageObject:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the message." description: The identifier of the message.
example: msg_abc123 example: msg_abc123
object: object:
type: string type: string
@ -235,11 +231,11 @@ components:
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the message." description: Unix timestamp representing the creation time of the message.
example: 1699017614 example: 1699017614
thread_id: thread_id:
type: string type: string
description: "Identifier of the thread to which this message belongs." description: Identifier of the thread to which this message belongs.
example: thread_abc123 example: thread_abc123
role: role:
type: string type: string
@ -258,8 +254,8 @@ components:
properties: properties:
value: value:
type: string type: string
description: "Text content of the message." description: Text content of the message.
example: "How does AI work? Explain it in simple terms." example: How does AI work? Explain it in simple terms.
annotations: annotations:
type: array type: array
items: items:
@ -281,38 +277,36 @@ components:
example: null example: null
metadata: metadata:
type: object type: object
description: "Metadata associated with the message." description: Metadata associated with the message.
example: {} example: {}
MessageFileObject: MessageFileObject:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the file." description: The identifier of the file.
example: file-abc123 example: file-abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's a thread message file." description: Type of the object, indicating it's a thread message file.
example: thread.message.file example: thread.message.file
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the file." description: Unix timestamp representing the creation time of the file.
example: 1699061776 example: 1699061776
message_id: message_id:
type: string type: string
description: "Identifier of the message to which this file is associated." description: Identifier of the message to which this file is associated.
example: msg_abc123 example: msg_abc123
ListMessageFilesResponse: ListMessageFilesResponse:
type: object type: object
properties: properties:
object: object:
type: string type: string
description: "Type of the object, indicating it's a list." description: Type of the object, indicating it's a list.
default: "list" default: list
data: data:
type: array type: array
items: items:
$ref: '#/components/schemas/MessageFileObject' $ref: "#/components/schemas/MessageFileObject"

View File

@ -5,7 +5,8 @@ components:
properties: properties:
object: object:
type: string type: string
enum: [list] enum:
- list
data: data:
type: array type: array
items: items:
@ -13,68 +14,75 @@ components:
required: required:
- object - object
- data - data
Model: Model:
type: object type: object
properties: properties:
type: type:
type: string type: string
default: "model" default: model
description: "The type of the object." description: The type of the object.
version: version:
type: string type: string
default: "1" default: "1"
description: "The version number of the model." description: The version number of the model.
id: id:
type: string type: string
description: "Unique identifier used in chat-completions model_name, matches folder name." description: >-
example: "zephyr-7b" Unique identifier used in chat-completions model_name, matches
folder name.
example: zephyr-7b
name: name:
type: string type: string
description: "Name of the model." description: Name of the model.
example: "Zephyr 7B" example: Zephyr 7B
owned_by: owned_by:
type: string type: string
description: "Compatibility field for OpenAI." description: Compatibility field for OpenAI.
default: "" default: ""
created: created:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time." description: Unix timestamp representing the creation time.
description: description:
type: string type: string
description: "Description of the model." description: Description of the model.
state: state:
type: string type: string
enum: [null, "downloading", "ready", "starting", "stopping"] enum:
description: "Current state of the model." - null
- downloading
- ready
- starting
- stopping
description: Current state of the model.
format: format:
type: string type: string
description: "State format of the model, distinct from the engine." description: "State format of the model, distinct from the engine."
example: "ggufv3" example: ggufv3
source_url: source_url:
type: string type: string
format: uri format: uri
description: "URL to the source of the model." description: URL to the source of the model.
example: "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf" example: >-
https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
settings: settings:
type: object type: object
properties: properties:
ctx_len: ctx_len:
type: string type: string
description: "Context length." description: Context length.
example: "2048" example: "2048"
ngl: ngl:
type: string type: string
description: "Number of layers." description: Number of layers.
example: "100" example: "100"
embedding: embedding:
type: string type: string
description: "Indicates if embedding is enabled." description: Indicates if embedding is enabled.
example: "true" example: "true"
n_parallel: n_parallel:
type: string type: string
description: "Number of parallel processes." description: Number of parallel processes.
example: "4" example: "4"
additionalProperties: false additionalProperties: false
parameters: parameters:
@ -82,155 +90,237 @@ components:
properties: properties:
temperature: temperature:
type: string type: string
description: "Temperature setting for the model." description: Temperature setting for the model.
example: "0.7" example: "0.7"
token_limit: token_limit:
type: string type: string
description: "Token limit for the model." description: Token limit for the model.
example: "2048" example: "2048"
top_k: top_k:
type: string type: string
description: "Top-k setting for the model." description: Top-k setting for the model.
example: "0" example: "0"
top_p: top_p:
type: string type: string
description: "Top-p setting for the model." description: Top-p setting for the model.
example: "1" example: "1"
stream: stream:
type: string type: string
description: "Indicates if streaming is enabled." description: Indicates if streaming is enabled.
example: "true" example: "true"
additionalProperties: false additionalProperties: false
metadata: metadata:
type: object type: object
description: "Additional metadata." description: Additional metadata.
assets: assets:
type: array type: array
items: items:
type: string type: string
description: "List of assets related to the model." description: List of assets related to the model.
required: required:
- source_url - source_url
ModelObject: ModelObject:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: | description: |
"The identifier of the model." The identifier of the model.
example: zephyr-7b
example: "zephyr-7b"
object: object:
type: string type: string
description: | description: |
"The type of the object, indicating it's a model." The type of the object, indicating it's a model.
default: model
default: "model"
created: created:
type: integer type: integer
format: int64 format: int64
description: | description: |
"Unix timestamp representing the creation time of the model." Unix timestamp representing the creation time of the model.
example: 1253935178
example: "1253935178"
owned_by: owned_by:
type: string type: string
description: | description: |
"The entity that owns the model." The entity that owns the model.
example: _
example: "_"
GetModelResponse: GetModelResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the model." description: The identifier of the model.
example: "zephyr-7b" example: zephyr-7b
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: "Type of the object, indicating it's a model."
default: "model" default: model
created: created:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the model." description: Unix timestamp representing the creation time of the model.
owned_by: owned_by:
type: string type: string
description: "The entity that owns the model." description: The entity that owns the model.
example: "_" example: _
state: state:
type: string type: string
enum: [not_downloaded, downloaded, running, stopped] enum:
description: "The current state of the model." - not_downloaded
- downloaded
- running
- stopped
description: The current state of the model.
source_url: source_url:
type: string type: string
format: uri format: uri
description: "URL to the source of the model." description: URL to the source of the model.
example: "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf" example: >-
parameters: https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf
engine_parameters:
type: object
properties:
pre_prompt:
type: string
description: Predefined prompt used for setting up internal configurations.
default: ""
example: Initial setup complete.
system_prompt:
type: string
description: Prefix used for system-level prompts.
default: "SYSTEM: "
user_prompt:
type: string
description: Prefix used for user prompts.
default: "USER: "
ai_prompt:
type: string
description: Prefix used for assistant prompts.
default: "ASSISTANT: "
ngl:
type: integer
description: >-
Number of neural network layers loaded onto the GPU for
acceleration.
minimum: 0
maximum: 100
default: 100
example: 100
ctx_len:
type: integer
description: >-
Context length for model operations, varies based on the
specific model.
minimum: 128
maximum: 4096
default: 2048
example: 2048
n_parallel:
type: integer
description: >-
Number of parallel operations, relevant when continuous batching
is enabled.
minimum: 1
maximum: 10
default: 1
example: 4
cont_batching:
type: boolean
description: Indicates if continuous batching is used for processing.
default: false
example: false
cpu_threads:
type: integer
description: Number of threads allocated for CPU-based inference.
minimum: 1
example: 8
embedding:
type: boolean
description: Indicates if embedding layers are enabled in the model.
default: true
example: true
model_parameters:
type: object type: object
properties: properties:
ctx_len: ctx_len:
type: integer type: integer
description: "Context length." description: Maximum context length the model can handle.
minimum: 0
maximum: 4096
default: 2048
example: 2048 example: 2048
ngl: ngl:
type: integer type: integer
description: "Number of layers." description: Number of layers in the neural network.
minimum: 1
maximum: 100
default: 100
example: 100 example: 100
embedding: embedding:
type: boolean type: boolean
description: "Indicates if embedding is enabled." description: Indicates if embedding layers are used.
default: true
example: true example: true
n_parallel: n_parallel:
type: integer type: integer
description: "Number of parallel processes." description: Number of parallel processes the model can run.
minimum: 1
maximum: 10
default: 1
example: 4 example: 4
# pre_prompt:
# type: string
# description: "Predefined prompt for initiating the chat."
# example: "A chat between a curious user and an artificial intelligence"
# user_prompt:
# type: string
# description: "Format of user's prompt."
# example: "USER: "
# ai_prompt:
# type: string
# description: "Format of AI's response."
# example: "ASSISTANT: "
temperature: temperature:
type: string type: number
description: "Temperature setting for the model." description: >-
example: "0.7" Controls randomness in model's responses. Higher values lead to
more random responses.
minimum: 0
maximum: 2
default: 0.7
example: 0.7
token_limit: token_limit:
type: string type: integer
description: "Token limit for the model." description: >-
example: "2048" Maximum number of tokens the model can generate in a single
response.
minimum: 1
maximum: 4096
default: 2048
example: 2048
top_k: top_k:
type: string type: integer
description: "Top-k setting for the model." description: >-
example: "0" Limits the model to consider only the top k most likely next
tokens at each step.
minimum: 0
maximum: 100
default: 0
example: 0
top_p: top_p:
type: string type: number
description: "Top-p setting for the model." description: >-
example: "1" Nucleus sampling parameter. The model considers the smallest set
of tokens whose cumulative probability exceeds the top_p value.
minimum: 0
maximum: 1
default: 1
example: 1
metadata: metadata:
type: object type: object
properties: properties:
engine: engine:
type: string type: string
description: "The engine used by the model." description: The engine used by the model.
example: "llamacpp" enum:
- nitro
- openai
- hf_inference
quantization: quantization:
type: string type: string
description: "Quantization parameter of the model." description: Quantization parameter of the model.
example: "Q3_K_L" example: Q3_K_L
size: size:
type: string type: string
description: "Size of the model." description: Size of the model.
example: "7B" example: 7B
required: required:
- id - id
- object - object
@ -240,77 +330,71 @@ components:
- source_url - source_url
- parameters - parameters
- metadata - metadata
DeleteModelResponse: DeleteModelResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the model that was deleted." description: The identifier of the model that was deleted.
example: "model-zephyr-7B" example: model-zephyr-7B
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: Type of the object, indicating it's a model.
default: "model" default: model
deleted: deleted:
type: boolean type: boolean
description: "Indicates whether the model was successfully deleted." description: Indicates whether the model was successfully deleted.
example: true example: true
StartModelResponse: StartModelResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the model that was started." description: The identifier of the model that was started.
example: "model-zephyr-7B" example: model-zephyr-7B
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: Type of the object, indicating it's a model.
default: "model" default: model
state: state:
type: string type: string
description: "The current state of the model after the start operation." description: The current state of the model after the start operation.
example: "running" example: running
required: required:
- id - id
- object - object
- state - state
StopModelResponse: StopModelResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the model that was started." description: The identifier of the model that was started.
example: "model-zephyr-7B" example: model-zephyr-7B
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: Type of the object, indicating it's a model.
default: "model" default: model
state: state:
type: string type: string
description: "The current state of the model after the start operation." description: The current state of the model after the start operation.
example: "stopped" example: stopped
required: required:
- id - id
- object - object
- state - state
DownloadModelResponse: DownloadModelResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the model that was started." description: The identifier of the model that was started.
example: "model-zephyr-7B" example: model-zephyr-7B
object: object:
type: string type: string
description: "Type of the object, indicating it's a model." description: Type of the object, indicating it's a model.
default: "model" default: model
state: state:
type: string type: string
description: "The current state of the model after the start operation." description: The current state of the model after the start operation.
example: "downloaded" example: downloaded

View File

@ -6,123 +6,111 @@ components:
id: id:
type: string type: string
description: | description: |
"The identifier of the thread, defaults to foldername." The identifier of the thread, defaults to foldername.
example: thread_.... example: thread_....
object: object:
type: string type: string
description: | description: |
"Type of the object, defaults to thread." Type of the object, defaults to thread.
example: thread example: thread
title: title:
type: string type: string
description: | description: >
"A brief summary or description of the thread, defaults to an empty string." A brief summary or description of the thread, defaults to an empty
string.
example: funny physics joke
example: "funny physics joke"
assistants: assistants:
type: array type: array
description: | description: ""
items: items:
properties: properties:
assistant_id: assistant_id:
type: string type: string
description: | description: |
The identifier of assistant, defaults to "jan" The identifier of assistant, defaults to "jan"
example: jan example: jan
model: model:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: | description: ""
example: ... example: ...
settings: settings:
type: object type: object
description: | description: >
Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings") Defaults to and overrides assistant.json's "settings" (and
if none, then model.json "settings")
parameters: parameters:
type: object type: object
description: | description: >
Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters") Defaults to and overrides assistant.json's "parameters"
(and if none, then model.json "parameters")
created: created:
type: integer type: integer
format: int64 format: int64
description: | description: >
"Unix timestamp representing the creation time of the thread, defaults to file creation time." Unix timestamp representing the creation time of the thread,
defaults to file creation time.
example: 1231231 example: 1231231
metadata: metadata:
type: object type: object
description: | description: |
"Metadata associated with the thread, defaults to an empty object." Metadata associated with the thread, defaults to an empty object.
example: {} example: {}
GetThreadResponse: GetThreadResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the thread." description: The identifier of the thread.
example: thread_abc123 example: thread_abc123
object: object:
type: string type: string
description: "Type of the object" description: Type of the object
example: thread example: thread
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the thread." description: Unix timestamp representing the creation time of the thread.
example: 1699014083 example: 1699014083
assistants: assistants:
type: array type: array
items: items:
type: string type: string
description: "List of assistants involved in the thread." description: List of assistants involved in the thread.
example: ["assistant-001"] example:
- assistant-001
metadata: metadata:
type: object type: object
description: "Metadata associated with the thread." description: Metadata associated with the thread.
example: {} example: {}
messages: messages:
type: array type: array
items: items:
type: string type: string
description: "List of messages within the thread." description: List of messages within the thread.
example: [] example: []
CreateThreadResponse: CreateThreadResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the newly created thread." description: The identifier of the newly created thread.
example: thread_abc123 example: thread_abc123
object: object:
type: string type: string
description: "Type of the object, indicating it's a thread." description: Type of the object, indicating it's a thread.
example: thread example: thread
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the thread." description: Unix timestamp representing the creation time of the thread.
example: 1699014083 example: 1699014083
metadata: metadata:
type: object type: object
description: "Metadata associated with the newly created thread." description: Metadata associated with the newly created thread.
example: {} example: {}
ThreadMessageObject: ThreadMessageObject:
type: object type: object
properties: properties:
@ -130,21 +118,19 @@ components:
type: string type: string
description: | description: |
"Role of the sender, either 'user' or 'assistant'." "Role of the sender, either 'user' or 'assistant'."
enum:
enum: ["user", "assistant"] - user
- assistant
content: content:
type: string type: string
description: | description: |
"Text content of the message." "Text content of the message."
file_ids: file_ids:
type: array type: array
items: items:
type: string type: string
description: | description: |
"Array of file IDs associated with the message, if any." "Array of file IDs associated with the message, if any."
ModifyThreadResponse: ModifyThreadResponse:
type: object type: object
properties: properties:
@ -160,19 +146,18 @@ components:
created_at: created_at:
type: integer type: integer
format: int64 format: int64
description: "Unix timestamp representing the creation time of the thread." description: Unix timestamp representing the creation time of the thread.
example: 1699014083 example: 1699014083
metadata: metadata:
type: object type: object
description: "Metadata associated with the modified thread." description: Metadata associated with the modified thread.
example: {} example: {}
DeleteThreadResponse: DeleteThreadResponse:
type: object type: object
properties: properties:
id: id:
type: string type: string
description: "The identifier of the deleted thread." description: The identifier of the deleted thread.
example: thread_abc123 example: thread_abc123
object: object:
type: string type: string
@ -180,5 +165,5 @@ components:
example: thread.deleted example: thread.deleted
deleted: deleted:
type: boolean type: boolean
description: "Indicates whether the thread was successfully deleted." description: Indicates whether the thread was successfully deleted.
example: true example: true

View File

@ -38,6 +38,7 @@
"react-icons": "^4.11.0", "react-icons": "^4.11.0",
"redocusaurus": "^2.0.0", "redocusaurus": "^2.0.0",
"sass": "^1.69.3", "sass": "^1.69.3",
"tailwind-merge": "^2.1.0",
"tailwindcss": "^3.3.3" "tailwindcss": "^3.3.3"
}, },
"devDependencies": { "devDependencies": {

View File

@ -27,7 +27,7 @@ export default function AnnoncementBanner() {
return ( return (
<div className="h-10 w-full flex-shrink-0 bg-blue-600"> <div className="h-10 w-full flex-shrink-0 bg-blue-600">
<div className="container flex h-full items-center justify-between py-0.5"> <div className="px-4 lg:px-10 flex h-full items-center justify-between py-0.5">
<div className="flex h-6 items-center shadow-sm"> <div className="flex h-6 items-center shadow-sm">
<a <a
href="https://github.com/janhq/jan" href="https://github.com/janhq/jan"
@ -66,7 +66,12 @@ export default function AnnoncementBanner() {
<div className="flex items-center gap-x-3"> <div className="flex items-center gap-x-3">
{socials.map((social, i) => { {socials.map((social, i) => {
return ( return (
<a key={i} href={social.href} target="_blank"> <a
aria-label={`social-${i}`}
key={i}
href={social.href}
target="_blank"
>
{social.icon} {social.icon}
</a> </a>
); );

View File

@ -1,36 +1,37 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import axios from "axios"; import axios from "axios";
import { FaWindows, FaApple, FaLinux } from "react-icons/fa";
import { twMerge } from "tailwind-merge";
const systemsTemplate = [ const systemsTemplate = [
{ {
name: "Download for Mac (M1/M2)", name: "Mac M1, M2, M3",
logo: require("@site/static/img/apple-logo-white.png").default, logo: FaApple,
fileFormat: "{appname}-mac-arm64-{tag}.dmg", fileFormat: "{appname}-mac-arm64-{tag}.dmg",
comingSoon: false,
}, },
{ {
name: "Download for Mac (Intel)", name: "Mac (Intel)",
logo: require("@site/static/img/apple-logo-white.png").default, logo: FaApple,
fileFormat: "{appname}-mac-x64-{tag}.dmg", fileFormat: "{appname}-mac-x64-{tag}.dmg",
comingSoon: false,
}, },
{ {
name: "Download for Windows", name: "Windows",
logo: require("@site/static/img/windows-logo-white.png").default, logo: FaWindows,
fileFormat: "{appname}-win-x64-{tag}.exe", fileFormat: "{appname}-win-x64-{tag}.exe",
comingSoon: true,
}, },
{ {
name: "Download for Linux", name: "Linux",
logo: require("@site/static/img/linux-logo-white.png").default, logo: FaLinux,
fileFormat: "{appname}-linux-amd64-{tag}.deb", fileFormat: "{appname}-linux-amd64-{tag}.deb",
comingSoon: true,
}, },
]; ];
function classNames(...classes) { export default function DownloadApp() {
return classes.filter(Boolean).join(" ");
}
export default function DownloadLink() {
const [systems, setSystems] = useState(systemsTemplate); const [systems, setSystems] = useState(systemsTemplate);
const [defaultSystem, setDefaultSystem] = useState(systems[0]);
const getLatestReleaseInfo = async (repoOwner, repoName) => { const getLatestReleaseInfo = async (repoOwner, repoName) => {
const url = `https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`; const url = `https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`;
@ -50,30 +51,6 @@ export default function DownloadLink() {
return match ? match[1] : null; return match ? match[1] : null;
}; };
const changeDefaultSystem = async (systems) => {
const userAgent = navigator.userAgent;
const arc = await navigator?.userAgentData?.getHighEntropyValues([
"architecture",
]);
if (userAgent.includes("Windows")) {
// windows user
setDefaultSystem(systems[2]);
} else if (userAgent.includes("Linux")) {
// linux user
setDefaultSystem(systems[3]);
} else if (
userAgent.includes("Mac OS") &&
arc &&
arc.architecture === "arm"
) {
setDefaultSystem(systems[0]);
} else {
setDefaultSystem(systems[1]);
}
};
useEffect(() => { useEffect(() => {
const updateDownloadLinks = async () => { const updateDownloadLinks = async () => {
try { try {
@ -88,7 +65,7 @@ export default function DownloadLink() {
"Failed to extract appname from file name:", "Failed to extract appname from file name:",
firstAssetName firstAssetName
); );
changeDefaultSystem(systems);
return; return;
} }
@ -108,7 +85,6 @@ export default function DownloadLink() {
}); });
setSystems(updatedSystems); setSystems(updatedSystems);
changeDefaultSystem(updatedSystems);
} catch (error) { } catch (error) {
console.error("Failed to update download links:", error); console.error("Failed to update download links:", error);
} }
@ -118,10 +94,39 @@ export default function DownloadLink() {
}, []); }, []);
return ( return (
<div className="mt-2"> <div>
<a href={defaultSystem.href}> <div className="flex flex-col lg:flex-row items-center justify-center gap-4 mb-4">
<span className="text-blue-600 font-bold">Download Jan</span> <span className="text-zinc-500 text-lg font-medium inline-block">
</a> Download for PC
</span>
<div className="bg-yellow-50 text-yellow-700 space-x-2 px-4 py-2 border border-yellow-400 rounded-lg text-base">
<span>🚧</span>
<span className="font-semibold">Warning:</span>
<span className="font-medium">
Jan is in the process of being built. Expect bugs!
</span>
</div>
</div>
<div className="mx-auto text-center">
{systems.map((system, i) => (
<a
key={i}
href={system.href || ""}
className={twMerge(
"btn-shadow inline-flex m-2 px-4 rounded-lg text-lg font-semibold cursor-pointer justify-center items-center space-x-2 border border-zinc-200 dark:border-gray-700 text-black dark:text-white bg-zinc-50 min-w-[150px] dark:bg-[#18181B] h-[36px]",
system.comingSoon && "pointer-events-none"
)}
>
<system.logo />
<span className="text-sm">{system.name}</span>
{system.comingSoon && (
<span className="bg-zinc-200 py-0.5 px-2 inline-block ml-2 rounded-md text-xs h-[20px] dark:text-black">
Coming Soon
</span>
)}
</a>
))}
</div>
</div> </div>
); );
} }

View File

@ -3,26 +3,27 @@ import { Fragment } from "react";
import { Menu, Transition } from "@headlessui/react"; import { Menu, Transition } from "@headlessui/react";
import { ChevronDownIcon } from "@heroicons/react/20/solid"; import { ChevronDownIcon } from "@heroicons/react/20/solid";
import axios from "axios"; import axios from "axios";
import { FaWindows, FaApple, FaLinux } from "react-icons/fa";
const systemsTemplate = [ const systemsTemplate = [
{ {
name: "Download for Mac (M1/M2)", name: "Download for Mac (M1/M2/M3)",
logo: require("@site/static/img/apple-logo-white.png").default, logo: FaApple,
fileFormat: "{appname}-mac-arm64-{tag}.dmg", fileFormat: "{appname}-mac-arm64-{tag}.dmg",
}, },
{ {
name: "Download for Mac (Intel)", name: "Download for Mac (Intel)",
logo: require("@site/static/img/apple-logo-white.png").default, logo: FaApple,
fileFormat: "{appname}-mac-x64-{tag}.dmg", fileFormat: "{appname}-mac-x64-{tag}.dmg",
}, },
{ {
name: "Download for Windows", name: "Download for Windows",
logo: require("@site/static/img/windows-logo-white.png").default, logo: FaWindows,
fileFormat: "{appname}-win-x64-{tag}.exe", fileFormat: "{appname}-win-x64-{tag}.exe",
}, },
{ {
name: "Download for Linux", name: "Download for Linux",
logo: require("@site/static/img/linux-logo-white.png").default, logo: FaLinux,
fileFormat: "{appname}-linux-amd64-{tag}.deb", fileFormat: "{appname}-linux-amd64-{tag}.deb",
}, },
]; ];
@ -56,21 +57,13 @@ export default function Dropdown() {
const changeDefaultSystem = async (systems) => { const changeDefaultSystem = async (systems) => {
const userAgent = navigator.userAgent; const userAgent = navigator.userAgent;
const arc = await navigator?.userAgentData?.getHighEntropyValues([
"architecture",
]);
if (userAgent.includes("Windows")) { if (userAgent.includes("Windows")) {
// windows user // windows user
setDefaultSystem(systems[2]); setDefaultSystem(systems[2]);
} else if (userAgent.includes("Linux")) { } else if (userAgent.includes("Linux")) {
// linux user // linux user
setDefaultSystem(systems[3]); setDefaultSystem(systems[3]);
} else if ( } else if (userAgent.includes("Mac OS")) {
userAgent.includes("Mac OS") &&
arc &&
arc.architecture === "arm"
) {
setDefaultSystem(systems[0]); setDefaultSystem(systems[0]);
} else { } else {
setDefaultSystem(systems[1]); setDefaultSystem(systems[1]);
@ -123,14 +116,14 @@ export default function Dropdown() {
return ( return (
<div className="inline-flex align-items-stretch"> <div className="inline-flex align-items-stretch">
<a <a
className="cursor-pointer relative inline-flex items-center rounded-l-md border-0 px-3.5 py-2.5 text-base font-semibold text-white bg-blue-600 hover:bg-blue-500 hover:text-white" href={defaultSystem.href || ""}
href={defaultSystem.href} className="cursor-pointer relative inline-flex items-center rounded-l-md border-0 px-4 py-3 text-base font-semibold dark:bg-white dark:text-black bg-black text-white dark:hover:text-black hover:text-white"
> >
<img src={defaultSystem.logo} alt="Logo" className="h-5 mr-3 -mt-1" /> <defaultSystem.logo className="h-5 mr-3 -mt-1" />
{defaultSystem.name} {defaultSystem.name}
</a> </a>
<Menu as="div" className="relative -ml-px block"> <Menu as="div" className="relative -ml-px block">
<Menu.Button className="cursor-pointer relative inline-flex items-center rounded-r-md border-l border-blue-500 h-full text-white bg-blue-600 w-8 justify-center"> <Menu.Button className="cursor-pointer relative inline-flex items-center rounded-r-md border-l border-gray-600 h-full dark:bg-white dark:text-black bg-black text-white dark:hover:text-black hover:text-white w-8 justify-center">
<span className="sr-only">Open OS options</span> <span className="sr-only">Open OS options</span>
<ChevronDownIcon className="h-6 w-6" aria-hidden="true" /> <ChevronDownIcon className="h-6 w-6" aria-hidden="true" />
</Menu.Button> </Menu.Button>
@ -143,7 +136,7 @@ export default function Dropdown() {
leaveFrom="transform opacity-100 scale-100" leaveFrom="transform opacity-100 scale-100"
leaveTo="transform opacity-0 scale-95" leaveTo="transform opacity-0 scale-95"
> >
<Menu.Items className="absolute right-0 z-10 mt-1 w-72 text-left origin-top-right rounded-md bg-blue-600 shadow-2xl ring-1 ring-black ring-opacity-5 focus:outline-none overflow-hidden"> <Menu.Items className="absolute right-0 z-10 mt-1 w-80 text-left origin-top-right rounded-md dark:bg-white dark:text-black bg-black text-white dark:hover:text-black hover:text-white shadow-2xl ring-1 ring-black ring-opacity-5 focus:outline-none overflow-hidden">
<div className="overflow-hidden"> <div className="overflow-hidden">
{systems.map((system) => ( {systems.map((system) => (
<Menu.Item <Menu.Item
@ -152,18 +145,18 @@ export default function Dropdown() {
> >
{({ active }) => ( {({ active }) => (
<a <a
href={system.href} href={system.href || ""}
className={classNames( className={classNames(
active ? "bg-blue-500 hover:text-white" : "text-white", active
"flex px-4 py-3 items-center text-white hover:text-white" ? "dark:bg-blue-100 bg-gray-900 hover:text-white dark:text-black"
: "text-white dark:text-black",
"flex px-4 py-3 items-center text-white hover:text-white dark:text-black"
)} )}
> >
<img <system.logo className="w-3 mr-3 -mt-1 flex-shrink-0" />
src={system.logo} <span className="text-white dark:text-black font-medium">
alt="Logo" {system.name}
className="w-3 mr-3 -mt-1 flex-shrink-0" </span>
/>
<span className="text-white">{system.name}</span>
</a> </a>
)} )}
</Menu.Item> </Menu.Item>

View File

@ -1,19 +1,37 @@
import React from "react"; import React from "react";
import { AiOutlineGithub, AiOutlineTwitter } from "react-icons/ai";
import { BiLogoDiscordAlt } from "react-icons/bi";
const socials = [
{
icon: <AiOutlineTwitter className="text-xl text-black dark:text-white" />,
href: "https://twitter.com/janhq_",
},
{
icon: <BiLogoDiscordAlt className="text-xl text-black dark:text-white" />,
href: "https://discord.com/invite/FTk2MvZwJH",
},
{
icon: <AiOutlineGithub className="text-lg text-black dark:text-white" />,
href: "https://github.com/janhq/jan",
},
];
const menus = [ const menus = [
{ {
name: "For Developers", name: "For Developers",
child: [ child: [
{ {
menu: "Documentation (WIP)", menu: "Documentation",
path: "/intro", path: "/intro",
}, },
{ {
menu: "Hardware (WIP)", menu: "Hardware",
path: "/hardware", path: "/hardware",
}, },
{ {
menu: "API Reference (WIP)", menu: "API Reference",
path: "/api-reference", path: "/api-reference",
}, },
{ {
@ -67,22 +85,43 @@ const getCurrentYear = new Date().getFullYear();
export default function Footer() { export default function Footer() {
return ( return (
<footer className="flex-shrink-0 border-t dark:border-gray-800 border-gray-200 py-10"> <footer className="flex-shrink-0 dark:bg-[#09090B]/10 bg-[#D4D4D8]/10 relative overflow-hidden py-10">
<div className="container"> <div className="container">
<div className="grid grid-cols-2 gap-8 md:grid-cols-2 lg:grid-cols-6"> <div className="grid grid-cols-2 gap-8 md:grid-cols-2 lg:grid-cols-6">
<div className="lg:col-span-3 col-span-2"> <div className="lg:col-span-3 col-span-2">
<h6 className="mb-3">Jan</h6> <div className="flex items-center space-x-2 mb-3">
<img alt="Jan Logo" src="/img/logo.svg" />
<h2 className="h6">Jan</h2>
</div>
<div className="w-full lg:w-1/2"> <div className="w-full lg:w-1/2">
<p className="dark:text-gray-400 text-gray-600"> <p className="dark:text-gray-400 text-gray-600">
Run Large Language Models locally on Windows, Mac and Linux. Jan is the open-source, self-hosted&nbsp;
Available on Desktop and Cloud-Native. <br className="hidden lg:block" />
&nbsp;alternative to ChatGPT.
</p> </p>
<div className="mt-4">
<div className="flex items-center gap-x-3">
{socials.map((social, i) => {
return (
<a
aria-label={`social-${i}`}
key={i}
href={social.href}
target="_blank"
>
{social.icon}
</a>
);
})}
</div>
</div>
</div> </div>
</div> </div>
{menus.map((menu, i) => { {menus.map((menu, i) => {
return ( return (
<div key={i} className="lg:text-right"> <div key={i} className="lg:text-right">
<h6 className="mb-3">{menu.name}</h6> <h2 className="mb-3 h6">{menu.name}</h2>
<ul> <ul>
{menu.child.map((child, i) => { {menu.child.map((child, i) => {
return ( return (
@ -103,7 +142,7 @@ export default function Footer() {
})} })}
</div> </div>
</div> </div>
<div className="container mt-8"> <div className="container mt-6">
<span className="dark:text-gray-300 text-gray-700"> <span className="dark:text-gray-300 text-gray-700">
&copy;{getCurrentYear}&nbsp;Jan AI Pte Ltd. &copy;{getCurrentYear}&nbsp;Jan AI Pte Ltd.
</span> </span>

View File

@ -0,0 +1,47 @@
import React from "react";
import { FaGithub, FaDiscord } from "react-icons/fa";
import { RiStarSFill } from "react-icons/ri";
import { useAppStars } from "@site/src/hooks/useAppStars";
import { useDiscordWidget } from "@site/src/hooks/useDiscordWidget";
export default function SocialButton() {
const { stargazers } = useAppStars();
const { data } = useDiscordWidget();
return (
<div className="flex items-center space-x-2 justify-start">
<a
href="https://github.com/janhq/jan"
target="_blank"
className="inline-flex px-4 py-3 rounded-lg font-semibold cursor-pointer justify-center items-center space-x-4 border border-gray-400 dark:border-gray-700 text-white bg-black hover:text-white"
>
<span>
<FaGithub className="text-3xl" />
</span>
<div className="flex-col">
<p className="text-base">Github</p>
<p className="text-sm text-white flex items-center space-x-1">
<RiStarSFill className="text-lg text-[#FEC928]" />
<span>{stargazers.count} stars</span>
</p>
</div>
</a>
<a
href="https://discord.gg/FTk2MvZwJH"
target="_blank"
className="text-white bg-[#5765F2] hover:bg-[#5765F2] hover:text-white inline-flex px-4 py-3 rounded-lg font-semibold cursor-pointer justify-center items-center space-x-4"
>
<span>
<FaDiscord className="text-3xl" />
</span>
<div className="flex-col">
<p className="text-base">Discord</p>
<div className="text-sm text-white flex items-center space-x-1">
<div className="w-2 h-2 bg-green-500 rounded-full" />
<span>{data.presence_count} online</span>
</div>
</div>
</a>
</div>
);
}

View File

@ -0,0 +1,28 @@
import React, { useEffect, useState } from "react";
import axios from "axios";
import { isAxiosError } from "axios";
export const useDiscordWidget = () => {
const [data, setData] = useState({});
useEffect(() => {
const updateData = async () => {
try {
const { data } = await axios.get(
"https://discord.com/api/guilds/1107178041848909847/widget.json"
);
setData({
...data,
});
} catch (error) {
if (isAxiosError(error)) {
console.error("Failed to get stargazers:", error);
}
}
};
updateData();
}, []);
return { data };
};

View File

@ -1,281 +1,335 @@
import React from "react"; import React from "react";
import Dropdown from "@site/src/components/Elements/dropdown"; import DownloadApp from "@site/src/containers/DownloadApp";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import useBaseUrl from "@docusaurus/useBaseUrl"; import useBaseUrl from "@docusaurus/useBaseUrl";
import Layout from "@theme/Layout"; import Layout from "@theme/Layout";
import AnnoncementBanner from "@site/src/components/Announcement"; import Banner from "@site/src/containers/Banner";
import { AiOutlineGithub } from "react-icons/ai";
import ThemedImage from "@theme/ThemedImage"; import ThemedImage from "@theme/ThemedImage";
import DownloadLink from "@site/src/components/Elements/downloadLink"; import SocialButton from "@site/src/containers/SocialButton";
import { IoArrowDown } from "react-icons/io5";
import Dropdown from "@site/src/containers/Elements/dropdown";
import useIsBrowser from "@docusaurus/useIsBrowser";
export default function Home() { export default function Home() {
const { siteConfig } = useDocusaurusContext(); const isBrowser = useIsBrowser();
const handleAnchorLink = () => {
document
.getElementById("download-section")
.scrollIntoView({ behavior: "smooth" });
};
const userAgent = isBrowser && navigator.userAgent;
const isBrowserChrome = isBrowser && userAgent.includes("Chrome");
return ( return (
<> <>
<AnnoncementBanner /> <Banner />
<Layout <Layout
title={`${siteConfig.tagline}`} title="Open-source ChatGPT Alternative"
description="Jan is a ChatGPT-alternative that runs on your own computer, with a local API server." description="Jan runs 100% offline on your computer, utilizes open-source AI models, prioritizes privacy, and is highly customizable."
> >
<main className="bg-gray-50 dark:bg-gray-950/95 relative"> <main>
<div className="relative"> <div className="grid grid-cols-1 lg:grid-cols-12 -mt-1 gap-8 items-center relative min-h-[calc(100vh-96px)] ">
<ThemedImage <div className="col-span-full lg:col-start-2 lg:col-span-5 text-left relative z-10 px-4 py-6">
alt="App screenshot" <img
sources={{ src="/img/homepage/element-hero-blur.webp"
light: useBaseUrl("/img/bg-hero-light.svg"), alt="Element blur"
dark: useBaseUrl("/img/bg-hero-dark.svg"), className="hidden lg:block absolute blur-3xl opacity-30 right-32 -bottom-32"
}} />
className="absolute w-full h-full opacity-10 dark:opacity-20 top-0 object-cover blur-3xl" <div className="flex items-center space-x-2 mb-3">
/> <img alt="Jan Logo" src="img/logo.svg" width={36} height={36} />
<div className="container pt-16"> <span className="text-zinc-500 text-4xl font-medium">
<div className="grid grid-cols-1 items-center gap-4"> Meet Jan
<div className="relative z-10 text-center "> </span>
{/* TODO: Add upcoming events here */}
{/* <div className="bg-red-50 mb-4 inline-flex items-center py-1 rounded-full px-4 gap-x-2">
<span className="font-bold uppercase text-blue-600">
Event
</span>
<a href="/events/nvidia-llm-day-nov-23">
<p className="font-bold">
8 Nov 2023: Nvidia LLM Day (Hanoi)
</p>
</a>
</div> */}
<h1 className="bg-gradient-to-r dark:from-white from-black to-gray-500 dark:to-gray-400 bg-clip-text text-4xl lg:text-6xl font-bold leading-tight text-transparent dark:text-transparent lg:leading-tight">
Own your AI
</h1>
<p className="text-xl leading-relaxed lg:text-2xl lg:leading-relaxed text-gray-500 dark:text-gray-400">
A &nbsp;
<span className="dark:text-white text-black">
free, open-source
</span>
&nbsp;alternative to OpenAI
<br />
&nbsp;that runs on your&nbsp;
<span className="dark:text-white text-black">
personal computer
</span>
</p>
<div className="my-6 flex flex-col-reverse md:flex-row items-center justify-center gap-4 relative z-20">
<button
type="button"
className="cursor-pointer relative hidden md:inline-flex items-center px-4 py-2.5 text-base font-semibold rounded-lg border border-gray-400 dark:border-gray-700 text-gray-600 dark:text-white"
onClick={() =>
window.open(
"https://github.com/janhq/jan",
"_blank",
"noreferrer"
)
}
>
View Github
</button>
<Dropdown />
</div>
</div>
<div className="text-center relative ">
<div className="p-3 border dark:border-gray-500 border-gray-400 inline-block rounded-lg">
<ThemedImage
alt="App screenshot"
sources={{
light: useBaseUrl("/img/desktop-llm-chat-light.png"),
dark: useBaseUrl("/img/desktop-llm-chat-dark.png"),
}}
width={1000}
className="rounded-md mx-auto"
/>
</div>
</div>
</div> </div>
</div> <h1 className="text-5xl lg:text-7xl font-semibold leading-tight lg:leading-tight mt-2">
</div> Bringing AI to <br /> your Desktop{" "}
<div className="container mt-40 text-center"> <span className="relative w-16 h-16 inline-block">
<h2>AI that you control</h2> <img
<p className="text-base mt-2 w-full lg:w-2/5 mx-auto leading-relaxed"> src="/img/homepage/element-hero-heading.png"
Private. Local. Infinitely Customizable. alt="Element hero heading"
</p> className="object-contain inline-block"
<div className="grid text-left lg:grid-cols-2 mt-16 gap-4"> width={64}
<div className="card relative min-h-[380px] lg:min-h-[460px]"> height={64}
<img
src="/img/card-element.png"
alt="Element"
className="absolute w-full bottom-0 left-0"
/>
<div className="p-8 relative z-40">
<h5>Personal AI that runs on your computer</h5>
<p className="mt-2">
Jan runs directly on your local machine, offering privacy,
convenience and customizability.
</p>
<ThemedImage
alt="Group Chat"
sources={{
light: useBaseUrl("/img/group-chat-light.png"),
dark: useBaseUrl("/img/group-chat-dark.png"),
}}
className="mt-10"
/> />
</span>
</h1>
<p className="text-2xl mt-3 leading-relaxed text-zinc-500">
Open-source ChatGPT alternative that runs{" "}
<br className="hidden lg:block" /> 100% offline on your
computer.
</p>
<div className="mt-8"></div>
<div className="mt-8">
{!isBrowserChrome ? (
<div
onClick={() => handleAnchorLink()}
className="inline-flex px-4 py-3 rounded-lg text-lg font-semibold cursor-pointer justify-center items-center space-x-2 dark:bg-white dark:text-black bg-black text-white dark:hover:text-black hover:text-white scroll-smooth"
>
<span>Download Jan for PC</span>
</div>
) : (
<Dropdown />
)}
</div>
<div
onClick={() => handleAnchorLink()}
className="hidden lg:inline-block cursor-pointer"
>
<div className="mt-16 flex items-center space-x-2">
<p>Find out more</p>
<IoArrowDown size={24} className="animate-bounce-down" />
</div> </div>
</div> </div>
<div className="card relative min-h-[380px] lg:min-h-[460px]"> </div>
<div className="p-8">
<h5>Extendable via App and Plugin framework</h5> <div className="col-span-full lg:col-span-6 h-full">
<p className="mt-2"> <div className="relative text-center h-full">
Jan has a versatile app and plugin framework, allowing you
to customize it to your needs.
</p>
</div>
<ThemedImage <ThemedImage
alt="Framework" className="w-full object-cover mr-auto h-full"
alt="App screenshots"
sources={{ sources={{
light: useBaseUrl("/img/card-framework-light.png"), light: useBaseUrl(
dark: useBaseUrl("/img/card-framework-dark.png"), "/img/homepage/app-base-screen-light.webp"
),
dark: useBaseUrl("/img/homepage/app-base-screen-dark.webp"),
}} }}
className="w-11/12 ml-auto mt-auto"
/>
</div>
<div className="card relative min-h-[380px] lg:min-h-[460px]">
<div className="p-8">
<h5>
Private and offline, your data never leaves your machine
</h5>
<p className="mt-2">
Your conversations and data are with an AI that runs on your
computer, where only you have access.
</p>
</div>
<ThemedImage
alt="Group Chat"
sources={{
light: useBaseUrl("/img/card-nitro-light.png"),
dark: useBaseUrl("/img/card-nitro-dark.png"),
}}
className="w-3/4 mx-auto mt-auto"
/>
</div>
<div className="card relative min-h-[380px] lg:min-h-[460px]">
<div className="p-8">
<h5>No subscription fees, the AI runs on your computer</h5>
<p className="mt-2">
Say goodbye to monthly subscriptions or usage-based APIs.
Jan runs 100% free on your own hardware.
</p>
</div>
<ThemedImage
alt="Group Chat"
sources={{
light: useBaseUrl("/img/card-free-light.png"),
dark: useBaseUrl("/img/card-free-dark.png"),
}}
className="w-full mt-auto mx-auto"
/> />
</div> </div>
</div> </div>
</div> </div>
<div className="container lg:px-20 py-40 lg:py-[200px] text-center lg:text-left"> <div
<div className="flex flex-col lg:flex-row space-y-20 lg:space-y-0"> className="dark:bg-[#09090B]/20 border-t border-zinc-200 dark:border-gray-800 py-10 lg:py-16"
<div> id="download-section"
<h1 className="bg-gradient-to-r dark:from-white from-black to-gray-500 dark:to-gray-400 bg-clip-text text-4xl lg:text-6xl font-bold leading-tight text-transparent dark:text-transparent lg:leading-tight"> >
Your AI, forever. <div className="container">
</h1> <div className="w-full lg:w-3/4 mx-auto">
<p className="text-lg lg:text-2xl mt-2"> <DownloadApp />
Apps come and go, but your AI and data should last.{" "}
</p>
<div className="w-full lg:w-3/4 mt-8">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-10 lg:gap-24">
<div>
<img
src="/img/ic-park-solid-unlock.svg"
alt="Icon - Lock"
className="w-8 mb-4 mx-auto lg:mx-0"
/>
<p>
Jan uses open, standard and non-proprietary files stored
locally on your device.
</p>
</div>
<div>
<img
src="img/ic-baseline-control-camera.svg"
alt="Icon - Camera"
className="w-8 mb-4 mx-auto lg:mx-0"
/>
<p>
You have total control over your AI, which means you can
use Jan offline and switch to another app easily if you
want.
</p>
</div>
</div>
</div>
</div>
<div className="w-full lg:w-80 text-center">
<ThemedImage
alt="App screenshot"
sources={{
light: useBaseUrl("/img/jan-icon-light.png"),
dark: useBaseUrl("/img/jan-icon-dark.png"),
}}
className="w-40 lg:w-full mx-auto"
/>
<p className="mt-1 font-bold">100% free on your own hardware</p>
<DownloadLink />
</div> </div>
</div> </div>
</div> </div>
<div className="container pb-40 text-center"> <div className="dark:bg-[#09090B]/20 pb-10 lg:pb-36">
<h2> <div className="container h-full ">
We are open-source. <br /> Join Jan community. <div className="w-full lg:w-3/4 mx-auto relative rounded-xl py-10">
</h2> <img
<div className="mt-14"> src="/img/homepage/element-bg-open-source.webp"
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6"> alt="Element Open Source BG"
<a href="https://discord.com/invite/FTk2MvZwJH" target="_blank"> className="absolute w-full h-full object-cover rounded-xl top-0"
<div className="card h-52 relative flex items-center justify-center"> />
<div className="relative z-50"> <div className="grid grid-cols-12 gap-4 px-4 items-center relative z-20">
<div className="col-span-full lg:col-span-7 order-2 lg:order-1 relative">
<div className="relative lg:-left-14 overflow-hidden rounded-lg group">
<div className="hidden group-hover:flex absolute top-0 left-0 rounded-lg bg-black/30 w-full h-full items-center justify-center transition-all">
<a
href="https://github.com/orgs/janhq/projects/5/views/12"
target="_blank"
className="inline-flex px-4 py-3 rounded-lg text-lg font-semibold cursor-pointer justify-center items-center space-x-2 text-black bg-white hover:text-black"
>
<span>View Roadmap</span>
</a>
</div>
<img <img
src="/img/discord-logo.png" src="/img/homepage/roadmap.webp"
alt="Discord logo" alt="Element Roadmap"
className="w-28" className="h-full w-full object-cover"
/> />
</div> </div>
<div className="card-link card-link-bg dark:card-link-bg-dark absolute right-4 top-5">
Join our Discord
</div>
<ThemedImage
alt="Discord Element"
sources={{
light: useBaseUrl("/img/discord-element-light.png"),
dark: useBaseUrl("/img/discord-element-dark.png"),
}}
className="absolute"
/>
</div> </div>
</a> <div className="col-span-full lg:col-span-5 order-1 lg:order-2 text-black">
<a href="https://github.com/janhq/jan" target="_blank"> <p className="text-4xl font-semibold">100% open source</p>
<div className="card h-52 relative flex items-center justify-center"> <p className="leading-relaxed w-full lg:w-3/4 mt-4">
<div className="relative z-50"> Our core team believes that AI should be open source, and
<AiOutlineGithub className="text-8xl dark:text-white text-black" /> Jan is built in public.
</p>
<div className="mt-6">
<SocialButton />
</div> </div>
<div className="card-link card-link-bg dark:card-link-bg-dark absolute right-4 top-5"> </div>
View Github </div>
</div>
</div>
</div>
<div className="dark:bg-[#27272A] bg-zinc-100 pt-10 lg:pt-20 pb-10">
<div className="container">
<div className="w-full lg:w-3/4 mx-auto relative">
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-center">
<div className="col-span-5">
<p className="text-3xl xl:text-4xl font-semibold">
Desktop App
</p>
<p className="text-zinc-600 dark:text-zinc-400 mt-4 text-lg leading-relaxed">
<b className="text-bold text-black dark:text-white">
10x productivity
</b>{" "}
with customizable AI <br className="hidden lg:block" />{" "}
assistants, global hotkeys, and in-line AI.
</p>
</div>
<div className="col-span-7">
<div className="bg-white dark:bg-[#09090B]/50 h-[375px] border border-zinc-200 dark:border-gray-800 rounded-xl overflow-hidden">
<ThemedImage
className="object-cover w-full object-center mx-auto h-full lg:-left-4 relative"
alt="App screenshots"
sources={{
light: useBaseUrl(
"/img/homepage/desktop-app-light.webp"
),
dark: useBaseUrl(
"/img/homepage/desktop-app-dark.webp"
),
}}
/>
</div> </div>
</div>
</div>
</div>
</div>
</div>
<div className="dark:bg-[#27272A] bg-zinc-100 lg:pb-20 pb-10 pt-10">
<div className="container">
<div className="w-full lg:w-3/4 mx-auto relative ">
<div className="grid grid-cols-1 lg:grid-cols-12 gap-8 items-center">
<div className="col-span-5">
<div className="flex items-center">
<p className="text-3xl xl:text-4xl font-semibold">
Mobile App
</p>
<span className="bg-gray-300 dark:bg-gray-700 py-0.5 px-2 inline-block ml-2 rounded-lg text-sm mt-1 font-medium">
Coming Soon
</span>
</div>
<p className="text-zinc-600 dark:text-zinc-400 mt-4 text-lg leading-relaxed">
Take your AI assistants on the go.{" "}
<br className="hidden lg:block" /> Seamless integration
into your&nbsp;
<b className="text-bold text-black dark:text-white">
mobile <br className="hidden lg:block" /> workflows
</b>
&nbsp; with elegant features.
</p>
</div>
<div className="col-span-7">
<div className="bg-white dark:bg-[#09090B]/50 h-[375px] border border-zinc-200 dark:border-gray-800 rounded-xl">
<ThemedImage
className="object-cover w-full object-center mx-auto h-full"
alt="App screenshots"
sources={{
light: useBaseUrl(
"/img/homepage/mobile-app-light.webp"
),
dark: useBaseUrl(
"/img/homepage/mobile-app-dark.webp"
),
}}
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div className="dark:bg-[#09090B]/20">
<div className="container py-12 lg:py-32">
<div className="w-full xl:w-10/12 mx-auto relative">
<div className="text-center">
<div className="card-link-bg dark:card-link-bg-dark px-4 py-2 inline-flex rounded-xl items-center space-x-6 h-[60px]">
<img <img
alt="Github Element" src="/img/homepage/ic-offline.webp"
src="/img/github-element-dark.png" alt="Icon Offline"
className="absolute left-8" className="w-9 flex-shrink-0"
/>
<img
src="/img/homepage/ic-private.webp"
alt="Icon Offline"
className="w-12 flex-shrink-0"
/>
<img
src="/img/homepage/ic-folder.webp"
alt="Icon Offline"
className="w-9 flex-shrink-0"
/> />
</div> </div>
</a> <div className="mt-8">
<h2 className="text-3xl lg:text-4xl font-semibold">
Offline and Local First
</h2>
<p className="mt-2 text-zinc-600 dark:text-zinc-400 text-lg leading-relaxed">
Conversations, preferences, and model usage stay on{" "}
<br className="hidden lg:block" /> your computersecure,
exportable, and can be deleted at any time.
</p>
<div className="grid grid-cols-12 mt-10 lg:mt-20 text-left gap-8">
<div className="col-span-full lg:col-span-4">
<div className="dark:bg-[#27272A] bg-zinc-100 rounded-xl p-8 min-h-[450px]">
<h2 className="text-3xl lg:text-4xl font-semibold">
OpenAI Compatible
</h2>
<p className="mt-4 leading-relaxed text-zinc-600 dark:text-zinc-400 text-lg">
Jan provides an OpenAI-equivalent API{" "}
<br className="hidden lg:block" /> server at&nbsp;
<b>localhost:</b>&nbsp;
<span className="bg-blue-600 text-white font-bold py-0.5 px-2 rounded-lg">
1337
</span>{" "}
that can be used as a drop-in replacement with
compatible apps.
</p>
<div className="mt-6">
<div className="mb-4">
<div className="bg-white dark:bg-[#18181B] shadow-lg py-2 px-4 inline-flex rounded-xl">
<p className="font-medium">
/chats/completions
</p>
</div>
</div>
<div className="mb-4">
<div className="bg-white dark:bg-[#18181B] shadow-lg py-2 px-4 inline-flex rounded-xl">
<p className="font-medium">
Local server and API
</p>
</div>
</div>
<div className="mb-4">
<div className="bg-white dark:bg-[#18181B] shadow-lg py-2 px-4 inline-flex rounded-xl">
<p className="font-medium">
<span className="inline-block mr-2">
Assistants framework
</span>
<span className="bg-gray-300 dark:bg-gray-700 py-0.5 px-2 inline-block rounded-lg text-sm">
Coming Soon
</span>
</p>
</div>
</div>
</div>
</div>
</div>
<div className="col-span-full lg:col-span-8 items-center">
<div className="card-gradient rounded-xl h-full relative text-center min-h-[450px]">
<img
src="/img/homepage/status.webp"
alt="Element status"
className="w-10/12 lg:p-20 object-cover absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"
/>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,31 +0,0 @@
@layer components {
.card-link-bg {
background: linear-gradient(180deg, #fff 0%, #fff 100%);
box-shadow:
0px 10px 10px -5px rgba(0, 0, 0, 0.1),
0px 20px 25px -5px rgba(0, 0, 0, 0.1),
0px 1px 2px 0px #f1f1f1 inset;
}
.card-link-bg-dark {
background: linear-gradient(180deg, #101118 0%, #101118 100%);
box-shadow:
0px 10px 10px -5px rgba(0, 0, 0, 0.3),
0px 1px 2px 0px #525154 inset;
}
.card {
@apply rounded-3xl border bg-gray-100 border-gray-100 dark:border-[#202231] dark:bg-[#111217];
&-link {
display: inline-flex;
padding: 8px 16px;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 8px;
border-radius: 16px;
font-size: 14px;
cursor: pointer;
}
}
}

View File

@ -1,18 +0,0 @@
@layer components {
.el-blur-hero {
height: 200px;
background: linear-gradient(
180deg,
hsl(296, 100%, 67%) 0%,
hsl(253, 100%, 57%) 100%
);
z-index: 2;
border-bottom-left-radius: 100%;
border-bottom-right-radius: 100%;
border-top-left-radius: 100%;
border-top-right-radius: 100%;
filter: blur(100px);
-webkit-filter: blur(100px);
opacity: 0.5;
}
}

View File

@ -1,7 +1,7 @@
@layer base { @layer base {
html[data-theme="light"] { html[data-theme="light"] {
--ifm-background-color: white; --custom-radial-blur: #e1e7fd;
--ifm-background-color: #fff;
--ifm-color-primary: #2563eb; /* New Primary Blue */ --ifm-color-primary: #2563eb; /* New Primary Blue */
--ifm-color-primary-dark: #204fcf; /* Darker Blue */ --ifm-color-primary-dark: #204fcf; /* Darker Blue */
--ifm-color-primary-darker: #1b45b7; /* Even Darker Blue */ --ifm-color-primary-darker: #1b45b7; /* Even Darker Blue */
@ -13,8 +13,10 @@
--ifm-navbar-link-hover-color: inherit; --ifm-navbar-link-hover-color: inherit;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
} }
html[data-theme="dark"] { html[data-theme="dark"] {
--ifm-background-color: black; --custom-radial-blur: #1d1b48;
--ifm-background-color: #18181b;
--ifm-color-primary: #ffffff; /* New Primary Blue */ --ifm-color-primary: #ffffff; /* New Primary Blue */
--ifm-color-primary-dark: #204fcf; /* Darker Blue */ --ifm-color-primary-dark: #204fcf; /* Darker Blue */
--ifm-color-primary-darker: #1b45b7; /* Even Darker Blue */ --ifm-color-primary-darker: #1b45b7; /* Even Darker Blue */
@ -24,12 +26,18 @@
--ifm-color-primary-lightest: #3a8bff; /* Lightest Blue */ --ifm-color-primary-lightest: #3a8bff; /* Lightest Blue */
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
} }
pre,
code {
@apply text-sm;
}
body { body {
@apply text-base; @apply text-base;
@apply antialiased; @apply antialiased;
@apply bg-white dark:bg-black; @apply bg-white dark:bg-[#18181B];
@apply text-gray-800 dark:text-gray-300;
} }
img { img {
pointer-events: none; pointer-events: none;
} }
@ -44,12 +52,16 @@
display: inline-block; display: inline-block;
padding: 2px 8px; padding: 2px 8px;
margin: 0; margin: 0;
background-color: #228B22; background-color: #228b22;
color: #000; color: #000;
font-size: 13px; font-size: 13px;
vertical-align: middle; vertical-align: middle;
line-height: 1.6; line-height: 1.6;
border-radius: 4px; border-radius: 4px;
font-weight: var(--ifm-font-weight-bold); font-weight: var(--ifm-font-weight-bold);
} }
.btn-shadow {
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}
} }

View File

@ -0,0 +1,47 @@
@layer components {
.card-gradient {
background: radial-gradient(
58.83% 95.12% at 62.37% 97.91%,
rgba(238, 203, 255, 0.59) 0%,
rgba(255, 255, 255, 0) 100%
),
linear-gradient(
155deg,
rgba(50, 107, 255, 0.8) 68.16%,
rgba(194, 226, 255, 0.8) 94.33%
);
backdrop-filter: blur(7.174633026123047px);
}
.card-link-bg {
background: linear-gradient(180deg, #fafafa 0%, #ededed 100%);
box-shadow:
0px 4px 12px 0px rgba(0, 0, 0, 0.12),
0px -1px 1px 0px rgba(0, 0, 0, 0.1) inset,
0px 1px 1px 0px #fff inset;
}
.card-link-bg-dark {
background: var(--color-bg-elevated, #27272a);
box-shadow:
0px 4px 12px 0px rgba(0, 0, 0, 0.12),
0px -1px 1px 0px rgba(0, 0, 0, 0.1) inset,
0px 1px 1px 0px #4c4c4c inset;
}
.card {
@apply rounded-xl border bg-gray-50 border-gray-50 dark:border-[#202231] dark:bg-[#111217]/50;
&-link {
display: inline-flex;
padding: 8px 16px;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 8px;
border-radius: 16px;
font-size: 14px;
cursor: pointer;
}
}
}

View File

@ -2,8 +2,12 @@
@import "tailwindcss/components"; @import "tailwindcss/components";
@import "tailwindcss/utilities"; @import "tailwindcss/utilities";
@import "./typography.scss"; @import "./components/base.scss";
@import "./tweaks.scss"; @import "./components/typography.scss";
@import "./base.scss"; @import "./components/card.scss";
@import "./components.scss";
@import "./card.scss"; @import "./tweaks/navbar.scss";
@import "./tweaks/breadcrumb.scss";
@import "./tweaks/markdown.scss";
@import "./tweaks/redocusaurus.scss";
@import "./tweaks/sidebar.scss";

View File

@ -1,126 +0,0 @@
.redocusaurus {
div[data-section-id] {
min-height: auto;
}
}
[class*="docItemCol_"] {
@apply p-4 lg:px-16 lg:py-4;
}
[class*="breadcrumbsContainer_"] {
margin-bottom: 40px !important;
}
.theme-doc-footer {
margin-top: 40px;
margin-bottom: 20px;
}
.menu.thin-scrollbar {
padding: 32px 10px;
}
[class*="iconExternalLink_"] {
display: none;
}
.navbar {
@apply px-0 lg:h-16 border-b border-gray-200 dark:border-gray-800 bg-white/50 backdrop-blur-lg dark:bg-black/50 shadow-none;
.navbar__toggle {
width: 24px;
}
.navbar-sidebar__backdrop {
height: 100dvh;
}
.navbar-sidebar {
height: 100dvh;
.navbar-sidebar__close {
width: 14px;
}
}
.navbar__title {
@apply text-lg;
}
.navbar__brand {
margin-right: 24px;
&:hover {
color: inherit;
}
}
.navbar__inner {
@apply container;
}
}
.breadcrumbs__item {
position: relative;
&:first-child {
.breadcrumbs__link {
vertical-align: middle;
margin-top: -2px;
}
}
}
[class*="docMainContainer_"],
[class*="docSidebarContainer_"] {
@apply bg-gray-50 dark:bg-gray-950/95;
}
.navbar-sidebar {
@apply bg-gray-50 dark:bg-gray-900;
}
.theme-doc-sidebar-container {
@apply border-gray-200 dark:border-gray-800;
}
.theme-doc-markdown {
a {
@apply text-blue-600 dark:text-blue-400;
}
ul {
list-style: revert;
}
ol {
list-style: decimal;
}
ul,
ol {
padding-left: 32px;
li {
@apply leading-loose;
line-height: 1.5;
}
+ div {
margin-top: 12px;
}
}
}
.markdown h1:first-child,
.markdown > p {
margin-bottom: 16px;
}
.theme-code-block {
font-size: 14px;
background-color: black;
}
.table-of-contents {
font-size: 14px;
}
.task-list-item {
list-style: none;
}
blockquote {
margin-bottom: 12px;
}

View File

@ -0,0 +1,18 @@
.breadcrumbs {
@apply mb-8;
&__item {
position: relative;
&:first-child {
.breadcrumbs__link {
vertical-align: middle;
margin-top: -2px;
}
}
}
&__link {
padding-top: 2px;
padding-bottom: 2px;
}
}

View File

@ -0,0 +1,47 @@
.theme-doc-markdown {
a {
@apply text-blue-600 dark:text-blue-400 underline;
}
ul {
list-style: revert;
}
ol {
list-style: decimal;
}
ul,
ol {
padding-left: 16px;
li {
@apply leading-normal;
p {
margin-bottom: 0;
}
}
}
p {
@apply mb-2;
}
h1 {
&:first-child {
@apply mb-4;
}
}
h1,
h2 {
@apply mb-3;
}
table {
width: 100%;
display: table;
}
}
.task-list-item {
list-style: none;
}
blockquote {
margin-bottom: 12px;
}

View File

@ -0,0 +1,25 @@
.navbar {
@apply bg-transparent py-0 shadow-none px-0;
&__inner {
@apply border border-gray-200 dark:border-gray-800 bg-white/80 dark:bg-[#09090B]/50 backdrop-blur-md flex items-center h-14 px-4 lg:px-8 relative;
}
&__logo {
@apply flex items-center;
}
&__brand {
&:hover {
@apply dark:text-white text-black;
}
}
&__title {
font-size: 18px;
}
[class*="searchBox_"] {
display: none;
}
}

View File

@ -0,0 +1,33 @@
.redocusaurus {
.menu-content {
top: 80px !important;
background-color: transparent;
}
.redoc-markdown {
margin-top: 8px;
}
.scrollbar-container {
ul > li > label {
margin-bottom: 4px;
background-color: transparent;
padding-top: 4px;
padding-bottom: 4px;
font-size: 16px;
font-weight: 700;
color: var(--ifm-menu-color);
}
ul > li > ul > li > label {
background-color: transparent;
font-weight: 500;
&:hover {
@apply dark:bg-gray-800/50 bg-gray-100;
}
&.active {
@apply dark:bg-gray-800/50 bg-gray-100;
}
}
}
}

View File

@ -0,0 +1,45 @@
// * Classname from Docusaurus template
// * We just overide the styling with applied class from tailwind
[class*="docSidebarContainer_"] {
margin-top: 0 !important;
@apply dark:border-gray-800 border-gray-300;
}
[class*="sidebar_"] {
padding-top: 0px !important;
}
.navbar-sidebar__back {
padding-top: 20px !important;
}
[class*="sidebarViewport_"] {
top: 80px !important;
// height: unset !important;
}
[class*="docItemCol_"] {
@apply lg:px-8;
}
// * Including custom sidebar table of content
.table-of-contents {
@apply text-base py-0 dark:border-gray-800 border-gray-300;
}
.menu__caret:before {
background: var(--ifm-menu-link-sublist-icon) 50% / 1.5rem 1.5rem;
}
[class*="codeBlockContainer_"] {
margin: 4px;
}
[class*="codeBlockTitle_"] {
border-bottom: 1px solid #52525a !important;
}
[class*="iconExternalLink_"] {
display: none;
}

View File

@ -10,7 +10,7 @@ import { useKeyboardNavigation } from "@docusaurus/theme-common/internal";
import SkipToContent from "@theme/SkipToContent"; import SkipToContent from "@theme/SkipToContent";
import AnnouncementBar from "@theme/AnnouncementBar"; import AnnouncementBar from "@theme/AnnouncementBar";
import Navbar from "@theme/Navbar"; import Navbar from "@theme/Navbar";
import Footer from "@site/src/components/Footer"; import Footer from "@site/src/containers/Footer";
import LayoutProvider from "@theme/Layout/Provider"; import LayoutProvider from "@theme/Layout/Provider";
import ErrorPageContent from "@theme/ErrorPageContent"; import ErrorPageContent from "@theme/ErrorPageContent";
import styles from "./styles.module.scss"; import styles from "./styles.module.scss";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,167 +0,0 @@
<svg width="1440" height="900" viewBox="0 0 1440 900" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_68_822" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="1440" height="900">
<rect width="1440" height="900" fill="#C4C4C4"/>
</mask>
<g mask="url(#mask0_68_822)">
<rect x="-66" y="-0.478027" width="1572" height="950.938" fill="#2F307D"/>
<g filter="url(#filter0_f_68_822)">
<path d="M-57.8301 396.173L744.277 -13.1623L1108.87 -13.1624L1555.07 95.9939L-9.21778 706.098L-57.8301 396.173Z" fill="url(#paint0_linear_68_822)"/>
</g>
<g filter="url(#filter1_f_68_822)">
<path d="M-101.107 383.634L800.122 -0.623145L1108.87 -13.1624L1555.07 95.9939L-9.21663 706.098L-101.107 383.634Z" fill="url(#paint1_linear_68_822)"/>
</g>
<g filter="url(#filter2_f_68_822)">
<ellipse cx="329.847" cy="107.571" rx="329.847" ry="107.571" transform="matrix(0.914846 -0.403803 0.330497 0.943807 508.14 342.034)" fill="#E73800"/>
</g>
<g filter="url(#filter3_f_68_822)">
<path d="M673.463 29.4612C498.517 54.805 280.304 103.381 65.8544 29.4612C54.5674 23.8293 45.914 29.8836 101.596 99.1566C171.198 185.748 398.816 149.844 673.463 29.4612Z" fill="#4463B1"/>
</g>
<g opacity="0.4" filter="url(#filter4_f_68_822)">
<path d="M609.751 41.4427C470.997 61.5436 297.927 100.07 127.841 41.4427C118.889 36.9759 112.026 41.7777 156.188 96.72C211.392 165.398 391.922 136.922 609.751 41.4427Z" fill="#4463B1"/>
</g>
<path d="M683.23 327.829C1018.31 164.095 1157.2 156.298 1478.39 218.673L1584.3 429.188L35.639 906.746C7.28175 901.548 89.4594 770.301 313.426 571.481C355.643 534.003 348.151 491.563 683.23 327.829Z" fill="url(#paint2_linear_68_822)"/>
<g opacity="0.7" filter="url(#filter5_f_68_822)">
<path d="M898.979 256.588C1242.14 115.511 1157.2 156.298 1478.39 218.673L1584.3 429.189L47.792 902.848C19.4347 897.65 -12.9736 787.454 84.2516 629.958C205.783 433.087 499.515 420.813 898.979 256.588Z" fill="#4463B1"/>
</g>
<g filter="url(#filter6_f_68_822)">
<path d="M806.495 345.372C1198.82 247.081 1179.04 156.299 1534.2 218.674L1584.3 429.189L-114.729 902.848C-146.086 897.65 -181.922 787.454 -74.4129 629.958C59.9733 433.087 510.846 419.442 806.495 345.372Z" fill="#4463B1"/>
</g>
<g filter="url(#filter7_f_68_822)">
<ellipse cx="329.847" cy="107.571" rx="329.847" ry="107.571" transform="matrix(0.914846 -0.403803 0.330497 0.943807 -67.2598 503.045)" fill="#4463B1"/>
</g>
<g opacity="0.4" filter="url(#filter8_f_68_822)">
<ellipse cx="329.847" cy="156.166" rx="329.847" ry="156.166" transform="matrix(0.914846 -0.403803 0.330497 0.943807 437.842 560.226)" fill="#4463B1"/>
</g>
<g filter="url(#filter9_f_68_822)">
<ellipse cx="329.847" cy="107.571" rx="329.847" ry="107.571" transform="matrix(0.914846 -0.403803 0.330497 0.943807 980.781 431.732)" fill="#3A78F0"/>
</g>
<g filter="url(#filter10_f_68_822)">
<ellipse cx="296.397" cy="165.703" rx="296.397" ry="165.703" transform="matrix(0.914846 -0.403803 0.330497 0.943807 -370.611 508.381)" fill="#2A4EAB"/>
</g>
<g filter="url(#filter11_f_68_822)">
<path d="M-431 798.106V1422H1785V340.827L-431 798.106Z" fill="white"/>
</g>
<g filter="url(#filter12_f_68_822)">
<path d="M1168.87 194.6L1651.63 -51L1531.83 244.697L1168.87 194.6Z" fill="#2A4EAB"/>
</g>
<g opacity="0.4" filter="url(#filter13_f_68_822)">
<path d="M303.606 802.698L1065.95 450.301L1427.09 399.795L1877.64 402.328L376.107 978.65L303.606 802.698Z" fill="url(#paint3_linear_68_822)"/>
</g>
<g opacity="0.4" filter="url(#filter14_f_68_822)">
<path d="M888 621.314L1690.16 377.877L2054.78 377.877L2501 442.793L936.615 805.63L888 621.314Z" fill="url(#paint4_linear_68_822)"/>
</g>
<g opacity="0.4" filter="url(#filter15_f_68_822)">
<path d="M839.773 675.305L1706.82 339.905L2012.39 295.317L2463.11 306.023L954.084 854.616L839.773 675.305Z" fill="url(#paint5_linear_68_822)"/>
</g>
</g>
<defs>
<filter id="filter0_f_68_822" x="-64.8301" y="-20.1624" width="1626.9" height="733.26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3.5" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter1_f_68_822" x="-125.107" y="-37.1624" width="1704.18" height="767.26" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="12" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter2_f_68_822" x="377.575" y="-21.1177" width="935.751" height="662.969" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter3_f_68_822" x="-10.4902" y="-40.1458" width="751.953" height="255.045" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="34" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter4_f_68_822" x="85.2227" y="4.16821" width="560.528" height="166.417" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="18" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter5_f_68_822" x="7.91602" y="150.332" width="1587.38" height="763.516" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="5.5" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter6_f_68_822" x="-192.659" y="152.168" width="1822.96" height="796.68" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="23" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter7_f_68_822" x="-197.824" y="139.894" width="935.751" height="662.969" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter8_f_68_822" x="321.022" y="211.765" width="940.382" height="725.316" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter9_f_68_822" x="850.217" y="68.5803" width="935.751" height="662.969" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter10_f_68_822" x="-485.376" y="184.142" width="881.373" height="721.889" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter11_f_68_822" x="-587" y="184.827" width="2528" height="1393.17" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="78" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter12_f_68_822" x="1100.87" y="-119" width="618.759" height="431.697" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="34" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter13_f_68_822" x="296.605" y="392.795" width="1588.03" height="592.855" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3.5" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter14_f_68_822" x="881" y="370.877" width="1627" height="441.754" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3.5" result="effect1_foregroundBlur_68_822"/>
</filter>
<filter id="filter15_f_68_822" x="815.773" y="271.317" width="1671.34" height="607.299" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="12" result="effect1_foregroundBlur_68_822"/>
</filter>
<linearGradient id="paint0_linear_68_822" x1="748.618" y1="-13.1624" x2="81.6937" y2="550.866" gradientUnits="userSpaceOnUse">
<stop stop-color="#FF7D54"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint1_linear_68_822" x1="501.216" y1="242.185" x2="29.7383" y2="626.281" gradientUnits="userSpaceOnUse">
<stop offset="0.0104167" stop-color="#91B0ED"/>
<stop offset="0.458333" stop-color="#437DD5"/>
<stop offset="1" stop-color="#8A3AF0"/>
</linearGradient>
<linearGradient id="paint2_linear_68_822" x1="1164.15" y1="269.352" x2="415.258" y2="536.803" gradientUnits="userSpaceOnUse">
<stop stop-color="#819CFF"/>
<stop offset="0.65537" stop-color="#E73800"/>
<stop offset="1" stop-color="#819CFF"/>
</linearGradient>
<linearGradient id="paint3_linear_68_822" x1="1070.25" y1="449.7" x2="767.856" y2="1036.35" gradientUnits="userSpaceOnUse">
<stop stop-color="#3A4CF0"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint4_linear_68_822" x1="1694.5" y1="377.877" x2="1316" y2="916.154" gradientUnits="userSpaceOnUse">
<stop stop-color="#D73AF0"/>
<stop offset="1" stop-color="white" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint5_linear_68_822" x1="1427.52" y1="519.254" x2="1201.79" y2="922.897" gradientUnits="userSpaceOnUse">
<stop offset="0.166667" stop-color="#FF9471"/>
<stop offset="0.541667" stop-color="#DBC0C6" stop-opacity="0.69"/>
<stop offset="0.791667" stop-color="#C2DEFF" stop-opacity="0.62"/>
<stop offset="1" stop-color="#9492FF" stop-opacity="0"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,136 +0,0 @@
<svg width="1440" height="900" viewBox="0 0 1440 900" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="-1.50195" y="-3.47998" width="1491.69" height="872.683" fill="#9535E1"/>
<g filter="url(#filter0_f_2_1567)">
<path d="M5.8584 407.846L767.131 -16.7519L1113.17 -16.752L1536.64 96.4744L51.9959 729.328L5.8584 407.846Z" fill="url(#paint0_linear_2_1567)"/>
</g>
<g filter="url(#filter1_f_2_1567)">
<path d="M-35.2168 394.84L820.132 -3.7452L1113.17 -16.752L1536.64 96.4744L51.9959 729.328L-35.2168 394.84Z" fill="url(#paint1_linear_2_1567)"/>
</g>
<g filter="url(#filter2_f_2_1567)">
<ellipse cx="317.98" cy="110.585" rx="317.98" ry="110.585" transform="matrix(0.900676 -0.434491 0.305122 0.952313 607.015 273.158)" fill="#9D70FF"/>
</g>
<g filter="url(#filter3_f_2_1567)">
<ellipse cx="317.98" cy="110.585" rx="317.98" ry="110.585" transform="matrix(0.900676 -0.434491 0.305122 0.952313 373 356.521)" fill="#9D70FF"/>
</g>
<g opacity="0.4" filter="url(#filter4_f_2_1567)">
<path d="M699.922 27.4613C533.882 53.7501 326.778 104.137 123.246 27.4613C112.534 21.6194 104.321 27.8994 157.168 99.7555C223.227 189.576 439.257 152.333 699.922 27.4613Z" fill="#FDFF89"/>
</g>
<g opacity="0.3" filter="url(#filter5_f_2_1567)">
<path d="M639.454 39.8894C507.763 60.7398 343.504 100.703 182.077 39.8894C173.581 35.256 167.067 40.2369 208.981 97.2278C261.374 168.466 432.714 138.928 639.454 39.8894Z" fill="#FDFF89"/>
</g>
<path d="M709.192 336.955C1027.21 167.115 1159.03 159.028 1463.87 223.728L1564.39 442.093L94.5687 937.458C67.655 932.066 145.649 795.925 358.213 589.691C398.281 550.817 391.171 506.794 709.192 336.955Z" fill="url(#paint2_linear_2_1567)"/>
<g filter="url(#filter6_f_2_1567)">
<path d="M921.752 286.407C1258.49 184.451 1159.03 159.028 1463.87 223.729L1564.39 442.093L106.102 933.414C79.1886 928.022 48.4301 813.717 140.706 650.348C256.05 446.137 667.995 363.239 921.752 286.407Z" fill="#81F7FF"/>
</g>
<g filter="url(#filter7_f_2_1567)">
<path d="M826.182 355.152C1198.54 253.196 1179.76 159.029 1516.84 223.729L1564.39 442.094L-48.144 933.414C-77.9044 928.023 -111.916 813.718 -9.88045 650.349C117.664 446.137 545.583 431.983 826.182 355.152Z" fill="#81F7FF"/>
</g>
<g filter="url(#filter8_f_2_1567)">
<ellipse cx="317.98" cy="110.585" rx="317.98" ry="110.585" transform="matrix(0.900676 -0.434491 0.305122 0.952313 -3.0918 518.704)" fill="#707EFF"/>
</g>
<g opacity="0.8" filter="url(#filter9_f_2_1567)">
<ellipse cx="380.177" cy="161.796" rx="380.177" ry="161.796" transform="matrix(0.933505 -0.358564 0.247194 0.968966 476.48 543.488)" fill="#8026F1"/>
</g>
<g filter="url(#filter10_f_2_1567)">
<ellipse cx="317.98" cy="110.585" rx="317.98" ry="110.585" transform="matrix(0.900676 -0.434491 0.305122 0.952313 991.594 444.731)" fill="#FFBAF4"/>
</g>
<g filter="url(#filter11_f_2_1567)">
<ellipse cx="285.734" cy="170.346" rx="285.734" ry="170.346" transform="matrix(0.900676 -0.434491 0.305122 0.952313 -291 524.239)" fill="url(#paint3_linear_2_1567)"/>
</g>
<g filter="url(#filter12_f_2_1567)">
<path d="M-5 784.943V1160H1577V397.063L-5 784.943Z" fill="white"/>
</g>
<g filter="url(#filter13_f_2_1567)">
<path d="M1170.11 198.758L1628.29 -56L1514.59 250.723L1170.11 198.758Z" fill="#9651ED"/>
</g>
<defs>
<filter id="filter0_f_2_1567" x="-1.1416" y="-23.752" width="1544.79" height="760.08" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3.5" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter1_f_2_1567" x="-59.2168" y="-40.752" width="1619.86" height="794.08" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="12" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter2_f_2_1567" x="474.748" y="-97.4189" width="904.811" height="675.458" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter3_f_2_1567" x="240.733" y="-14.0562" width="904.811" height="675.458" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter4_f_2_1567" x="47.3262" y="-42.2056" width="720.596" height="259.483" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="34" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter5_f_2_1567" x="139.795" y="2.56738" width="535.658" height="169.938" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="18" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter6_f_2_1567" x="64.6963" y="174.236" width="1513.69" height="773.177" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="7" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter7_f_2_1567" x="-124.449" y="156.459" width="1734.83" height="822.956" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="23" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter8_f_2_1567" x="-135.358" y="148.127" width="904.811" height="675.458" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter9_f_2_1567" x="350.197" y="192.19" width="1042.35" height="743.511" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter10_f_2_1567" x="859.328" y="74.1538" width="904.811" height="675.458" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter11_f_2_1567" x="-408.271" y="194.025" width="853.202" height="736.576" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="82" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter12_f_2_1567" x="-137" y="265.063" width="1846" height="1026.94" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="66" result="effect1_foregroundBlur_2_1567"/>
</filter>
<filter id="filter13_f_2_1567" x="1102.11" y="-124" width="594.182" height="442.723" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="34" result="effect1_foregroundBlur_2_1567"/>
</filter>
<linearGradient id="paint0_linear_2_1567" x1="771.251" y1="-16.752" x2="92.1733" y2="508.724" gradientUnits="userSpaceOnUse">
<stop stop-color="#FED237"/>
<stop offset="1" stop-color="#FF0000" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint1_linear_2_1567" x1="803.5" y1="-0.783345" x2="870.787" y2="283.645" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC700"/>
<stop offset="0.53125" stop-color="#FF18BE" stop-opacity="0.484375"/>
<stop offset="1" stop-color="#6100FF" stop-opacity="0"/>
</linearGradient>
<linearGradient id="paint2_linear_2_1567" x1="1165.62" y1="276.298" x2="441.526" y2="512.908" gradientUnits="userSpaceOnUse">
<stop stop-color="#9281FF"/>
<stop offset="0.65537" stop-color="#81F7FF"/>
<stop offset="1" stop-color="#81D1FF"/>
</linearGradient>
<linearGradient id="paint3_linear_2_1567" x1="373.961" y1="100.557" x2="261.156" y2="328.531" gradientUnits="userSpaceOnUse">
<stop stop-color="#9651EE"/>
<stop offset="1" stop-color="#51C8EE"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

Some files were not shown because too many files have changed in this diff Show More