Remove docs after migrate to docs repo (#2465)

Co-authored-by: Hien To <tominhhien97@gmail.com>
This commit is contained in:
hiento09 2024-03-22 15:54:34 +07:00 committed by GitHub
parent b8cee875b1
commit a76c12766a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
440 changed files with 31 additions and 41434 deletions

View File

@ -1,75 +0,0 @@
name: "Clean old cloudflare pages preview urls and nightly build"
on:
schedule:
- cron: "0 0 * * *" # every day at 00:00
workflow_dispatch:
jobs:
clean-cloudflare-pages-preview-urls:
strategy:
matrix:
project: ["jan", "nitro"]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: install requests
run: |
python3 -m pip install requests pytz tqdm
- name: Python Inline script
uses: jannekem/run-python-script-action@v1
with:
script: |
import requests
from datetime import datetime, UTC
from pytz import timezone
from tqdm import tqdm
# Configuration
endpoint = "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/pages/projects/${{ matrix.project }}/deployments"
expiration_days = 3
headers = {
"Content-Type": "application/json;charset=UTF-8",
"Authorization": "Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}"
}
utc_tz = timezone('UTC')
# Fetch the list of deployments
response = requests.get(endpoint, headers=headers)
deployments = response.json()
for deployment in tqdm(deployments['result']):
# Calculate the age of the deployment
created_on = datetime.strptime(deployment['created_on'], "%Y-%m-%dT%H:%M:%S.%fZ").replace(tzinfo=utc_tz)
if (datetime.now(UTC) - created_on).days > expiration_days:
# Delete the deployment
delete_response = requests.delete(f"{endpoint}/{deployment['id']}", headers=headers)
if delete_response.status_code == 200:
print(f"Deleted deployment: {deployment['id']}")
else:
print(f"Failed to delete deployment: {deployment['id']}")
clean-cloudflare-r2:
runs-on: ubuntu-latest
environment: production
steps:
- name: install-aws-cli-action
uses: unfor19/install-aws-cli-action@v1
- name: Delete object older than 10 days
run: |
# Get the list of objects in the 'latest' folder
OBJECTS=$(aws s3api list-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --prefix "latest/" --query 'Contents[?LastModified<`'$(date -d "$current_date -10 days" -u +"%Y-%m-%dT%H:%M:%SZ")'`].{Key: Key}' --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | jq -c .)
# Create a JSON file for the delete operation
echo "{\"Objects\": $OBJECTS, \"Quiet\": false}" > delete.json
# Delete the objects
echo q | aws s3api delete-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --delete file://delete.json --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
# Remove the JSON file
rm delete.json
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
AWS_EC2_METADATA_DISABLED: "true"

View File

@ -0,0 +1,31 @@
name: "Clean Cloudflare R2 nightly build artifacts older than 10 days"
on:
schedule:
- cron: "0 0 * * *" # every day at 00:00
workflow_dispatch:
jobs:
clean-cloudflare-r2:
runs-on: ubuntu-latest
environment: production
steps:
- name: install-aws-cli-action
uses: unfor19/install-aws-cli-action@v1
- name: Delete object older than 10 days
run: |
# Get the list of objects in the 'latest' folder
OBJECTS=$(aws s3api list-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --prefix "latest/" --query 'Contents[?LastModified<`'$(date -d "$current_date -10 days" -u +"%Y-%m-%dT%H:%M:%SZ")'`].{Key: Key}' --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com | jq -c .)
# Create a JSON file for the delete operation
echo "{\"Objects\": $OBJECTS, \"Quiet\": false}" > delete.json
# Delete the objects
echo q | aws s3api delete-objects --bucket ${{ secrets.CLOUDFLARE_R2_BUCKET_NAME }} --delete file://delete.json --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
# Remove the JSON file
rm delete.json
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: auto
AWS_EC2_METADATA_DISABLED: "true"

View File

@ -1,114 +0,0 @@
name: Jan Docs
on:
push:
branches:
- main
- dev
- docs
paths:
- 'docs/**'
- '.github/workflows/jan-docs.yml'
pull_request:
branches:
- main
- dev
- docs
paths:
- 'docs/**'
- '.github/workflows/jan-docs.yml'
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
env:
CLOUDFLARE_PROJECT_NAME: jan
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install jq
uses: dcarbone/install-jq-action@v2.0.1
- name: Fill env vars
run: |
env_example_file=".env.example"
touch .env
while IFS= read -r line || [[ -n "$line" ]]; do
if [[ "$line" == *"="* ]]; then
var_name=$(echo $line | cut -d '=' -f 1)
echo $var_name
var_value="$(jq -r --arg key "$var_name" '.[$key]' <<< "$SECRETS")"
echo "$var_name=$var_value" >> .env
fi
done < "$env_example_file"
working-directory: docs
env:
SECRETS: '${{ toJson(secrets) }}'
- name: Install dependencies
run: yarn install
working-directory: docs
- name: Build website
run: sed -i '/process.env.DEBUG = namespaces;/c\// process.env.DEBUG = namespaces;' ./node_modules/debug/src/node.js && yarn build
working-directory: docs
- name: Publish to Cloudflare Pages PR Preview and Staging
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
directory: ./docs/build
branch: main
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Cloudflare Pages PR Preview and Staging
if: github.event_name == 'pull_request'
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
directory: ./docs/build
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
id: deployCloudflarePages
- uses: mshick/add-pr-comment@v2
if: github.event_name == 'pull_request'
with:
message: |
Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
- name: Add Custome Domain file
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && github.event.pull_request.head.repo.full_name != github.repository
run: echo "${{ vars.DOCUSAURUS_DOMAIN }}" > ./docs/build/CNAME
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/docs' && github.event.pull_request.head.repo.full_name != github.repository
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com

View File

@ -1,6 +0,0 @@
GTM_ID=xxxx
UMAMI_PROJECT_API_KEY=xxxx
UMAMI_APP_URL=xxxx
ALGOLIA_API_KEY=xxxx
ALGOLIA_APP_ID=xxxx
GITHUB_ACCESS_TOKEN=xxxx

20
docs/.gitignore vendored
View File

@ -1,20 +0,0 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@ -1,86 +0,0 @@
# Website & Docs
This website is built using [Docusaurus 3.0](https://docusaurus.io/), a modern static website generator.
### Information Architecture
We try to **keep routes consistent** to maintain SEO.
- **`/guides/`**: Guides on how to use the Jan application. For end users who are directly using Jan.
- **`/developer/`**: Developer docs on how to extend Jan. These pages are about what people can build with our software.
- **`/api-reference/`**: Reference documentation for the Jan API server, written in Swagger/OpenAPI format.
- **`/changelog/`**: A list of changes made to the Jan application with each release.
- **`/blog/`**: A blog for the Jan application.
### Sidebar Autogeneration
The order of each page is either explicitly defined in `sidebar.js` or follows the [Docusaurus autogenerated](https://docusaurus.io/docs/next/sidebar/autogenerated) naming format, `##-path-name.md`.
Important slugs are hardcoded at the document level (and shouldn't be rerouted):
```
---
title: Overview
slug: /docs
---
```
## How to Contribute
Refer to the [Contributing Guide](https://github.com/janhq/jan/blob/dev/CONTRIBUTING.md) for more comprehensive information on how to contribute to the Jan project.
### Pre-requisites and Installation
- [Node.js](https://nodejs.org/en/) (version 20.0.0 or higher)
- [yarn](https://yarnpkg.com/) (version 1.22.0 or higher)
#### Installation
```bash
cd jan/docs
yarn install
yarn start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
#### Build
```bash
yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
Using SSH:
```bash
USE_SSH=true yarn deploy
```
Not using SSH:
```bash
GIT_USER=<Your GitHub username> yarn deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
### Preview URL, Pre-release and Publishing Documentation
- When a pull request is created, the preview URL will be automatically commented on the pull request.
- The documentation will then be published to [https://dev.jan.ai/](https://dev.jan.ai/) when the pull request is merged to `dev`.
- Our open-source maintainers will sync the updated content from `dev` to `docs` branch, which will then be published to [https://jan.ai/](https://jan.ai/).
### Additional Plugins
- @docusaurus/theme-live-codeblock
- [Redocusaurus](https://redocusaurus.vercel.app/): manually upload swagger files at `/openapi/jan.yaml` to update the API reference documentation.

View File

@ -1,3 +0,0 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};

View File

@ -1,141 +0,0 @@
---
title: 'Post Mortem: Bitdefender False Positive Flag'
description: "10th January 2024, Jan's 0.4.4 Release on Windows triggered Bitdefender to incorrectly flag it as infected with Gen:Variant.Tedy.258323, leading to automatic quarantine warnings on users' computers."
slug: /postmortems/january-10-2024-bitdefender-false-positive-flag
tags: [Postmortem]
keywords:
[
postmortem,
bitdefender,
false positive,
antivirus,
jan,
nitro,
incident,
incident response,
supply chain security,
user communication,
documentation,
antivirus compatibility,
cross-platform testing,
proactive incident response,
user education,
lessons learned,
]
---
Following the recent incident related to Jan version 0.4.4 triggering Bitdefender on Windows with Gen:Variant.Tedy.258323 on January 10, 2024, we wanted to provide a comprehensive postmortem and outline the necessary follow-up actions.
## Incident Overview
### Bug Description
Jan 0.4.4 installation on Windows triggered Bitdefender to flag it as infected with Gen:Variant.Tedy.258323, leading to automatic quarantine.
### Affected Antivirus
- McAfee / Microsoft Defender was unaffected
- Bitdefender consistently flagged the issue.
### Incident Timeline
- _10 Jan, 2:18 am SGT:_ Hawke flags up Malware antivirus errors for 0.4.4 installation on Windows computers.
- _10 Jan, 2:21 am SGT:_ @0xSage responds in Discord.
- _10 Jan, 2:35 am SGT:_ Hawke confirms multiple people have experienced this error on fresh installs.
- _10 Jan, 2:41 am SGT:_ @louis-jan and @dan-jan revert 0.4.4 out of an abundance of caution.
- _Incident ongoing:_ To triage and investigate the next day.
- _10 Jan, 11:36 am SGT:_ @Hien has investigated all versions of Nitro and conducted scans using Bitdefender. Only the 2 latest versions raised warnings (0.2.7, 0.2.8).
- _10 Jan, 12:44 pm SGT:_ @Hien tested again for the 0.2.6 and suggested using 0.2.6 for now, the 2 remaining Nitro version (0.2.7, 0.2.8) will under further investigation.
- The team started testing on the fixed build.
- _10 Jan, 3:22 pm SGT:_ Diagnosis found that it's most likely a false positive. @Hien has only found a solution by attempting to build Nitro Windows CPU on a GitHub-hosted runner and hasn't identified the root cause yet.
- _10 Jan, 5:24 pm SGT:_ @Hien testing two scenarios and still trying to understand the workings of Bitdefender.
- _11 Jan, 5:46 pm SGT:_ Postmortem meeting
## Investigation Update
- @Hien has investigated all versions of Nitro and conducted scans using Bitdefender. and only the 2 latest versions raised warnings from Bitdefender. Nitro 0.2.6, which is the highest version without the issue, was tested again, and it no longer triggers a warning from Bitdefender.
- We have observed that Nitro versions up to 0.2.6 remain unaffected. However, Bitdefender flags versions 0.2.7 and 0.2.8 as infected, leading to the deletion. In order to proceed with the current release, Hien suggests downgrading Nitro to version 0.2.6 and conducting tests with this version. Simultaneously, he will investigate why Bitdefender is flagging versions 0.2.7 and 0.2.8.
- It's essential to note that between versions 0.2.6, 0.2.7, and 0.2.8, only minor changes were made, which should not trigger a malicious code warning. We can refer to the changelog between 0.2.7 and 0.2.8 to pinpoint these changes.
- Our primary message is to convey that we did not introduce malicious code into Jan (indicating a false positive), and the investigation aims to understand the root cause behind Bitdefender flagging versions 0.2.7 and 0.2.8.
- The current diagnosis looks like a false positive but it's still under investigation. Reference link: [here](https://stackoverflow.com/questions/75886428/fake-positive-bit-defender-problem-genvariant-tedy-304469), [here](https://stackoverflow.com/questions/58010466/bitdefender-detects-my-console-application-as-genvariant-ursu-56053), and [here](https://www.cisa.gov/sites/default/files/2023-06/mar-10365227.r1.v1.clear_.pdf).
- @Hien testing two scenarios and still trying to understand the workings of Bitdefender. Still under investigation: is the issue with the code or the CI?
- In Case 1, using the same CI agent for tags 0.2.6 and 0.2.8, after PRs by Alan and myself, Bitdefender flagged the Nitro CPU binary build. Naturally, one would conclude this is due to the code.
- However, I proceeded with a further experiment: for the 0.2.8 code, instead of using our CI agent, I used a GitHub hosted agent. This time, Bitdefender did not flag our binary build.
- We've identified the Bitdefender warning was not an attack. There is no malicious code
- We've isolated the event to originate from a CI agent, which resulted in a BitDefender false positive alert.
## Follow-ups and Action Items
1. **Reproduce Bitdefender Flag in Controlled Environment [Done]:**
- _Objective:_ To replicate the issue in a controlled environment to understand the triggers and specifics of Bitdefender's detection.
2. **Investigate Malicious Code or False Positive:**
- _Objective:_ Determine whether the flagged issue is a result of actual malicious code or a false positive. If it's a false positive, work towards resolution while communicating with Bitdefender.
3. **Supply Chain Attack Assessment:**
- _Objective:_ Evaluate the possibility of a supply chain attack. Investigate whether the Nitro 0.4.4 distribution was compromised or tampered with during the release process.
4. **Testing after the Hotfix:**
- _Objective:_ In addition to verifying the issue after the fix, it is essential to conduct comprehensive testing across related areas, ensuring compatibility across different operating systems and antivirus software (latest version / free version only).
5. **Process Improvement for Future Releases:**
- _Objective:_ Identify and implement improvements to our release process to prevent similar incidents in the future. This may include enhanced testing procedures, code analysis, and collaboration with antivirus software providers during the pre-release phase. Additionally, we should add verifying the latest antivirus software in the release checklist.
6. **Documentation of Tested Antivirus Versions:**
- _Objective:_ Create a document that outlines the testing conducted, including a matrix that correlates Jan versions with the tested antivirus versions.
- _Sample list:_ for consideration purpose
- Bitdefender
- McAfee
- Avira
- Kaspersky
- Norton
- Microsoft defender
- AVG
- TotalAV
## Next Steps
- The team should follow up on each action item with clear ownership priority, and deadlines.
- Communicate progress transparently with the community and clients through appropriate channels. If any insights or suggestions, share them within the dedicated channels.
- Update internal documentation and procedures based on the lessons learned from this incident.
## Lessons Learned
1. **Antivirus Compatibility Awareness:**
- _Observation:_ The incident underscored the significance of recognizing and testing for antivirus compatibility, particularly with widely-used solutions like Bitdefender.
- _Lesson Learned:_ In the future, we will integrate comprehensive checks for compatibility with various antivirus software, including both antivirus and "Malicious Code Detection," into our CI or QA checklist. This proactive measure aims to minimize false positive detections during the release and testing processes.
2. **Cross-Platform Testing:**
- _Observation:_ The problem did not occur on MacOS and Linux systems, implying a potential oversight in cross-platform testing during our release procedures.
- _Lesson Learned:_ Clarification — This observation is not directly related to antivirus testing. Instead, it underscores the necessity to improve our testing protocols, encompassing multiple operating systems. This ensures a thorough evaluation of potential issues on diverse platforms, considering the various antivirus software and differences in architectures on Mac and Linux systems.
3. **User Communication and Documentation:**
- _Observation:_ Due to the timely response from Nicole, who was still active on Discord and Github at 2 am, this quick response facilitated our ability to assess the impact accurately.
- _Lesson Learned:_ While our communication with users was effective in this instance, it was mainly due to Nicole's presence during the incident. To improve our overall response capability, we should prioritize "24/7 rapid triage and response." This involves ensuring continuous availability or establishing a reliable rotation of team members for swift user communication and issue documentation, further enhancing our incident response efficiency.
4. **Proactive Incident Response:**
- _Observation:_ The incident response, while involving a prompt version rollback, experienced a slight delay due to the release occurring at midnight. This delay postponed the initiation of the investigation until the next working hours.
- _Lesson Learned:_ Recognizing the importance of swift incident response, particularly in time-sensitive situations, we acknowledge that releasing updates during off-hours can impact the immediacy of our actions. Moving forward, we will strive to optimize our release schedules to minimize delays and ensure that investigations can commence promptly regardless of the time of day. This may involve considering alternative release windows or implementing automated responses to critical incidents, ensuring a more proactive and timely resolution.
5. **Supply Chain Security Measures:**
- _Observation:_ While the incident prompted consideration of a potential supply chain attack, it's crucial to emphasize that this was not the case. Nonetheless, the incident underscored the importance of reviewing our supply chain security measures.
- _Lesson Learned:_ Going forward, we should strengthen supply chain security by introducing additional verification steps to uphold the integrity of our release process. Collaborating with distribution channels is essential for enhancing security checks and ensuring a robust supply chain.
- _Longer-term:_ Exploring options for checking Jan for malicious code and incorporating antivirus as part of our CI/CD pipeline should be considered for a more comprehensive and proactive approach.
6. **User Education on False Positives:**
- _Observation:_ Users reported Bitdefender automatically "disinfecting" the flagged Nitro version without allowing any user actions.
- _Lesson Learned:_ Educate users about the possibility of false positives and guide them on how to whitelist or report such incidents to their antivirus provider (if possible). Provide clear communication on steps users can take in such situations.
These lessons learned will serve as a foundation for refining our processes and ensuring a more resilient release and incident response framework in the future. Continuous improvement is key to maintaining the reliability and security of our software.
Thank you for your dedication and cooperation in resolving this matter promptly.

View File

@ -1,145 +0,0 @@
---
title: Benchmarking TensorRT-LLM vs. llama.cpp
description: Jan has added support for the TensorRT-LLM Inference Engine, as an alternative to llama.cpp. We provide a performance benchmark that shows the head-to-head comparison of the two Inference Engine and model formats, with TensorRT-LLM providing better performance but consumes significantly more VRAM and RAM.
tags: [Nvidia, TensorRT-LLM, llama.cpp, 3090, 4090, "inference engine"]
unlisted: true
---
Jan has added support [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) as an alternative to the default [llama.cpp](https://github.com/ggerganov/llama.cpp) inference engine. TensorRT-LLM allows Nvidia GPU owners to run blazing fast LLM inference as a hardware-optimized LLM inference engine that compiles models to [run extremely fast on Nvidia GPUs](https://blogs.nvidia.com/blog/tensorrt-llm-windows-stable-diffusion-rtx/).
You can follow our [TensorRT-LLM Guide](/guides/providers/tensorrt-llm) to try it out today. We've also added a few TensorRT-LLM models to Jan's Model Hub for download:
- Mistral 7b
- TinyLlama-1.1b
- TinyJensen-1.1b 😂
:::tip
TensorRT-LLM support is available in [v0.4.9](https://github.com/janhq/jan/releases/tag/v0.4.9), but should be considered an experimental feature.
Please report bugs on [Github](https://github.com/janhq/jan) or on our Discord's [#tensorrt-llm](https://discord.com/channels/1107178041848909847/1201832734704795688) channel.
:::
## Performance Benchmarks
We were really curious to see how TensorRT-LLM would perform vs. llama.cpp on consumer-grade GPUs. TensorRT-LLM has previously been shown by Nvidia to reach performance of up to [10,000 tokens/s](https://nvidia.github.io/TensorRT-LLM/blogs/H100vsA100.html) on datacenter-grade GPUs. As most of Jan's users are proud card carrying members of the [GPU Poor](https://www.semianalysis.com/p/google-gemini-eats-the-world-gemini#the-gpu-poor), we wanted to see how the two inference engine performed on the same hardware.
:::info
An interesting aside: Jan actually started out in June 2023 building on [FastTransformer](https://github.com/NVIDIA/FasterTransformer), the precursor library to TensorRT-LLM. TensorRT-LLM was released in September 2023, making it a very young library. We're excited to see it's roadmap develop!
:::
### Test Setup
We picked 3 hardware platforms to run the test on, based on Jan's userbase's self-reported common hardware platforms.
| NVIDIA GPU | VRAM Used (GB) | CUDA Cores | Tensor Cores | Memory Bus Width (bit) | Memory Bandwidth (GB/s) |
| ------------------------- | -------------- | ---------- | ------------ | ---------------------- | ----------------------- |
| RTX 4090 Desktop (Ada) | 24 | 16,384 | 512 | 384 | ~1000 |
| RTX 3090 Desktop (Ampere) | 24 | 10,496 | 328 | 384 | 935.8 |
| RTX 4060 Laptop (Ada) | 8 | 3,072 | 96 | 128 | 272 |
:::warning[Low-spec Machines?]
We didn't bother including low-spec machines: TensorRT-LLM is meant for performance, and simply doesn't work on lower grade Nvidia GPUs, or computers without GPUs.
TensorRT-LLM provides blazing fast performance at the cost of [memory usage](https://nvidia.github.io/TensorRT-LLM/memory.html). This means that the performance improvements only show up in higher-range GPUs with larger VRAMs.
We've found that [llama.cpp](https://github.com/ggerganov/llama.cpp) does an incredible job of democratizing inference to the [GPU Poor](https://www.semianalysis.com/p/google-gemini-eats-the-world-gemini#the-gpu-poor) with CPU-only or lower-range GPUs. Huge shout outs to the [llama.cpp maintainers](https://github.com/ggerganov/llama.cpp/graphs/contributors) and the [ggml.ai](https://ggml.ai/) team.
:::
We chose the popular Mistral 7b model to run on both GGUF and TensorRT-LLM, picking comparable quantizations.
#### llama.cpp Setup
- For llama.cpp, we used `Mistral-7b-q4_k_m`
- [ ] Fill in `ngl` params, GPU offload etc
#### TensorRT-LLM Setup
- For TensorRT-LLM, we used `Mistral-7b-int4 AWQ`
- We ran TensorRT-LLM with `free_gpu_memory_fraction` to test it with the lowest VRAM consumption (performance may be affected)
- Note: We picked AWQ for TensorRT-LLM as a handicap as AWQ supposedly sacrifices performance for quality
#### Experiment Setup
We ran the experiment using a standardized inference request in a sandboxed environment on the same machine:
- We ran tests 5 times for each inference engine, on a baremetal PC with no other applications open
- Each inference request was of `batch_size` 1 and `input_len` 2048, `output_len` 512 as a realistic test case
- CPU and Memory usage were obtained from.... Windows Task Manager 😱
- GPU usage was obtained from `nvtop`, `htop`, and `nvidia-smi`
## Results
Our biggest takeaway: TensorRT-LLM is faster than llama.cpp on 4090s and 3090s with larger VRAMs. However, on smaller GPUs (e.g. Laptop 4060 GPUs),
| | 4090 Desktop | 3090 Desktop | 4060 Laptop |
| ------------ | ------------ | ------------ | ----------- |
| TensorRT-LLM | ✅ 159t/s | ✅ 140.27t/s | ❌ 19t/s |
| llama.cpp | 101.3t/s | 90t/s | 22t/s |
### RTX-4090 Desktop
:::info[Hardware Details]
- CPU: Intel 13th series
- GPU: NVIDIA GPU 4090 (Ampere - sm 86)
- RAM: 32GB
- OS: Windows 11 Pro on Proxmox
:::
Nvidia's RTX-4090 is their top-of-the-line consumer GPU, and retails for [approximately $2,000](https://www.amazon.com/rtx-4090/s?k=rtx+4090).
#### Mistral-7b int4
| Metrics | GGUF (using GPU) | TensorRT-LLM | Difference |
| -------------------- | -------------------- | ------------ | -------------- |
| Throughput (token/s) | 101.3 | 159 | ✅ 57% faster |
| VRAM Used (GB) | 5.5 | 6.3 | 🤔 14% more |
| RAM Used (GB) | 0.54 | 0.42 | 🤯 20% less |
| Disk Size (GB) | 4.07 | 3.66 | 🤯 10% smaller |
### RTX-3090 Desktop
:::info[Hardware Details]
- CPU: Intel 13th series
- GPU: NVIDIA GPU 3090 (Ampere - sm 86)
- RAM: 64GB
- OS: Windows
:::
#### Mistral-7b int4
| Metrics | GGUF (using GPU) | TensorRT-LLM | Difference |
| -------------------- | -------------------- | ------------ | ------------ |
| Throughput (token/s) | 90 | ✅ 140.27 | ✅ 55% faster |
| VRAM Used (GB) | 6.0 | 6.8 | 🤔 13% more |
| RAM Used (GB) | 0.54 | 0.42 | 🤯 22% less |
| Disk Size (GB) | 4.07 | 3.66 | 🤯 10% less |
### RTX-4060 Laptop
- [ ] Dan to re-run perf tests and fill in details
:::info[Hardware Details]
- Manufacturer: Acer Nitro 16 Phenix
- CPU: Ryzen 7000
- RAM: 16GB
- GPU: NVIDIA Laptop GPU 4060 (Ada)
:::
#### Mistral-7b int4
| Metrics | GGUF (using the GPU) | TensorRT-LLM | Difference |
| -------------------- | -------------------- | ------------ | ---------- |
| Throughput (token/s) | 22 | ❌ 19 | |
| VRAM Used (GB) | 2.1 | 7.7 | |
| RAM Used (GB) | 0.3 | 13.5 | |
| Disk Size (GB) | 4.07 | 4.07 | |

View File

@ -1,76 +0,0 @@
dan-jan:
name: Daniel Onggunhao
title: Co-Founder
url: https://github.com/dan-jan
image_url: https://avatars.githubusercontent.com/u/101145494?v=4
email: daniel@jan.ai
namchuai:
name: Nam Nguyen
title: Developer
url: https://github.com/namchuai
image_url: https://avatars.githubusercontent.com/u/10397206?v=4
email: james@jan.ai
hiro-v:
name: Hiro Vuong
title: MLE
url: https://github.com/hiro-v
image_url: https://avatars.githubusercontent.com/u/22463238?v=4
email: hiro@jan.ai
ashley-jan:
name: Ashley Tran
title: Product Designer
url: https://github.com/imtuyethan
image_url: https://avatars.githubusercontent.com/u/89722390?v=4
email: ashley@jan.ai
hientominh:
name: Hien To
title: DevOps Engineer
url: https://github.com/hientominh
image_url: https://avatars.githubusercontent.com/u/37921427?v=4
email: hien@jan.ai
Van-QA:
name: Van Pham
title: QA & Release Manager
url: https://github.com/Van-QA
image_url: https://avatars.githubusercontent.com/u/64197333?v=4
email: van@jan.ai
louis-jan:
name: Louis Le
title: Software Engineer
url: https://github.com/louis-jan
image_url: https://avatars.githubusercontent.com/u/133622055?v=4
email: louis@jan.ai
hahuyhoang411:
name: Rex Ha
title: LLM Researcher & Content Writer
url: https://github.com/hahuyhoang411
image_url: https://avatars.githubusercontent.com/u/64120343?v=4
email: rex@jan.ai
automaticcat:
name: Alan Dao
title: AI Engineer
url: https://github.com/tikikun
image_url: https://avatars.githubusercontent.com/u/22268502?v=4
email: alan@jan.ai
hieu-jan:
name: Henry Ho
title: Software Engineer
url: https://github.com/hieu-jan
image_url: https://avatars.githubusercontent.com/u/150573299?v=4
email: hieu@jan.ai
0xsage:
name: Nicole Zhu
title: Co-Founder
url: https://github.com/0xsage
image_url: https://avatars.githubusercontent.com/u/69952136?v=4
email: nicole@jan.ai

View File

@ -1,12 +0,0 @@
---
title: Jan's Vision for 2035
---
[Jan 2035: A Robotics Company](https://hackmd.io/QIWyYbNNQVWVbupuI3kjAA)
We only have 2 planning parameters:
- 10 year vision
- 2 week sprint
And we measure our success on Quarterly OKRs

View File

@ -1,120 +0,0 @@
---
title: About Jan
slug: /about
description: Jan is a desktop application that turns computers into thinking machines.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
about Jan,
desktop application,
thinking machine,
]
---
Jan turns computers into thinking machines to change how we use them.
Jan is created and maintained by Jan Labs, a robotics company.
With Jan, you can:
- Run [open-source LLMs](https://huggingface.co/models?pipeline_tag=text-generation) locally or connect to cloud AIs like [ChatGPT](https://openai.com/blog/openai-api) or [Google](https://ai.google.dev/).
- Fine-tune AI with specific knowledge.
- Supercharge your productivity by leveraging AI.
- Search the web and databases.
- Integrate AI with everyday tools to work on your behalf (with permission).
- Customize and add features with Extensions.
:::tip
Jan aims for long-term human-robot collaboration, envisioning AI as a harmonious extension of human capabilities. Our goal is to build customizable robots that we continually improve and customize, growing together.
:::
![Human repairing a Droid](/img/star-wars-droids.png)
## Jans principles
- **Ownership**: Jan is committed to developing a product that fully belongs to users. You're the true owner, free from data tracking and storage by us.
- **Privacy**: Jan works locally by default, allowing use without an internet connection. Your data stays on your device in a universal format, giving you complete privacy control.
- **100% User Supported**: Every user can access, develop, and customize Jan's codebases to suit their needs.
- **Rejecting Dark Patterns**: We never use tricks to extract more money or lock you into an ecosystem.
## Why do we exist?
> _"I do not fear computers. I fear the lack of them." - Isaac Asimov_
Jan was founded on the belief that AI should coexist with humans, not replace them. Our mission is to democratize AI access, ensuring everyone can easily utilize it with full ownership and control over their data, free from privacy concerns.
### What are the things Jan committed on?
We are committed to creating open, local-first products that extend individual freedom, rejecting dark patterns and ecosystem lock-ins, and embracing an open-source ethos.
#### What's different about it?
| | Status Quo | Jan |
| --------------------- | -------------------------- | ---------------------------------------------------------------------- |
| **Ownership** | Owned by Big Tech | Fully owned by you |
| **Openness** | Closed-source | [Open-source (AGPLv3)](https://github.com/janhq/jan/blob/main/LICENSE) |
| **Your Role** | Consumer | Creator |
| **Approach** | Cloud-based | [Local-first](https://www.inkandswitch.com/local-first/) |
| **Data Handling** | Stored on external servers | Stored locally, openly accessible |
| **Privacy** | Questionable | Private and offline |
| **Transparency** | Opaque "Black Box" | Open-source and customizable |
| **Outage Resilience** | Potential data hostage | Continues to work on your device |
| **Philosophy** | User monetization | Empowerment with the right to repair |
## How we work
Jan is an open-source product with transparent development and future features. Users have the right to modify and customize Jan. We are committed to building an open-source AI ecosystem.
Jan is building in public using GitHub, where anyone is welcome to join. Key resources include Jan's [Kanban](https://github.com/orgs/janhq/projects/5/views/7) and Jan's [Roadmap](https://github.com/orgs/janhq/projects/5/views/29).
Jan has a fully-remote team, primarily based in the APAC timezone, and we use Discord and GitHub for collaboration. Our community is central to our operations, and we embrace asynchronous work. We hold meetings only for synchronization and vision sharing, using [Excalidraw](https://excalidraw.com/) or [Miro](https://miro.com/) for visualization and sharing notes on Discord for alignment. We also use [HackMD](https://hackmd.io/) to document our ideas and build a Jan library.
## How to get it?
You can install and start using Jan in less than 5 minutes, from [Jan.ai](https://jan.ai) or our [Github repo](https://github.com/janhq/jan).
## What license is the code under?
Jan is licensed under the [AGPLv3 License](https://github.com/janhq/jan/blob/main/LICENSE).
We happily accept pull requests, however, we do ask that you sign a [Contributor License Agreement](https://en.wikipedia.org/wiki/Contributor_License_Agreement) so that we have the right to relicense your contributions[^2].
## What was it built with?
[Jan](https://github.com/janhq/jan) is pragmatically built using `Typescript` at the application level and `C++` at the Inference level (which we have refactored into [Nitro](https://nitro.jan.ai)[^3]).
We follow [clean architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) and currently support multiple frameworks and runtimes:
- A desktop client with [Electron](https://www.electronjs.org/)
- A headless server-mode with [Nodejs](https://nodejs.org/en)
- Planned support for mobile with [Capacitor](https://capacitorjs.com/)
- Planned support for Python runtime
Architecturally, we have made similar choices to the [Next.js Enterprise Javascript Stack](https://vercel.com/templates/next.js/nextjs-enterprise-boilerplate), which is a [battle-tested](https://nextjs.org/showcase/enterprise) framework for building enterprise-grade applications that scale.
## Join the team
Join us on this journey at Jan Labs, where we embrace open-source collaboration and transparency. Together, let's shape a future where Jan becomes an essential companion in the open-source community. Explore [careers](https://janai.bamboohr.com/careers) with us.
## Contact
Drop us a message in our [Discord](https://discord.gg/af6SaTdzpx) and we'll get back to you.
- `#general`: for general discussion
- `#get-help`: for bug reports and troubleshooting
- `#roadmap`: for feature requests and ideas
## Footnotes
[^1]: Credit to Obsidian's original website
[^2]: Credit to [Discourse's About Page](https://www.discourse.org/about)
[^3]: Credit to [Llama.cpp](https://github.com/ggerganov/llama.cpp), [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM), [vLLM](https://github.com/vllm-project/vllm), [LMDeploy](https://github.com/InternLM/lmdeploy) and more.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 KiB

View File

@ -1,69 +0,0 @@
---
title: Frequently Asked Questions (FAQ) - Jan
---
# Frequently Asked Questions (FAQ)
## What is Jan?
Jan is software that helps you run large language models (LLMs) on your everyday tasks. For details, read the [About page](https://jan.ai/about/).
## How do I use Jan?
Download Jan to your computer, choose a compatible LLM, or connect to a remote AI with the API code to start. You can switch between them as needed.
## Is Jan compatible with my operating system?
Jan is available for Mac, Windows, and Linux, ensuring wide compatibility.
## Do you use my data?
No. See our data and analytics policy [here](https://jan.ai/privacy/#:~:text=We%20do%20not%20share%20your,with%20a%20better%20user%20experience.).
## Do you sell my data?
No. We don't even track your data. Jan is yours.
## How does Jan ensure my data remains private?
Jan prioritizes your privacy by running open-source AI models 100% offline on your computer, ensuring all conversations, documents, and files stay private.
## What does "Jan" stand for?
Jan stands for “Just Another Neuron”, as we are passionate about building software that complements in your existing neural pathways. But in the spirit of full transparency, it was also just a nice 3 letter domain name we owned 😂.
## Can I use Jan without an internet connection?
Yes, Jan can run locally without an internet connection for many features.
## Are there any costs associated with using Jan?
Jan is free to use. However, if you want to connect to remote APIs, like GPT-4, you will need to put in your own API key.
## What types of AI models can I download or import with Jan?
You can download popular AI models or import any model of your choice through Jan's Hub.
## How do I customize Jan using the programmable API?
The API allows you to tailor Jan to your needs, but specific details on usage would require consulting Jan's documentation.
## How can I contribute to Jan's development or suggest features?
Contributions can be made through [GitHub](https://github.com/janhq/jan) and [Discord](https://discord.gg/Exe46xPMbK), where you can also suggest features and contribute.
## How can I get involved with the Jan community?
Joining [Jan's Discord server](https://discord.gg/qSwXFx6Krr) is a great way to get involved with the community.
## How do I troubleshoot issues with installing or using Jan?
For troubleshooting, you should reach out on Discord and check GitHub for assistance and support from the community and the development team.
## Can I self-host?
Yes! We love the self-hosted movement. Jan is available as a Helm chart/ Docker composes which can be run across home servers or even production-level environments.
## Are you hiring?
We often hire directly from our community. If you are interested in applying, please see our careers page [here](https://janai.bamboohr.com/careers).

View File

@ -1,6 +0,0 @@
---
title: Roadmap
---
- [ ] [Immediate Roadmap on Github](https://github.com/orgs/janhq/projects/5/views/16)
- [ ] [Longer-term Roadmap on Discord](https://discord.gg/Ey62mynnYr)

View File

@ -1,74 +0,0 @@
---
title: Jan's Vision
slug: /vision
description: Jan is a desktop application that turns computers into thinking machines.
keywords:
[
Jan AI,
Jan,
ChatGPT alternative,
local AI,
private AI,
conversational AI,
no-subscription fee,
large language model,
about Jan,
desktop application,
thinking machine,
jan vision,
]
---
## Jan's vision is to shape a future where humans and machines collaborate, continuing our legacy as toolmakers
Throughout history, humanity has thrived by mastering tools, from [controlling fire](https://en.wikipedia.org/wiki/Control_of_fire_by_early_humans) to [inventing the wheel](https://en.wikipedia.org/wiki/Wheel). These leaps weren't just about survival, they were foundational to our civilization.
Today, we stand on the brink of a new frontier with artificial intelligence. AI is not merely another tool, it represents a new form of collaboration between humans and machines - promising to enhance our creativity, augment our lives, and deepen our understanding of the world.
![jan ai shapes the future](./assets/vision-1.webp)
In the future we envision, AI will be as integral to our lives as fire and the wheel once were, with each individual having their own machines/robots. Mastering AI, like mastering fire, will require understanding its potential, respecting its power, and learning to control it for the betterment of humanity.
### Inspired by Science Fiction, Grounded in Optimism
Our vision is influenced by the harmonious coexistence of humans and machines in science fiction. From the helpful companionship of [C3PO](https://tr.wikipedia.org/wiki/C-3PO) and [Jarvis](https://en.wikipedia.org/wiki/J.A.R.V.I.S.) to the strategic alliances in [Halo](https://www.imdb.com/title/tt2934286/), these stories showcase a future where technology amplifies human potential.
### Jan's Role in Shaping the Future
Jan is our contribution to this future - a tool designed to augment human capabilities, not replace them. We are committed to developing AI that works for humanity, enhancing our creativity, productivity, and well-being. With Jan, we aim to empower individuals and communities to achieve more, together.
Our vision is not just a dream, it's a blueprint for a future where technology and humanity harmonize to unlock unprecedented possibilities.
## How we imagine the world in the future
We are fundamentally optimistic about the future. Jan aligns with the [Solarpunk movement](https://en.wikipedia.org/wiki/Solarpunk), which envisions a world where technology and nature coexist and flourish together. We reject the notion of climate doomerism and instead, focus on the positive impact we can make with AI.
![solarpunk and jan](./assets/solar-punk.webp)
Imagine a world where every individual is empowered by their own robots, where machines are not just tools but partners in our journey. This is the future Jan is striving to create.
Now, let's take a glimpse into this future through a day in the life of Emre, a reflection of how Jan's vision manifests in everyday life.
## A Day in the Life of Emre in 2050
> In 2050, Emre wakes up to the gentle sound of birds chirping, a soothing alarm created by **his own AI robot, Jan**. As he gets ready for the day, **Jan has already prepared** his schedule, factoring in his preferences and the day's weather.
>
> At breakfast, Emre discusses his upcoming project with **Jan, who offers insights and suggestions**, enhancing Emre's creativity. As he heads to work, his self-driving car, **integrated with Jan**, takes the most scenic and efficient route, allowing Emre to enjoy a moment of tranquility.
>
> In the office, Emre collaborates with colleagues from around the globe in a virtual workspace. **Jan assists** by translating languages in real-time and organizing ideas, making collaboration seamless and productive.
>
> During lunch, Emre decides to explore a new hobby. **Jan quickly curates** a list of resources and connects Emre with a virtual mentor, making learning accessible and enjoyable.
>
> In the afternoon, Emre takes a break to connect with nature. His smart garden, **managed by Jan**, is thriving, blending technology with the natural world in perfect harmony.
>
> As the day winds down, Emre reflects on his accomplishments. **With Jan's help**, he's been able to focus on what truly matters, achieving a balance between work, personal growth, and well-being.
>
> In 2050, Jan is more than just a tool, it's an integral part of Emre's life, **augmenting his abilities** and enabling him to live a more fulfilling life.
What a day, hah!
---
Jan's vision commits to developing thinking machines that work alongside humans - learning, adapting, and contributing to a broader, smarter society. This journey isn't just about technology. It's about creating a future where humans and machines collaborate.
Let's build the future together - join the journey!

View File

@ -1,28 +0,0 @@
---
title: Acknowledgements
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
slug: /acknowledgements
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
acknowledgements,
third-party libraries,
]
---
# Acknowledgements
We would like to express our gratitude to the following third-party libraries that have made the development of Jan possible.
- [llama.cpp](https://github.com/ggerganov/llama.cpp/blob/master/LICENSE)
- [LangChain.js](https://github.com/langchain-ai/langchainjs/blob/main/LICENSE)
- [TensorRT](https://github.com/NVIDIA/TensorRT/blob/main/LICENSE)
- [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM/blob/main/LICENSE)

View File

@ -1,52 +0,0 @@
---
title: Jan's Community
slug: /community
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
about Jan,
desktop application,
thinking machine,
community,
socials,
]
---
## Socials
- [Discord](https://discord.gg/SH3DGmUs6b)
- [X](https://twitter.com/janframework)
- [HuggingFace](https://huggingface.co/janhq)
- [LinkedIn](https://www.linkedin.com/company/janframework/)
## Community Run
- [Reddit](https://www.reddit.com/r/janframework/)
## Careers
- [Jobs](https://janai.bamboohr.com/careers)
## Newsletter
<iframe
width="100%"
height="600px"
src="https://c0c7c086.sibforms.com/serve/MUIFAEWm49nC1OONIibGnlV44yxPMw6Fu1Yc8pK7nP3jp7rZ6rvrb5uOmCD8IIhrRj6-h-_AYrw-sz7JNpcUZ8LAAZoUIOjGmSvNWHwoFhxX5lb-38-fxXj933yIdGzEMBZJv4Nu2BqC2A4uThDGmjM-n_DZBV1v_mKbTcVUWVUE7VutWhRqrDr69IWI4SgbuIMACkcTiWX8ZNLw"
frameborder="0"
scrolling="auto"
allowfullscreen
style={{
margin: 'auto',
maxWidth: '100%',
}}
></iframe>

View File

@ -1,53 +0,0 @@
---
title: Architecture
slug: /developer/architecture
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
architecture,
]
---
:::warning
This page is still under construction, and should be read as a scratchpad
:::
## Overview
- Jan has a modular architecture and is largely built on top of its own modules.
- Jan uses a local [file-based approach](/developer/file-based) for data persistence.
- Jan provides an Electron-based [Desktop UI](https://github.com/janhq/jan).
- Jan provides an embeddable inference engine, written in C++, called [Nitro](https://nitro.jan.ai/docs/).
## Extensions
Jan has an Extensions API inspired by VSCode. In fact, most of Jan's core services are built as extensions.
Jan supports the following OpenAI compatible extensions:
| Jan Module | Description | API Docs |
| ---------- | ------------- | --------------------------------------------- |
| Chat | Inference | [/chats](/api-reference/#tag/Chat-Completion) |
| Models | Models | [/models](/api-reference/#tag/Models) |
| Assistants | Apps | [/assistants](/api-reference/#tag/Assistants) |
| Threads | Conversations | [/threads](/api-reference/#tag/Threads) |
| Messages | Messages | [/messages](/api-reference/#tag/Messages) |
<!-- TODO: link npm modules -->
## Modules
Modules are low level, system services. It is similar to OS kernel modules. Modules provide abstractions to basic, device level functionality like working with the filesystem, device system, databases, AI inference engines, etc.
Jan follows the [dependency inversion principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle) such that `modules` expose the interfaces that `extensions` can then implement.

View File

@ -1,81 +0,0 @@
---
title: File-based Approach
slug: /developer/file-based
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
file based approach,
]
---
:::warning
This page is still under construction, and should be read as a scratchpad
:::
Jan use the local filesystem for data persistence, similar to VSCode. This allows for composability and tinkerability.
```yaml
janroot/ # Jan's root folder (e.g. ~/jan)
models/ # For raw AI models
threads/ # For conversation history
assistants/ # For AI assistants' configs, knowledge, etc.
```
```yaml
/models
/modelA
model.json # Default model settings
llama-7b-q4.gguf # Model binaries
/threads
/jan-unixstamp
thread.json # thread metadata (e.g. subject)
messages.jsonl # messages
files/ # RAG
/assistants
/jan # A default assistant that can use all models
assistant.json # Assistant configs (see below)
package.json # Import npm modules, e.g. Langchain, Llamaindex
/src # For custom code
index.js # Entrypoint
# `/threads` at root level
# `/models` at root level
/shakespeare # Example of a custom assistant
assistant.json
package.json
/threads # Assistants remember conversations in the future
/models # Users can upload custom models
```
## Data Dependencies
```mermaid
graph LR
A1[("A User Integrators")] -->|uses| B1[assistant]
B1 -->|persist conversational history| C1[("thread A")]
B1 -->|executes| D1[("built-in tools as module")]
B1 -.->|uses| E1[model]
E1 -.->|model.json| D1
D1 --> F1[retrieval]
F1 -->|belongs to| G1[("web browsing")]
G1 --> H1[Google]
G1 --> H2[Duckduckgo]
F1 -->|belongs to| I1[("API calling")]
F1 --> J1[("knowledge files")]
```
- User/ Integrator
- Assistant object
- Model object
- Thread object
- Built-in tool object

View File

@ -1,88 +0,0 @@
---
title: User Interface
slug: /developer/ui
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
UI kit,
]
---
:::warning
This page is still under construction, and should be read as a scratchpad
:::
Jan provides a UI Kit for customize the UI for your use case. This means you can personalize the entire application according to your own brand and visual styles.
This page gives you an overview of how to customize the UI.
You can see some of the user interface components when you first open Jan.
To Link:
- Ribbon
- LeftSidebar
- Main
- RightSidebar
- StatusBar
## Views
![Jan Views](/img/jan-views.png)
TODO: add a better image.
### Ribbon
Assistants shortcuts and Modules settings show up here.
```js
import .. from "@jan"
sample code here
```
### LeftSidebar
Conversation threads show up here. This is customizable, so custom assistants can add additional menu items here.
```js
import .. from "@jan"
sample code here
```
### Main
The main view for interacting with assistants. This is customizable, so custom assistants can add in additional UI components. By default, this is a chat thread with assistants.
```js
import .. from "@jan"
sample code here
```
### RightSidebar
A "settings" view for each thread. Users should be able to edit settings or other configs to customize the assistant experience within each thread.
```js
import .. from "@jan"
sample code here
```
### StatusBar
A global status bar that shows processes, hardware/disk utilization and more.
```js
import .. from "@jan"
sample code here
```

View File

@ -1,80 +0,0 @@
---
title: Installation and Prerequisites
slug: /developer/prereq
description: Guide to install and setup Jan for development.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
installation,
prerequisites,
developer setup,
]
---
## Requirements
### Hardware Requirements
Ensure your system meets the following specifications to guarantee a smooth development experience:
- Hardware Requirements
### System Requirements
Make sure your operating system meets the specific requirements for Jan development:
- [Windows](../../install/windows/#system-requirements)
- [MacOS](../../install/mac/#system-requirements)
- [Linux](../../install/linux/#system-requirements)
## Prerequisites
- [Node.js](https://nodejs.org/en/) (version 20.0.0 or higher)
- [yarn](https://yarnpkg.com/) (version 1.22.0 or higher)
- [make](https://www.gnu.org/software/make/) (version 3.81 or higher)
## Instructions
1. **Clone the Repository:**
```bash
git clone https://github.com/janhq/jan
cd jan
git checkout -b DESIRED_BRANCH
```
2. **Install Dependencies**
```bash
yarn install
```
3. **Run Development and Use Jan Desktop**
```bash
make dev
```
This command starts the development server and opens the Jan Desktop app.
## For Production Build
```bash
# Do steps 1 and 2 in the previous section
# Build the app
make build
```
This will build the app MacOS (M1/M2/M3) for production (with code signing already done) and place the result in `/electron/dist` folder.
## Troubleshooting
If you run into any issues due to a broken build, please check the [Stuck on a Broken Build](../../troubleshooting/stuck-on-broken-build) guide.

View File

@ -1,51 +0,0 @@
---
title: Overview
slug: /developer
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
The following docs are aimed at developers who want to build extensions on top of the Jan Framework.
:::tip
If you are interested to **contribute to the framework's Core SDK itself**, like adding new drivers, runtimes, and infrastructure level support, please refer to [framework docs](/developer/framework) instead.
:::
## Extensions
Jan an **extensible framework** (like VSCode or Obsidian) that lets you build, customize and run AI applications everywhere, with an emphasis on local first.
Extensions are automatically available across Mac, Windows, Linux Desktops.
Extensions can also be made available in local API server-mode, which can be deployed on any VM.
### Building Extensions
This framework is packaged and regularly published as an SDK through [npm](https://www.npmjs.com/org/janhq) and [pip](https://pypi.org/).
The framework provides built-in support for the following:
- Native OS integrations with Electron and Chromium
- Native server integrations with Nodejs
- Native mobile integrations with Capacitor (coming soon)
:::tip
Build once, deploy everywhere
:::
## Jan in Action
The [Jan Desktop client](https://github.com/janhq/jan/releases) is built with Jan SDK. This means you can customize any part of the application from the branding to the features, and truly make it your own.
[Gif: show desktop & server side by side]

View File

@ -1,23 +0,0 @@
---
title: Your First Assistant
slug: /developer/assistant/your-first-assistant/
description: A quick start on how to build an assistant.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
quick start,
build assistant,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,23 +0,0 @@
---
title: Anatomy of an Assistant
slug: /developer/assistant/assistant-anatomy/
description: An overview of assistant.json
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build assistant,
assistant anatomy,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,23 +0,0 @@
---
title: Package your Assistant
slug: /developer/assistant/package-your-assistant/
description: Package your assistant for sharing and publishing.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
quick start,
build assistant,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,18 +0,0 @@
---
title: Build an Assistant
slug: /developer/assistant
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan, Rethink the Computer, local AI, privacy focus, free and open source, private and offline, conversational AI, no-subscription fee, large language models,
build assistant,
]
---
:::caution
This is currently under development.
:::
import DocCardList from "@theme/DocCardList";
<DocCardList />

View File

@ -1,25 +0,0 @@
---
title: Your First Engine
slug: /developer/engine/your-first-engine/
description: A quick start on how to build your first engine
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
quick start,
build engine,
]
---
:::caution
This is currently under development.
:::
A quickstart on how to integrate tensorrt llm

View File

@ -1,23 +0,0 @@
---
title: Anatomy of an Engine
slug: /developer/engine/engine-anatomy
description: An overview of engine.json
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build engine,
engine anatomy,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,23 +0,0 @@
---
title: Package your Engine
slug: /developer/engine/package-your-engine/
description: Package your engine for sharing and publishing.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build engine,
engine anatomy,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,26 +0,0 @@
---
title: Build an Inference Engine
slug: /developer/engine/
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build assistant,
]
---
:::caution
This is currently under development.
:::
import DocCardList from "@theme/DocCardList";
<DocCardList />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View File

@ -1,89 +0,0 @@
---
title: Your First Extension
slug: /developer/extension/your-first-extension/
description: A quick start on how to build your first extension
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
quick start,
build extension,
]
---
:::caution
This is currently under development.
:::
In this guide, we'll walk you through the process of building your first extension and integrating it into Jan.
## Steps to Create Your First Extension
To create your own extension, you can follow the steps below:
1. Click the **Use this template** button at the top of the [extension-template repository](https://github.com/janhq/extension-template).
2. Select **Create a new repository**.
3. Choose an owner and name for your new repository.
4. Click **Create repository**.
5. Clone your new repository to your local machine.
## Initial Setup
After you have cloned the repository to your local machine or codespace, you will need to perform some initial setup steps before you can develop your extension.
:::info
You will need to have a reasonably modern version of [Node.js](https://nodejs.org) handy. If you are using a version manager like [`nodenv`](https://github.com/nodenv/nodenv) or [`nvm`](https://github.com/nvm-sh/nvm), you can run `nodenv install` in the root of your repository to install the version specified in
[`package.json`](https://github.com/janhq/extension-template/blob/main/package.json). Otherwise, 20.x or later should work!
:::
1. :hammer_and_wrench: Install the dependencies
```bash
npm install
```
2. :building_construction: Package the TypeScript for distribution
```bash
npm run bundle
```
3. :white_check_mark: Check your artifact
There will be a `.tgz` file in your extension directory now. This is the file you will need to import into Jan. You can import this file into Jan by following the instructions in the [Import Extension](https://jan.ai/guides/using-extensions/import-extensions/) guide.
## Update the Extension Metadata
The [`package.json`](https://github.com/janhq/extension-template/blob/main/package.json) file defines metadata about your extension, such as extension name, main entry, description and version.
When you copy this repository, update `package.json` with the name, and description for your extension.
## Update the Extension Code
The [`src/`](https://github.com/janhq/extension-template/tree/main/src) directory is the heart of your extension! This contains the source code that will be run when your extension extension functions are invoked. You can replace the contents of this directory with your own code.
There are a few things to keep in mind when writing your extension code:
- Most Jan Extension functions are processed asynchronously.
In `index.ts`, you will see that the extension function will return a `Promise<any>`.
```typescript
import { core } from '@janhq/core'
function onStart(): Promise<any> {
return core.invokePluginFunc(MODULE_PATH, 'run', 0)
}
```
For more information about the Jan Extension Core module, see the [documentation](https://github.com/janhq/jan/blob/main/core/README.md).
Now, go ahead and start customizing your extension! Happy coding!

View File

@ -1,23 +0,0 @@
---
title: Anatomy of an Extension
slug: /developer/extension/extension-anatomy
description: An overview of extensions.json
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build extension,
extension anatomy,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,23 +0,0 @@
---
title: Package your Engine
slug: /developer/extension/package-your-extension/
description: Package your extension for sharing and publishing.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build extension,
extension anatomy,
]
---
:::caution
This is currently under development.
:::

View File

@ -1,18 +0,0 @@
---
title: Build an Extension
slug: /developer/extension/
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan, Rethink the Computer, local AI, privacy focus, free and open source, private and offline, conversational AI, no-subscription fee, large language models,
build extension,
]
---
:::caution
This is currently under development.
:::
import DocCardList from "@theme/DocCardList";
<DocCardList />

View File

@ -1,25 +0,0 @@
---
title: Engineering Specs
slug: /developer/engineering
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
spec,
engineering,
]
---
import DocCardList from "@theme/DocCardList";
<DocCardList className="DocCardList--no-description" />
Talk about CoreSDK here

View File

@ -1,120 +0,0 @@
---
title: 'Assistants'
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::caution
This is currently under development.
:::
## Overview
In Jan, assistants are `primary` entities with the following capabilities:
- Assistants can use `models`, `tools`, handle and emit `events`, and invoke `custom code`.
- Users can create custom assistants with saved `model` settings and parameters.
- An [OpenAI Assistants API](https://platform.openai.com/docs/api-reference/assistants) compatible endpoint at `localhost:1337/v1/assistants`.
- Jan ships with a default assistant called "Jan" that lets you use all models.
## Folder Structure
```yaml
/jan
/models/
/threads/
/assistants
/jan # An assistant available to you by default
assistant.json # See below
/src # Assistants can invoke custom code
index.js # Entrypoint
process.js # For server processes (needs better name)
package.json # Import any npm libraries, e.g. Langchain, Llamaindex
/shakespeare # You can create custom assistants
assistant.json
/chicken_man
```
## `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
{
"id": "asst_abc123", // Defaults to foldername
"object": "assistant", // Always "assistant"
"version": 1, // Defaults to 1
"created_at": 1698984975,
"name": "Math Tutor", // Defaults to foldername
"description": null,
"avatar": "https://pic.png",
"models": [ // Defaults to "*" all models
{ ...model_0 }
],
"instructions": "Be concise", // A system prompt for the assistant
"events": [], // Defaults to "*"
"metadata": {}, // Defaults to {}
// "tools": [], // Coming soon
// "file_ids": [], // Coming soon
// "memory/threads": true, // Coming soon
}
```
### Examples
Here's what the default Jan assistant's json file looks like:
```js
{
"name": "Jan",
"description": "A global assistant that lets you chat with all downloaded models",
"avatar": "https://jan.ai/img/logo.svg",
// All other properties are not explicitly declared and use the default values (see above).
}
```
## Events
Jan assistants can respond to event hooks. More powerfully, Jan assistants can register their own pubsub, so other entities, like other assistants can respond to your assistants events.
## Custom Code
Jan assistants are Turing complete. This means you can write freeform code, and use any dependencies, when customizing your assistant.
```typescript
import {events, models} from "@janhq/core"
import {retrieval} from "@hiro/best-rag-ever" // This can be featured on Jan hub but install from npm
events.on('assistant:asst_abc123', (event) => async {
const result = models[0].process(event)
events.emit("assistant:asst_abc123", result)
resolve()
})
```
## Tools
> Coming soon
## Functions
> Coming soon
## Files
> Coming soon

View File

@ -1,43 +0,0 @@
---
title: Chats
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::caution
This is currently under development.
:::
## Overview
In Jan, `chats` are LLM responses in the form of OpenAI compatible `chat completion objects`.
- Models take a list of messages and return a model-generated response as output.
- An [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) compatible endpoint at `localhost:1337/v1/chats`.
## Folder Structure
Chats are stateless, thus are not saved in `janroot`. Any content and relevant metadata from calling this endpoint is extracted and persisted through [Messages](/docs/engineering/messages).
## API Reference
Jan's Chat API is compatible with [OpenAI's Chat API](https://platform.openai.com/docs/api-reference/chat).
See [Jan Chat API](https://jan.ai/api-reference/#tag/Chat-Completion)
## Implementation
Under the hood, the `/chat` endpoint simply reroutes an existing endpoint from [Nitro server](https://nitro.jan.ai). Nitro is a lightweight & local inference server, written in C++ and embedded into the Jan app. See [Nitro documentation](https://nitro.jan.ai/docs).

View File

@ -1,59 +0,0 @@
---
title: Engine
---
:::caution
Currently Under Development
:::
## Overview
In the Jan application, engines serve as primary entities with the following capabilities:
- Engine will be installed through `inference-extensions`.
- Models will depend on engines to do [inference](https://en.wikipedia.org/wiki/Inference_engine).
- Engine configuration and required metadata will be stored in a json file.
## Folder Structure
- Default parameters for engines are stored in JSON files located in the `/engines` folder.
- These parameter files are named uniquely with `engine_id`.
- Engines are referenced directly using `engine_id` in the `model.json` file.
```yaml
jan/
engines/
nitro.json
openai.json
.....
```
## Engine Default Parameter Files
- Each inference engine requires default parameters to function in cases where user-provided parameters are absent.
- These parameters are stored in JSON files, structured as simple key-value pairs.
### Example
Here is an example of an engine file for `engine_id` `nitro`:
```js
{
"ctx_len": 512,
"ngl": 100,
"embedding": false,
"n_parallel": 1,
"cont_batching": false
"prompt_template": "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant"
}
```
For detailed engine parameters, refer to: [Nitro's Model Settings](https://nitro.jan.ai/features/load-unload#table-of-parameters)
## Adding an Engine
- Engine parameter files are automatically generated upon installing an `inference-extension` in the Jan application.
---

View File

@ -1,81 +0,0 @@
---
title: 'Files'
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::warning
Draft Specification: functionality has not been implemented yet.
:::
Files can be used by `threads`, `assistants` and `fine-tuning`
> Equivalent to: https://platform.openai.com/docs/api-reference/files
## Files Object
- Equivalent to: https://platform.openai.com/docs/api-reference/files
- Note: OAI's struct doesn't seem very well designed
- `files.json`
```js
{
// Public properties (OpenAI Compatible: https://platform.openai.com/docs/api-reference/files/object)
"id": "file-BK7bzQj3FfZFXr7DbL6xJwfo",
"object": "file",
"bytes": 120000,
"created_at": 1677610602,
"filename": "salesOverview.pdf",
"purpose": "assistants"
}
```
## File API
### List Files
> OpenAI Equivalent: https://platform.openai.com/docs/api-reference/files/list
### Upload file
> OpenAI Equivalent: https://platform.openai.com/docs/api-reference/files/create
### Delete file
> OpenAI Equivalent: https://platform.openai.com/docs/api-reference/files/delete
### Retrieve file
> OpenAI Equivalent: https://platform.openai.com/docs/api-reference/files/retrieve
### Retrieve file content
> OpenAI Equivalent: https://platform.openai.com/docs/api-reference/files/retrieve-contents
## Files Filesystem
- Files can exist in several parts of Jan's filesystem
- TODO: are files hard copied into these folders? Or do we define a `files.json` and only record the relative filepath?
```sh
/files # root `/files` for finetuning, etc
/assistants
/jan
/files # assistant-specific files
/threads
/jan-12938912
/files # thread-specific files
```

View File

@ -1,18 +0,0 @@
---
title: 'Fine-tuning'
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Todo: @hiro

View File

@ -1,102 +0,0 @@
---
title: Messages
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::caution
This is currently under development.
:::
## Overview
`Messages` capture a conversation's content. This can include the content from LLM responses and other metadata from [chat completions](/specs/chats).
- Users and assistants can send multimedia messages.
- An [OpenAI Message API](https://platform.openai.com/docs/api-reference/messages) compatible endpoint at `localhost:1337/v1/messages`.
## Folder Structure
Messages are saved in the `/threads/{thread_id}` folder in `messages.jsonl` files
```yaml
jan/
threads/
assistant_name_unix_timestamp/
thread.json # Thread metadata
messages.jsonl # Messages are stored in jsonl format
```
## `message.jsonl`
Individual messages are saved in `jsonl` format for indexing purposes.
```js
{...message_2}
{...message_1}
{...message_0}
```
### Examples
Here's a standard example `message` sent from a user.
```js
"id": "0", // Sequential or UUID
"object": "thread.message", // Defaults to "thread.message"
"created_at": 1698983503,
"thread_id": "thread_asdf", // Defaults to parent thread
"assistant_id": "jan", // Defaults to parent thread
"role": "user", // From either "user" or "assistant"
"content": [
{
"type": "text",
"text": {
"value": "Hi!?",
"annotations": []
}
}
],
"metadata": {}, // Defaults to {}
```
Here's an example `message` response from an assistant.
```js
"id": "0", // Sequential or UUID
"object": "thread.message", // Defaults to "thread.message"
"created_at": 1698983503,
"thread_id": "thread_asdf", // Defaults to parent thread
"assistant_id": "jan", // Defaults to parent thread
"role": "assistant", // From either "user" or "assistant"
"content": [ // Usually from Chat Completion obj
{
"type": "text",
"text": {
"value": "Hi! How can I help you today?",
"annotations": []
}
}
],
"metadata": {}, // Defaults to {}
"usage": {} // Save chat completion properties https://platform.openai.com/docs/api-reference/chat/object
```
## API Reference
Jan's `messages` API is compatible with [OpenAI's Messages API](https://platform.openai.com/docs/api-reference/messages), with additional methods for managing messages locally.
See [Jan Messages API](https://jan.ai/api-reference#tag/Messages).

View File

@ -1,129 +0,0 @@
---
title: Models
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::caution
This is currently under development.
:::
## Overview
In Jan, models are primary entities with the following capabilities:
- Users can import, configure, and run models locally.
- An [OpenAI Model API](https://platform.openai.com/docs/api-reference/models) compatible endpoint at `localhost:1337/v1/models`.
- Supported model formats: `ggufv3`, and more.
## Folder Structure
- Models are stored in the `/models` folder.
- Models are organized by individual folders, each containing the binaries and configurations needed to run the model. This makes for easy packaging and sharing.
- Model folder names are unique and used as `model_id` default values.
```yaml
jan/ # Jan root folder
models/
llama2-70b-q4_k_m/ # Example: standard GGUF model
model.json
model-binary-1.gguf
mistral-7b-gguf-q3_k_l/ # Example: quantizations are separate folders
model.json
mistral-7b-q3-K-L.gguf
mistral-7b-gguf-q8_k_m/ # Example: quantizations are separate folders
model.json
mistral-7b-q8_k_k.gguf
llava-ggml-Q5/ # Example: model with many partitions
model.json
mmprj.bin
model_q5.ggml
```
## `model.json`
- Each `model` folder contains a `model.json` file, which is a representation of a model.
- `model.json` contains metadata and default parameters used to run a model.
### Example
Here's a standard example `model.json` for a GGUF model.
```js
{
"id": "zephyr-7b", // Defaults to foldername
"object": "model", // Defaults to "model"
"sources": [
{
"filename": "zephyr-7b-beta.Q4_K_M.gguf",
"url": "https://huggingface.co/TheBloke/zephyr-7B-beta-GGUF/blob/main/zephyr-7b-beta.Q4_K_M.gguf"
}
],
"name": "Zephyr 7B", // Defaults to foldername
"owned_by": "you", // Defaults to "you"
"version": "1", // Defaults to 1
"created": 1231231, // Defaults to file creation time
"description": null, // Defaults to null
"format": "ggufv3", // Defaults to "ggufv3"
"engine": "nitro", // engine_id specified in jan/engine folder
"engine_parameters": {
// Engine parameters inside model.json can override
"ctx_len": 4096, // the value inside the base engine.json
"ngl": 100,
"embedding": true,
"n_parallel": 4
},
"model_parameters": {
// Models are called parameters
"stream": true,
"max_tokens": 4096,
"stop": ["<endofstring>"], // This usually can be left blank, only used with specific need from model author
"frequency_penalty": 0,
"presence_penalty": 0,
"temperature": 0.7,
"top_p": 0.95
},
"metadata": {}, // Defaults to {}
"assets": [
// Defaults to current dir
"file://.../zephyr-7b-q4_k_m.bin"
]
}
```
The engine parameters in the example can be found at: [Nitro's model settings](https://nitro.jan.ai/features/load-unload#table-of-parameters)
The model parameters in the example can be found at: [Nitro's model parameters](https://nitro.jan.ai/api-reference#tag/Chat-Completion)
## API Reference
Jan's Model API is compatible with [OpenAI's Models API](https://platform.openai.com/docs/api-reference/models), with additional methods for managing and running models locally.
See [Jan Models API](https://jan.ai/api-reference#tag/Models).
## Importing Models
:::caution
This is currently under development.
:::
You can import a model by dragging the model binary or gguf file into the `/models` folder.
- Jan automatically generates a corresponding `model.json` file based on the binary filename.
- Jan automatically organizes it into its own `/models/model-id` folder.
- Jan automatically populates the `model.json` properties, which you can subsequently modify.

View File

@ -1,20 +0,0 @@
---
title: Prompts
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
- [ ] /prompts folder
- [ ] How to add to prompts
- [ ] Assistants can have suggested Prompts

View File

@ -1,78 +0,0 @@
---
title: Threads
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
:::caution
This is currently under development.
:::
## Overview
`Threads` are conversations between an `assistant` and the user:
- Users can tweak `model` params and `assistant` behavior within each thread.
- Users can import and export threads.
- An [OpenAI Thread API](https://platform.openai.com/docs/api-reference/threads) compatible endpoint at `localhost:1337/v1/threads`.
## Folder Structure
- Threads are saved in the `/threads` folder.
- Threads are organized by folders, one for each thread, and can be easily zipped, exported, and cleared.
- Thread folders follow the naming: `assistant_id` + `thread_created_at`.
- Thread folders also contain `messages.jsonl` files. See [messages](/docs/engineering/messages).
```yaml
janroot/
threads/
assistant_name_unix_timestamp/ # Thread `ID`
thread.json
```
## `thread.json`
- Each `thread` folder contains a `thread.json` file, which is a representation of a thread.
- `thread.json` contains metadata and model parameter overrides.
- There are no required fields.
### Example
Here's a standard example `thread.json` for a conversation between the user and the default Jan assistant.
```js
"id": "thread_....", // Defaults to foldername
"object": "thread", // Defaults to "thread"
"title": "funny physics joke", // Defaults to ""
"assistants": [
{
"assistant_id": "jan", // Defaults to "jan"
"model": { // Defaults to the currently active model (can be changed before thread is begun)
"id": "...",
"settings": {}, // Defaults to and overrides assistant.json's "settings" (and if none, then model.json "settings")
"parameters": {}, // Defaults to and overrides assistant.json's "parameters" (and if none, then model.json "parameters")
}
},
],
"created": 1231231 // Defaults to file creation time
"metadata": {}, // Defaults to {}
```
## API Reference
Jan's Threads API is compatible with [OpenAI's Threads API](https://platform.openai.com/docs/api-reference/threads), with additional methods for managing threads locally.
See [Jan Threads API](https://jan.ai/api-reference#tag/Threads).

View File

@ -1,23 +0,0 @@
---
title: Product Specs
slug: /developer/product
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
spec,
product,
]
---
import DocCardList from "@theme/DocCardList";
<DocCardList className="DocCardList--no-description" />

View File

@ -1,29 +0,0 @@
---
title: Chat
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
## Overview
A home screen for users to chat with [assistants](/docs/engineering/assistants) via conversation [threads](/docs/engineering/threads).
![alt text](../img/chat-screen.png)
## User Stories
<!-- Can also be used as a QA Checklist -->
- Users can chat with `Jan` the default assistant
- Users can customize chat settings like model parameters via both the GUI & `thread.json`

View File

@ -1,30 +0,0 @@
---
title: Hub
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
## Overview
The Hub is like a store for everything, where users can discover and download models, assistants, and more.
![alt text](../img/hub-screen.png)
## User Stories
<!-- Can also be used as a QA Checklist -->
- Users can discover recommended models (Jan ships with a few preconfigured `model.json` files)
- Users can download models suitable for their devices, e.g. compatible with their RAM
- Users can download models via a HuggingFace URL (coming soon)

View File

@ -1,28 +0,0 @@
---
title: Jan (The Default Assistant)
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Jan ships with a default assistant "Jan" that lets users chat with any open source model out-of-the-box.
This assistant is defined in `/jan`. It is a generic assistant to illustrate power of Jan. In the future, it will support additional features e.g. multi-assistant conversations
- Your Assistant "Jan" lets you pick any model that is in the root /models folder
- Right panel: pick LLM model and set model parameters
- Jans threads will be at root level
- `model.json` will reflect model chosen for that session
- Be able to “add” other assistants in the future
- Jans files will be at thread level
- Jan is not a persistent memory assistant

View File

@ -1,44 +0,0 @@
---
title: Settings
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
## Overview
A settings page for users to add extensions, configure model settings, change app appearance, add keyboard shortcuts, and a plethora of other personalizations.
![alt text](../img/settings-screen.png)
## User Stories
<!-- Can also be used as a QA Checklist -->
### General Settings
- Users can customize `port` number
- Users can customize `janroot` folder location
### Extensions Settings
- Users can add, delete, and configure extensions
### Model Settings
- Users can configure default model parameters and settings
- Users can delete models
### Appearance
- Users can set color themes and dark/light modes

View File

@ -1,29 +0,0 @@
---
title: System Monitor
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
## Overview
An activity screen to monitor system health and running models.
![alt text](../img/system-screen.png)
## User Stories
<!-- Can also be used as a QA Checklist -->
- Users can see disk and ram utilization
- Users can start and stop models based on system health

View File

@ -1,111 +0,0 @@
---
title: Framework
slug: /developer/framework/
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
The following low-level docs are aimed at core contributors.
We cover how to contribute to the core framework (aka the `Core SDK`).
:::tip
If you are interested to **build on top of the framework**, like creating assistants or adding app level extensions, please refer to [developer docs](/developer) instead.
:::
## Jan Framework
At its core, Jan is a **cross-platform, local-first and AI native framework** that can be used to build anything.
### Extensions
Ultimately, we aim for a `VSCode` or `Obsidian` like SDK that allows **devs to build and customize complex and ethical AI applications for any use case**, in less than 30 minutes.
In fact, the current Jan [Desktop Client](https://jan.ai/) is actually just a specific set of extensions & integrations built on top of this framework.
![Desktop is Extensions](./assets/ExtensionCallouts.png)
:::tip
We encourage devs to fork, customize, and open source your improvements for the greater community.
:::
### Cross Platform
Jan follows [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) to the best of our ability. Though leaky abstractions remain (we're a fast moving, open source codebase), we do our best to build an SDK that allows devs to **build once, deploy everywhere.**
![Clean Architecture](./assets/CleanArchitecture.jpg)
**Supported Runtimes:**
- `Node Native Runtime`, good for server side apps
- `Electron Chromium`, good for Desktop Native apps
- `Capacitor`, good for Mobile apps (planned, not built yet)
- `Python Runtime`, good for MLOps workflows (planned, not built yet)
**Supported OS & Architectures:**
- Mac Intel & Silicon
- Windows
- Linux (through AppImage)
- Nvidia GPUs
- AMD ROCm (coming soon)
Read more:
- [Code Entrypoint](https://github.com/janhq/jan/tree/main/core)
- [Dependency Inversion](https://en.wikipedia.org/wiki/Dependency_inversion_principle)
### Local First
Jan's data persistence happens on the user's local filesystem.
We implemented abstractions on top of `fs` and other core modules in an opinionated way, s.t. user data is saved in a folder-based framework that lets users easily package, export, and manage their data.
Future endeavors on this front include cross device syncing, multi user experience, and more.
Long term, we want to integrate with folks working on [CRDTs](https://www.inkandswitch.com/local-first/), e.g. [Socket Runtime](https://www.theregister.com/2023/04/11/socket_runtime/) to deeply enable local-first software.
Read more:
- [Folder-based wrappers entrypoint](https://github.com/janhq/jan/blob/main/core/src/fs.ts)
- [Piping Node modules across infrastructures](https://github.com/janhq/jan/tree/main/core/src/node)
:::caution
Our local first approach at the moment needs a lot of work. Please don't hesitate to refactor as you make your way through the codebase.
:::
### AI Native
We believe all software applications can be natively supercharged with AI primitives and embedded AI servers.
Including:
- OpenAI Compatible AI [types](https://github.com/janhq/jan/tree/main/core/src/types) and [core extensions](https://github.com/janhq/jan/tree/main/core/src/extensions) to support common functionality like making an inference call.
- Multiple inference engines through [extensions, integrations & wrappers](https://github.com/janhq/jan/tree/main/extensions/inference-nitro-extension) _On this, we'd like to appreciate the folks at [llamacpp](https://github.com/ggerganov/llama.cpp) and [TensorRT-LLM](https://github.com/NVIDIA/TensorRT-LLM) for. To which we'll continue to make commits & fixes back upstream._
- [Code Entrypoint](https://github.com/janhq/jan/tree/main/core/src/api)
## Fun Project Ideas
Beyond the current Jan client and UX, the Core SDK can be used to build many other AI-powered and privacy preserving applications.
- `Game engine`: For AI enabled character games, procedural generation games
- `Health app`: For a personal healthcare app that improves habits
- Got ideas? Make a PR into this docs page!
If you are interested to tackle these issues, or have suggestions for integrations and other OSS tools we can use, please hit us up in [Discord](https://discord.gg/5rQ2zTv3be).
:::caution
Our open source license is copy left, which means we encourage forks to stay open source, and allow core contributors to merge things upstream.
:::

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

View File

@ -1,3 +0,0 @@
---
title: Ecosystem
---

View File

@ -1,53 +0,0 @@
---
title: "Jan's AI Hacker House (Ho Chi Minh City)"
description: '24-27 Oct 2023, District 3, HCMC. AI-focused talks, workshops and social events. Hosted by Jan.ai'
slug: /events/hcmc-oct23
image: /img/hcmc-launch-party.png
keywords: [AI, Hacker House, Ho Chi Minh City, HCMC, Jan.ai]
---
![](/img/hcmc-launch-party.png)
🎉 Join us at our Friday Launch Party for an evening of AI talks from other builders! [(RSVP here)](https://jan-launch-party.eventbrite.sg/) 🎉
## Ho Chi Minh City
[Jan's Hacker House](https://jan.ai) is a 4-day event where we host an open AI Hacker House and invite the local AI community to join us. There is fast wifi, free snacks, drinks and pizza.
We also host a series of talks, workshops and social events at night. We usually start off the week with a "Intro to LLMs" that targets local university students, and then progress to more in-depth technical and research areas.
Jan is a fully remote team. We use the money we save from not having an office, to hold Hack Weeks where we meet in a city, eat pizza and work to ship major releases.
### Date & Time
- 24-27 October 2023
### Location
- Districts 1 & 3, Ho Chi Minh City
- Exact location in Evenbrite (see below)
## Agenda
To help us manage RSVPs, please use the Eventbrite links below to RSVP for each event.
| Day | Eventbrite Link | Signups |
| ------------ | ------------------------------------- | ---------------------------------------------------- |
| Mon (23 Oct) | Jan Team & Partners Dinner | Invite-only |
| Thu (26 Oct) | HCMC Startups & VC Night | Invite-only |
| Fri (27 Oct) | Jan Launch Party + Build your own LLM | [RSVP here](https://jan-launch-party.eventbrite.sg/) |
### OKRs
| **Objective** | Jan v1.0 should be bug-free and run on Windows, Max, Linux |
| ------------- | ---------------------------------------------------------- |
| Key Result | Polished UI with "Create Bot" w/ saved prompts |
| Key Result | Documentation of Jan Codebase for Plugin Developers |
| Key Result | Roadmap for 4Q 2023 |
| Key Result | _Stretch Goal:_ Core Process API for Plugins |
## Photos
![](/img/hcmc-launch-party.png)
🎉 Join us at our Friday Launch Party for an evening of AI talks from other builders! [(RSVP here)](https://jan-launch-party.eventbrite.sg/) 🎉

View File

@ -1,20 +0,0 @@
---
title: 'Nov 23: Nvidia GenAI Day'
description: Nvidia's LLM Day
---
![](/img/nvidia-llm-day-header.png)
## Nvidia GenAI Innovation Day
Jan will be at Nvidia's GenAI Innovation Day in Nov '23, focusing on Enterprise use-cases of LLMs.
### Location
- JW Marriott Hanoi Hotel
- 8:30am November 8th 2023
- Registration: [https://gmcgroup.com.vn/nvidia-genai-event/](https://gmcgroup.com.vn/nvidia-genai-event/)
### Programme
![](/img/nvidia-llm-day.png)

View File

@ -1,3 +0,0 @@
---
title: Agents Framework
---

View File

@ -1,3 +0,0 @@
---
title: API Server
---

View File

@ -1,3 +0,0 @@
---
title: Data Security
---

View File

@ -1,3 +0,0 @@
---
title: Extensions Framework
---

View File

@ -1,3 +0,0 @@
---
title: Features
---

View File

@ -1,3 +0,0 @@
---
title: Local & Self-Hosted AI
---

View File

@ -1,3 +0,0 @@
---
title: OpenAI API Support (and others)
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 479 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 472 KiB

View File

@ -1,163 +0,0 @@
---
title: What are Jan Extensions?
slug: /extensions
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 1
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Jan Extensions,
Extensions,
]
---
The current Jan Desktop Client has some default extensions built on top of this framework to enhance the user experience. In this guide, we will show you the list of default extensions and how to configure extension settings.
## Default Extensions
You can find the default extensions in the `Settings` > `Extensions`.
## List of Default Extensions
| Extension Name | Version | Description | Source Code Link |
| ---------------------------------- | --------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Assistant Extension | `v1.0.0` | This extension enables assistants, including Jan, a default assistant that can call all downloaded models. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/assistant-extension) |
| Conversational Extension | `v1.0.0` | This extension enables conversations and state persistence via your filesystem. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/conversational-extension) |
| Inference Nitro Extension | `v1.0.0` | This extension embeds Nitro, a lightweight (3 MB) inference engine in C++. See nitro.jan.ai. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/inference-nitro-extension) |
| Inference Openai Extension | `v1.0.0` | This extension enables OpenAI chat completion API calls. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/inference-openai-extension) |
| Inference Triton Trt Llm Extension | `v1.0.0` | This extension enables Nvidia's TensorRT-LLM as an inference engine option. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/inference-triton-trtllm-extension) |
| Model Extension | `v1.0.22` | Model Management Extension provides model exploration and seamless downloads. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/model-extension) |
| Monitoring Extension | `v1.0.9` | This extension offers system health and OS-level data. | [Link to Source](https://github.com/janhq/jan/tree/dev/extensions/monitoring-extension) |
## Configure Extension Settings
To configure extension settings:
1. Navigate to the `~/jan/extensions`.
2. Open the `extensions.json` file
3. Edit the file with options including:
| Option | Description |
| ---------------- | ----------------------------------- |
| `_active` | Enable/disable the extension. |
| `listeners` | Default listener setting. |
| `origin` | Extension file path. |
| `installOptions` | Version and metadata configuration. |
| `name` | Extension name. |
| `version` | Extension version. |
| `main` | Main file path. |
| `description` | Extension description. |
| `url` | Extension URL. |
```json title="~/jan/extensions/extensions.json"
{
"@janhq/assistant-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-assistant-extension-1.0.0.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/assistant-extension",
"version": "1.0.0",
"main": "dist/index.js",
"description": "This extension enables assistants, including Jan, a default assistant that can call all downloaded models",
"url": "extension://@janhq/assistant-extension/dist/index.js"
},
"@janhq/conversational-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-conversational-extension-1.0.0.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/conversational-extension",
"version": "1.0.0",
"main": "dist/index.js",
"description": "This extension enables conversations and state persistence via your filesystem",
"url": "extension://@janhq/conversational-extension/dist/index.js"
},
"@janhq/inference-nitro-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-inference-nitro-extension-1.0.0.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/inference-nitro-extension",
"version": "1.0.0",
"main": "dist/index.js",
"description": "This extension embeds Nitro, a lightweight (3mb) inference engine written in C++. See nitro.jan.ai",
"url": "extension://@janhq/inference-nitro-extension/dist/index.js"
},
"@janhq/inference-openai-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-inference-openai-extension-1.0.0.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/inference-openai-extension",
"version": "1.0.0",
"main": "dist/index.js",
"description": "This extension enables OpenAI chat completion API calls",
"url": "extension://@janhq/inference-openai-extension/dist/index.js"
},
"@janhq/inference-triton-trt-llm-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-inference-triton-trt-llm-extension-1.0.0.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/inference-triton-trt-llm-extension",
"version": "1.0.0",
"main": "dist/index.js",
"description": "This extension enables Nvidia's TensorRT-LLM as an inference engine option",
"url": "extension://@janhq/inference-triton-trt-llm-extension/dist/index.js"
},
"@janhq/model-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-model-extension-1.0.22.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/model-extension",
"version": "1.0.22",
"main": "dist/index.js",
"description": "Model Management Extension provides model exploration and seamless downloads",
"url": "extension://@janhq/model-extension/dist/index.js"
},
"@janhq/monitoring-extension": {
"_active": true,
"listeners": {},
"origin": "/Applications/Jan.app/Contents/Resources/app.asar.unpacked/pre-install/janhq-monitoring-extension-1.0.9.tgz",
"installOptions": { "version": false, "fullMetadata": false },
"name": "@janhq/monitoring-extension",
"version": "1.0.9",
"main": "dist/index.js",
"description": "This extension provides system health and OS level data",
"url": "extension://@janhq/monitoring-extension/dist/index.js"
}
}
```
## Import Custom Extension
:::note
Currently, Jan only supports official extensions, which can be directly downloaded in Extension Settings. We plan to support 3rd party Extensions in the future.
:::
For now you can always import a third party extension at your own risk by following the steps below:
1. Navigate to **Settings** > **Extensions** > Click Select under **Manual Installation**.
2. Then, the ~/jan/extensions/extensions.json file will be updated automatically.
:::caution
You need to prepare the extension file in .tgz format to install the **non-default** extension.
:::
:::info[Assistance and Support]
If you have questions, please join our [Discord community](https://discord.gg/Dt7MxDyNNZ) for support, updates, and discussions.
:::

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 MiB

View File

@ -1,25 +0,0 @@
---
title: Hardware Setup
slug: /guides/hardware
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 3
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
hardware requirements,
Nvidia,
AMD,
CPU,
GPU,
]
---
Coming Soon

View File

@ -1,20 +0,0 @@
---
title: Overview
slug: /guides
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 1
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Coming Soon

View File

@ -1,277 +0,0 @@
---
title: Quickstart
slug: /guides/quickstart
description: Get started quickly with Jan, a ChatGPT-alternative that runs on your own computer, with a local API server. Learn how to install Jan and select an AI model to start chatting.
sidebar_position: 2
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
quickstart,
getting started,
using AI model,
installation,
]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import download from './asset/download.gif';
import gpt from './asset/gpt.gif';
import model from './asset/model.gif';
To get started quickly with Jan, follow the steps below:
## Step 1: Get Jan Desktop
<Tabs>
<TabItem value="mac" label = "Mac" default>
#### Pre-requisites
Before installing Jan, ensure :
- You have a Mac with an Apple Silicon Processor.
- Homebrew and its dependencies are installed for installing Jan with Homebrew package.
- Your macOS version is 10.15 or higher.
#### Stable Releases
To download stable releases, go to [Jan](https://jan.ai/) > select **Download for Mac**.
The download should be available as a `.dmg`.
#### Nightly Releases
We provide the Nightly Release so that you can test new features and see what might be coming in a future stable release. Please be aware that there might be bugs!
You can download it from [Jan's Discord](https://discord.gg/FTk2MvZwJH) in the [`#nightly-builds`](https://discord.gg/q8szebnxZ7) channel.
#### Experimental Model
To enable the experimental mode, go to **Settings** > **Advanced Settings** and toggle the **Experimental Mode**
#### Install with Homebrew
Install Jan with the following Homebrew command:
```brew
brew install --cask jan
```
:::warning
Homebrew package installation is currently limited to **Apple Silicon Macs**, with upcoming support for Windows and Linux.
:::
</TabItem>
<TabItem value = "windows" label = "Windows">
#### Pre-requisites
Ensure that your system meets the following requirements:
- Windows 10 or higher is required to run Jan.
To enable GPU support, you will need:
- NVIDIA GPU with CUDA Toolkit 11.7 or higher
- NVIDIA driver 470.63.01 or higher
#### Stable Releases
To download stable releases, go to [Jan](https://jan.ai/) > select **Download for Windows**.
The download should be available as a `.exe` file.
#### Nightly Releases
We provide the Nightly Release so that you can test new features and see what might be coming in a future stable release. Please be aware that there might be bugs!
You can download it from [Jan's Discord](https://discord.gg/FTk2MvZwJH) in the [`#nightly-builds`](https://discord.gg/q8szebnxZ7) channel.
#### Experimental Model
To enable the experimental mode, go to **Settings** > **Advanced Settings** and toggle the **Experimental Mode**
#### Default Installation Directory
By default, Jan is installed in the following directory:
```sh
# Default installation directory
C:\Users\{username}\AppData\Local\Programs\Jan
```
:::warning
If you are stuck in a broken build, go to the [Broken Build](/guides/common-error/broken-build) section of Common Errors.
:::
</TabItem>
<TabItem value = "linux" label = "Linux">
#### Pre-requisites
Ensure that your system meets the following requirements:
- glibc 2.27 or higher (check with `ldd --version`)
- gcc 11, g++ 11, cpp 11, or higher, refer to this link for more information.
To enable GPU support, you will need:
- NVIDIA GPU with CUDA Toolkit 11.7 or higher
- NVIDIA driver 470.63.01 or higher
#### Stable Releases
To download stable releases, go to [Jan](https://jan.ai/) > select **Download for Linux**.
The download should be available as a `.AppImage` file or a `.deb` file.
#### Nightly Releases
We provide the Nightly Release so that you can test new features and see what might be coming in a future stable release. Please be aware that there might be bugs!
You can download it from [Jan's Discord](https://discord.gg/FTk2MvZwJH) in the [`#nightly-builds`](https://discord.gg/q8szebnxZ7) channel.
#### Experimental Model
To enable the experimental mode, go to **Settings** > **Advanced Settings** and toggle the **Experimental Mode**
<Tabs groupId = "linux_type">
<TabItem value="linux_main" label = "Linux">
To install Jan, you should use your package manager's install or `dpkg`.
</TabItem>
<TabItem value = "deb_ub" label = "Debian / Ubuntu">
To install Jan, run the following command:
```sh
# Install Jan using dpkg
sudo dpkg -i jan-linux-amd64-{version}.deb
# Install Jan using apt-get
sudo apt-get install ./jan-linux-amd64-{version}.deb
# where jan-linux-amd64-{version}.deb is path to the Jan package
```
</TabItem>
<TabItem value = "other" label = "Others">
To install Jan, run the following commands:
```sh
# Install Jan using AppImage
chmod +x jan-linux-x86_64-{version}.AppImage
./jan-linux-x86_64-{version}.AppImage
# where jan-linux-x86_64-{version}.AppImage is path to the Jan package
```
</TabItem>
</Tabs>
:::warning
If you are stuck in a broken build, go to the [Broken Build](/guides/common-error/broken-build) section of Common Errors.
:::
</TabItem>
</Tabs>
## Step 2: Download a Model
Jan provides a variety of local AI models tailored to different needs, ready for download. These models are installed and run directly on the user's device.
1. Go to the **Hub**.
2. Select the models that you would like to install, to see a model details click the dropdown button.
3. Click the **Download** button.
<br/>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img src={download} alt="Download a Model" />
</div>
<br/>
:::note
Ensure you select the appropriate model size by balancing performance, cost, and resource considerations in line with your task's specific requirements and hardware specifications.
:::
## Step 3: Connect to ChatGPT (Optional)
Jan also provides access to remote models hosted on external servers, requiring an API key for connectivity. For example, to use the ChatGPT model with Jan, you must input your API key by following these steps:
1. Go to the **Thread** tab.
2. Under the Model dropdown menu, select the ChatGPT model.
3. Fill in your ChatGPT API Key that you can get in your [OpenAI platform](https://platform.openai.com/account/api-keys).
<br/>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img src={gpt} alt="Connect to ChatGPT" />
</div>
<br/>
## Step 4: Chat with Models
After downloading and configuring your model, you can immediately use it in the **Thread** tab.
<br/>
<div style={{ display: 'flex', justifyContent: 'center' }}>
<img src={model} alt="Chat with a model" />
</div>
<br/>
## Best Practices
This section outlines best practices for developers, analysts, and AI enthusiasts to enhance their experience with Jan when adding AI locally to their computers. Implementing these practices will optimize the performance of AI models.
### Follow the Quickstart Guide
The quickstart guide above is designed to facilitate a quick setup process. It provides a clear instruction and simple steps to get you up and running with Jan quickly. Even, if you are inexperienced in AI.
### Select the Right Models
Jan offers a range of pre-configured AI models that are suited for different purposes. You should identify which on that aligns with your objectives. There are factors to be considered:
- Capabilities
- Accuracy
- Processing Speed
:::note
- Some of these factors also depend on your hardware, please see Hardware Requirement.
- Choosing the right model is important to achieve the best performance.
:::
### Setting up Jan
Ensure that you familiarize yourself with the Jan application. Jan offers advanced settings that you can adjust. These settings may influence how your AI behaves locally. Please see the [Advanced Settings](/guides/advanced) article for a complete list of Jan's configurations and instructions on how to configure them.
### Integrations
Jan can work with many different systems and tools. Whether you are incorporating Jan with any open-source LLM provider or other tools, it is important to understand the integration capabilities and limitations.
### Mastering the Prompt Engineering
Prompt engineering is an important aspect when dealing with AI models to generate the desired outputs. Mastering this skill can significantly enhance the performance and the responses of the AI. Below are some tips that you can do for prompt engineering:
- Ask the model to adopt a persona
- Be specific and details get a more specific answers
- Provide examples or preference text or context at the beginning
- Use a clear and concise language
- Use certain keywords and phrases
## Pre-configured Models
To see the full list of Jan's pre-configured models, please see our official GitHub [here](https://github.com/janhq/jan).

View File

@ -1,20 +0,0 @@
---
title: Setting Up GPU
slug: /guides/hardware/gpu
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 1
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Coming Soon

View File

@ -1,20 +0,0 @@
---
title: Overview
slug: /guides/engines
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 12
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Coming Soon

View File

@ -1,107 +0,0 @@
---
title: Installation
sidebar_position: 4
slug: /guides/install/
hide_table_of_contents: true
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
## Jan Device Compatible
Jan is compatible with macOS, Windows, and Linux, making it accessible for a wide range of users. This compatibility allows users to leverage Jan's AI tools effectively, regardless of their device or operating system.
:::note
For detailed system requirements and setup instructions, refer to our [Hardware Setup](/guides/hardware/) guide.
:::
import DocCardList from "@theme/DocCardList";
<DocCardList />
## Install Server-Side
To install Jan from source, follow the steps below:
### Pre-requisites
Before proceeding with the installation of Jan from source, ensure that the following software versions are installed on your system:
- Node.js version 20.0.0 or higher
- Yarn version 1.22.0 or higher
### Install Jan Development Build
1. Clone the Jan repository from GitHub by using the following command:
```bash
git clone https://github.com/janhq/jan
git checkout DESIRED_BRANCH
cd jan
```
2. Install the required dependencies by using the following Yarn command:
```bash
yarn install
# Build core module
yarn build:core
# Packing base plugins
yarn build:plugins
# Packing uikit
yarn build:uikit
```
3. Run the development server.
```bash
yarn dev
```
This will start the development server and open the desktop app. During this step, you may encounter notifications about installing base plugins. Simply click **OK** and **Next** to continue.
### Install Jan Production Build
1. Clone the Jan repository from GitHub by using the following command:
```bash
git clone https://github.com/janhq/jan
cd jan
```
2. Install the required dependencies by using the following Yarn command:
```bash
yarn install
# Build core module
yarn build:core
# Packing base plugins
yarn build:plugins
# Packing uikit
yarn build:uikit
```
3. Run the production server.
```bash
yarn
```
This completes the installation process for Jan from source. The production-ready app for macOS can be found in the dist folder.

View File

@ -1,137 +0,0 @@
---
title: Install with Docker
sidebar_position: 4
slug: /guides/install/server
hide_table_of_contents: true
description: A step-by-step guide to install Jan using Docker.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Install on Docker,
Docker,
Helm,
]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
### Pre-requisites
Ensure that your system meets the following requirements:
- Linux or WSL2 Docker
- Latest Docker Engine and Docker Compose
To enable GPU support, you will need:
- `nvidia-driver`
- `nvidia-docker2`
:::note
- If you have not installed Docker, follow the instructions [here](https://docs.docker.com/engine/install/ubuntu/).
- If you have not installed the required file for GPU support, follow the instructions [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
:::
### Run Jan in Docker
You can run Jan in Docker with two methods:
1. Run Jan in CPU mode
2. Run Jan in GPU mode
<Tabs groupId = "ldocker_type">
<TabItem value="docker_cpu" label = "CPU">
To run Jan in Docker CPU mode, by using the following code:
```bash
# cpu mode with default file system
docker compose --profile cpu-fs up -d
# cpu mode with S3 file system
docker compose --profile cpu-s3fs up -d
```
</TabItem>
<TabItem value="docker_gpu" label = "GPU">
To run Jan in Docker CPU mode, follow the steps below:
1. Check CUDA compatibility with your NVIDIA driver by running nvidia-smi and check the CUDA version in the output as shown below:
```sh
nvidia-smi
# Output
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 531.18 Driver Version: 531.18 CUDA Version: 12.1 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 4070 Ti WDDM | 00000000:01:00.0 On | N/A |
| 0% 44C P8 16W / 285W| 1481MiB / 12282MiB | 2% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 1 NVIDIA GeForce GTX 1660 Ti WDDM | 00000000:02:00.0 Off | N/A |
| 0% 49C P8 14W / 120W| 0MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
| 2 NVIDIA GeForce GTX 1660 Ti WDDM | 00000000:05:00.0 Off | N/A |
| 29% 38C P8 11W / 120W| 0MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
```
2. Visit [NVIDIA NGC Catalog](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags) and find the smallest minor version of image tag that matches your CUDA version (e.g., 12.1 -> 12.1.0)
3. Update the `Dockerfile.gpu` line number 5 with the latest minor version of the image tag from step 2 (e.g. change `FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04 AS base` to `FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04 AS base`)
4. Run Jan in GPU mode by using the following command:
```bash
# GPU mode with default file system
docker compose --profile gpu-fs up -d
# GPU mode with S3 file system
docker compose --profile gpu-s3fs up -d
```
</TabItem>
</Tabs>
### Docker Compose Profile and Environment
The available Docker Compose profile and the environment variables listed below:
#### Docker Compose Profile
| Profile | Description |
|-----------|-------------------------------------------|
| cpu-fs | Run Jan in CPU mode with default file system |
| cpu-s3fs | Run Jan in CPU mode with S3 file system |
| gpu-fs | Run Jan in GPU mode with default file system |
| gpu-s3fs | Run Jan in GPU mode with S3 file system |
#### Environment Variables
| Environment Variable | Description |
|--------------------------|------------------------------------------------------------|
| S3_BUCKET_NAME | S3 bucket name - leave blank for default file system |
| AWS_ACCESS_KEY_ID | AWS access key ID - leave blank for default file system |
| AWS_SECRET_ACCESS_KEY | AWS secret access key - leave blank for default file system|
| AWS_ENDPOINT | AWS endpoint URL - leave blank for default file system |
| AWS_REGION | AWS region - leave blank for default file system |
| API_BASE_URL | Jan Server URL, please modify it as your public ip address or domain name default http://localhost:1377 |
:::warning
If you are stuck in a broken build, go to the [Broken Build](/troubleshooting/#broken-build) section of Common Errors.
:::

View File

@ -1,23 +0,0 @@
---
title: Install on Linux
sidebar_position: 3
slug: /guides/install/linux
hide_table_of_contents: true
description: A step-by-step guide to install Jan on your Linux.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Install on Linux,
Linux,
]
---
Coming soon

View File

@ -1,24 +0,0 @@
---
title: Install on Mac
sidebar_position: 1
slug: /guides/install/mac
hide_table_of_contents: true
description: A step-by-step guide to install Jan on your Mac.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
MacOs,
Install on Mac,
Apple devices,
]
---
Coming soon

View File

@ -1,25 +0,0 @@
---
title: Install on Windows
sidebar_position: 2
slug: /guides/install/windows
hide_table_of_contents: true
description: A step-by-step guide to install Jan on your Windows.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Windows 10,
Windows 11,
Install on Windows,
Microsoft devices,
]
---
Coming soon

View File

@ -1,23 +0,0 @@
---
title: Integrations
slug: /integrations/
sidebar_position: 1
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build extension,
]
---
import DocCardList from "@theme/DocCardList";
<DocCardList />

View File

@ -1,23 +0,0 @@
---
title: CrewAI
sidebar_position: 19
description: A step-by-step guide on how to integrate Jan with CrewAI.
slug: /integrations/crewai
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Continue integration,
CrewAI integration,
CrewAI,
]
---
Coming Soon

View File

@ -1,78 +0,0 @@
---
title: Discord
slug: /integrations/discord
sidebar_position: 5
description: A step-by-step guide on how to integrate Jan with a Discord bot.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Discord integration,
Discord,
bot,
]
---
## Integrate Discord Bot with Jan
Discord bot can enhances your discord server interactions. By integrating Jan with it, you can significantly boost responsiveness and user engaggement in your discord server.
To integrate Jan with a Discord bot, follow the steps below:
### Step 1: Clone the repository
To make this integration successful, it is necessary to clone the discord bot's [repository](https://github.com/jakobdylanc/discord-llm-chatbot).
### Step 2: Install the Required Libraries
After cloning the repository, run the following command:
```sh
pip install -r requirements.txt
```
### Step 3: Set the Environment
1. Create a copy of `.env.example`.
2. Change the name to `.env`.
3. Set the environment with the following options:
| Setting | Instructions |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DISCORD_BOT_TOKEN` | Generate a new Discord application at [discord.com/developers/applications](https://discord.com/developers/applications), obtain a token from the Bot tab, and enable MESSAGE CONTENT INTENT. |
| `LLM` | For [Jan](https://jan.ai/), set to `local/openai/(MODEL_NAME)`, where `(MODEL_NAME)` is your loaded model's name. |
| `CUSTOM_SYSTEM_PROMPT` | Adjust the bot's behavior as needed. |
| `CUSTOM_DISCORD_STATUS` | Set a custom message for the bot's Discord profile. (Max 128 characters) |
| `ALLOWED_CHANNEL_IDS` | Enter Discord channel IDs where the bot can send messages, separated by commas. Leave blank to allow all channels. |
| `ALLOWED_ROLE_IDS` | Enter Discord role IDs allowed to use the bot, separated by commas. Leave blank to allow everyone. Including at least one role also disables DMs. |
| `MAX_IMAGES` | Max number of image attachments allowed per message when using a vision model. (Default: `5`) |
| `MAX_MESSAGES` | Max messages allowed in a reply chain. (Default: `20`) |
| `LOCAL_SERVER_URL` | URL of your local API server for LLMs starting with `local/`. (Default: `http://localhost:5000/v1`) |
| `LOCAL_API_KEY` | API key for your local API server with LLMs starting with `local/`. Usually safe to leave blank. |
### Step 4: Insert the Bot
Invite the bot to your Discord server using the following URL:
```
https://discord.com/api/oauth2/authorize?client_id=(CLIENT_ID)&permissions=412317273088&scope=bot
```
:::note
Replace `CLIENT_ID` with your Discord application's client ID from the OAuth2 tab
:::
### Step 5: Run the bot
Run the bot by using the following command in your command prompt:
```sh
python llmcord.py
```

View File

@ -1,60 +0,0 @@
---
title: Open Interpreter
slug: /integrations/interpreter
sidebar_position: 6
description: A step-by-step guide on how to integrate Jan with Open Interpreter.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Open Interpreter integration,
Open Interpreter,
]
---
## Integrate Open Interpreter with Jan
[Open Interpreter](https://github.com/KillianLucas/open-interpreter/) lets LLMs run code (Python, Javascript, Shell, and more) locally. You can chat with Open Interpreter through a ChatGPT-like interface in your terminal by running `interpreter` after installing. To integrate Open Interpreter with Jan, follow the steps below:
### Step 1: Install Open Interpreter
1. Install Open Interpreter by running:
```sh
pip install open-interpreter
```
2. A Rust compiler is required to install Open Interpreter. If not already installed, run the following command or go to [this page](https://rustup.rs/) if you are running on windows:
```zsh
sudo apt install rustc
```
### Step 2: Configure Jan's Local API Server
Before using Open Interpreter, configure the model in `Settings` > `My Model` for Jan and activate its local API server.
#### Enabling Jan API Server
1. Click the `<>` button to access the **Local API Server** section in Jan.
2. Configure the server settings, including **IP Port**, **Cross-Origin-Resource-Sharing (CORS)**, and **Verbose Server Logs**.
3. Click **Start Server**.
### Step 3: Set the Open Interpreter Environment
1. For integration, provide the API Base (`http://localhost:1337/v1`) and the model ID (e.g., `mistral-ins-7b-q4`) when running Open Interpreter. For example see the code below:
```zsh
interpreter --api_base http://localhost:1337/v1 --model mistral-ins-7b-q4
```
> **Open Interpreter is now ready for use!**

View File

@ -1,20 +0,0 @@
---
title: Overview
slug: /integrationss
description: Jan Docs | Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
sidebar_position: 1
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
]
---
Coming Soon

View File

@ -1,42 +0,0 @@
---
title: Raycast
slug: /integrations/raycast
sidebar_position: 17
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
raycast integration,
Raycast,
]
description: A step-by-step guide on how to integrate Jan with Raycast.
---
## Integrate Raycast with Jan
[Raycast](https://www.raycast.com/) is a productivity tool designed for macOS that enhances workflow efficiency by providing quick access to various tasks and functionalities through a keyboard-driven interface. To integrate Raycast with Jan, follow the steps below:
### Step 1: Download the TinyLlama Model
1. Go to the **Hub** and download the TinyLlama model.
2. The model will be available at `~jan/models/tinyllama-1.1b`.
### Step 2: Clone and Run the Program
1. Clone this [GitHub repository](https://github.com/InNoobWeTrust/nitro-raycast).
2. Execute the project using the following command:
```sh title="Node.js"
npm i && npm run dev
```
### Step 3: Search for Nitro and Run the Model
Search for `Nitro` using the program and you can use the models from Jan in RayCast.

View File

@ -1,74 +0,0 @@
---
title: OpenRouter
slug: /integrations/openrouter
sidebar_position: 2
description: A step-by-step guide on how to integrate Jan with OpenRouter.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
OpenRouter integration,
OpenRouter,
]
---
## Integrate OpenRouter with Jan
[OpenRouter](https://openrouter.ai/docs#quick-start) is a tool that gathers AI models. Developers can utilize its API to engage with diverse large language models, generative image models, and generative 3D object models.
To connect Jan with OpenRouter for accessing remote Large Language Models (LLMs) through OpenRouter, you can follow the steps below:
### Step 1: Configure OpenRouter API key
1. Find your API keys in the [OpenRouter API Key](https://openrouter.ai/keys).
2. Set the OpenRouter API key in `~/jan/engines/openai.json` file.
### Step 2: Model Configuration
1. Go to the directory `~/jan/models`.
2. Make a new folder called `openrouter-(modelname)`, like `openrouter-dolphin-mixtral-8x7b`.
3. Inside the folder, create a `model.json` file with the following settings:
- Set the `id` property to the model id obtained from OpenRouter.
- Set the `format` property to `api`.
- Set the `engine` property to `openai`.
- Ensure the `state` property is set to `ready`.
```json title="~/jan/models/openrouter-dolphin-mixtral-8x7b/model.json"
{
"sources": [
{
"filename": "openrouter",
"url": "https://openrouter.ai/"
}
],
"id": "cognitivecomputations/dolphin-mixtral-8x7b",
"object": "model",
"name": "Dolphin 2.6 Mixtral 8x7B",
"version": "1.0",
"description": "This is a 16k context fine-tune of Mixtral-8x7b. It excels in coding tasks due to extensive training with coding data and is known for its obedience, although it lacks DPO tuning. The model is uncensored and is stripped of alignment and bias. It requires an external alignment layer for ethical use. Users are cautioned to use this highly compliant model responsibly, as detailed in a blog post about uncensored models at erichartford.com/uncensored-models.",
"format": "api",
"settings": {},
"parameters": {},
"metadata": {
"tags": ["General", "Big Context Length"]
},
"engine": "openai"
}
```
:::note
For more details regarding the `model.json` settings and parameters fields, please see [here](/guides/engines/remote-server/#modeljson).
:::
### Step 3 : Start the Model
1. Restart Jan and go to the **Hub**.
2. Find your model and click on the **Use** button.

View File

@ -1,22 +0,0 @@
---
title: Unsloth
sidebar_position: 20
slug: /integrations/unsloth
description: A step-by-step guide on how to integrate Jan with Unsloth.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Continue integration,
Unsloth integration,
]
---
Coming Soon

View File

@ -1,102 +0,0 @@
---
title: Continue Integration
sidebar_position: 18
slug: /integrations/continue
description: A step-by-step guide on how to integrate Jan with Continue and VS Code.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
Continue integration,
VSCode integration,
]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Integrate with Continue VS Code
[Continue](https://continue.dev/docs/intro) is an open-source autopilot compatible with Visual Studio Code and JetBrains, offering the simplest method to code with any LLM (Local Language Model).
To integrate Jan with a local AI language model, follow the steps below:
### Step 1: Installing Continue on Visal Studio Code
Follow this [guide to install the Continue extension on Visual Studio Code](https://continue.dev/docs/quickstart)
### Step 2: Enable the Jan API Server
To set up Continue for use with Jan's Local Server, you must activate the Jan API Server with your chosen model.
1. Press the `<>` button. Jan will take you to the **Local API Server** section.
2. Setup the server, which includes the **IP Port**, **Cross-Origin-Resource-Sharing (CORS)** and **Verbose Server Logs**.
3. Press the **Start Server** button
### Step 3: Configure Continue to Use Jan's Local Server
1. Go to the `~/.continue` directory.
<Tabs>
<TabItem value="mac" label="Mac" default>
```sh
cd ~/.continue
```
</TabItem>
<TabItem value="windows" label="Windows">
```sh
C:/Users/<your_user_name>/.continue
```
</TabItem>
<TabItem value="linux" label="Linux">
```sh
cd ~/.continue
```
</TabItem>
</Tabs>
```json title="~/.continue/config.json"
{
"models": [
{
"title": "Jan",
"provider": "openai",
"model": "mistral-ins-7b-q4",
"apiKey": "EMPTY",
"apiBase": "http://localhost:1337"
}
]
}
```
2. Ensure the file has the following configurations:
- Ensure `openai` is selected as the `provider`.
- Match the `model` with the one enabled in the Jan API Server.
- Set `apiBase` to `http://localhost:1337`.
- Leave the `apiKey` field to `EMPTY`.
### Step 4: Ensure the Using Model Is Activated in Jan
1. Navigate to `Settings` > `Models`.
2. Activate the model you want to use in Jan by clicking the **three dots (⋮)** and select **Start Model**.
## Try out Jan integration with Continue in Visual Studio Code
### 1. Asking questions about the code
1. Highlight a code snippet and press `Command + Shift + M` to open the Left Panel.
2. Select Jan at the bottom and ask a question about the code, for example, `Explain this code`.
### 2. Editing the code with the help of a large language model
1. Select a code snippet and use `Command + Shift + L`.
2. Enter your editing request, such as `Add comments to this code`.

View File

@ -1,23 +0,0 @@
---
title: Local Engines
slug: /guides/engines/local
sidebar_position: 13
description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
keywords:
[
Jan,
Rethink the Computer,
local AI,
privacy focus,
free and open source,
private and offline,
conversational AI,
no-subscription fee,
large language models,
build extension,
]
---
import DocCardList from "@theme/DocCardList";
<DocCardList />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

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