diff --git a/docs/.gitignore b/docs/.gitignore index 811400bb3..93162cbbc 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -18,4 +18,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* -.env \ No newline at end of file +yarn.lock +.env diff --git a/docs/babel.config.js b/docs/babel.config.js index e00595dae..bfd75dbdf 100644 --- a/docs/babel.config.js +++ b/docs/babel.config.js @@ -1,3 +1,3 @@ module.exports = { - presets: [require.resolve('@docusaurus/core/lib/babel/preset')], + presets: [require.resolve("@docusaurus/core/lib/babel/preset")], }; diff --git a/docs/docs/features/chat.md b/docs/docs/features/chat.md index c0e8c75f3..bc2083522 100644 --- a/docs/docs/features/chat.md +++ b/docs/docs/features/chat.md @@ -24,6 +24,7 @@ curl http://localhost:3928/v1/chat/completions \ }' ``` +
@@ -42,6 +43,7 @@ curl https://api.openai.com/v1/chat/completions \ ] }' ``` +
This command sends a request to your local LLM, querying about the winner of the 2020 World Series. @@ -77,6 +79,7 @@ curl http://localhost:3928/v1/chat/completions \ }' ``` +
@@ -106,6 +109,7 @@ curl https://api.openai.com/v1/chat/completions \ ] }' ``` +
### Chat Completion Response @@ -138,6 +142,7 @@ Below are examples of responses from both the Nitro server and OpenAI: } } ``` +
@@ -166,7 +171,7 @@ Below are examples of responses from both the Nitro server and OpenAI: } } ``` -
+ -The chat completion feature in Nitro showcases compatibility with OpenAI, making the transition between using OpenAI and local AI models more straightforward. For further details and advanced usage, please refer to the [API reference](https://nitro.jan.ai/api). +The chat completion feature in Nitro showcases compatibility with OpenAI, making the transition between using OpenAI and local AI models more straightforward. For further details and advanced usage, please refer to the [API reference](https://nitro.jan.ai/api-reference). diff --git a/docs/docs/features/embed.md b/docs/docs/features/embed.md index 8462e87ee..3e571996a 100644 --- a/docs/docs/features/embed.md +++ b/docs/docs/features/embed.md @@ -26,6 +26,7 @@ curl http://localhost:3928/v1/embeddings \ }' ``` +
@@ -39,6 +40,7 @@ curl https://api.openai.com/v1/embeddings \ "encoding_format": "float" }' ``` +
## Embedding Reponse @@ -61,8 +63,9 @@ The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https "object": "embedding" } ] -} +} ``` +
@@ -83,7 +86,7 @@ The example response used the output from model [llama2 Chat 7B Q5 (GGUF)](https ``` -
+ -The embedding feature in Nitro demonstrates a high level of compatibility with OpenAI, simplifying the transition between using OpenAI and local AI models. For more detailed information and advanced use cases, refer to the comprehensive [API Reference]((https://nitro.jan.ai/api)). \ No newline at end of file +The embedding feature in Nitro demonstrates a high level of compatibility with OpenAI, simplifying the transition between using OpenAI and local AI models. For more detailed information and advanced use cases, refer to the comprehensive [API Reference](https://nitro.jan.ai/api-reference)). diff --git a/docs/docs/new/about.md b/docs/docs/new/about.md index 634bf9abb..e33bf9873 100644 --- a/docs/docs/new/about.md +++ b/docs/docs/new/about.md @@ -39,8 +39,9 @@ curl http://localhost:3928/v1/chat/completions \ }, ] }' - + ``` +
@@ -63,6 +64,7 @@ curl https://api.openai.com/v1/chat/completions \ ] }' ``` +
- **Extends OpenAI's API with helpful model methods:** @@ -80,7 +82,7 @@ curl https://api.openai.com/v1/chat/completions \ ### Multi-modal Capabilities - **Coming Soon**: Expansion to multi-modal functionalities - enabling Nitro to process and generate images, and audio. -- **Features to Expect**: +- **Features to Expect**: - Large Language-and-Vision Assistant. - Speech recognition and transcription. @@ -90,25 +92,30 @@ curl https://api.openai.com/v1/chat/completions \ - **Detailed Specifications**: For an in-depth understanding of Nitro's internal workings, components, and design philosophy, refer to our [Architecture Specifications](architecture.md). ## Support + ### GitHub Issue Tracking + - **Report Problems**: Encounter an issue with Nitro? File a [GitHub issue](https://github.com/janhq/nitro). Please include detailed error logs and steps to reproduce the problem. ### Discord Community + - **Join the Conversation**: Discuss Nitro development and seek peer support in our [#nitro-dev](https://discord.gg/FTk2MvZwJH) channel on Discord. ## Contributing ### How to Contribute + Nitro welcomes contributions in various forms, not just coding. Here are some ways you can get involved: -- **Understand Nitro**: Start with the [Getting Started](nitro/overview) guide. Found an issue or have a suggestion? [Open an issue](https://github.com/janhq/nitro/issues) to let us know. +- **Understand Nitro**: Start with the [Getting Started](/new/quickstart) guide. Found an issue or have a suggestion? [Open an issue](https://github.com/janhq/nitro/issues) to let us know. - **Feature Development**: Engage with community feature requests. Bring ideas to life by opening a [pull request](https://github.com/janhq/nitro/pulls) for features that interest you. ### Links + - [Nitro GitHub Repository](https://github.com/janhq/nitro) ## Acknowledgements - [drogon](https://github.com/drogonframework/drogon): The fast C++ web framework -- [llama.cpp](https://github.com/ggerganov/llama.cpp): Inference of LLaMA model in pure C/C++ \ No newline at end of file +- [llama.cpp](https://github.com/ggerganov/llama.cpp): Inference of LLaMA model in pure C/C++ diff --git a/docs/docs/new/architecture.md b/docs/docs/new/architecture.md index 510b4e103..01acb8093 100644 --- a/docs/docs/new/architecture.md +++ b/docs/docs/new/architecture.md @@ -7,6 +7,7 @@ title: Architecture ### Details element example ## Key Concepts + ## Inference Server An inference server is a type of server designed to process requests for running large language models and to return predictions. This server acts as the backbone for AI-powered applications, providing real-time execution of models to analyze data and make decisions. @@ -24,15 +25,6 @@ Parallel processing involves executing multiple computations simultaneously. For Drogon is an HTTP application framework based on C++14/17, designed for its speed and simplicity. Utilizing a non-blocking I/O and event-driven architecture, Drogon manages HTTP requests efficiently for high-performance and scalable applications. - **Event Loop**: Drogon uses an event loop to wait for and dispatch events or messages within a program. This allows for handling many tasks asynchronously, without relying on multi-threading. - - **Threads**: While the event loop allows for efficient task management, Drogon also employs threads to handle parallel operations. These "drogon threads" process multiple tasks concurrently. - - **Asynchronous Operations**: The framework supports non-blocking operations, permitting the server to continue processing other tasks while awaiting responses from databases or external services. - - **Scalability**: Drogon's architecture is built to scale, capable of managing numerous connections at once, suitable for applications with high traffic loads. - - - -We should only have 1 document -- [ ] Refactor system/architecture -- [ ] Refactor system/key-concepts \ No newline at end of file diff --git a/docs/docs/new/build-source.md b/docs/docs/new/build-source.md index e9c87cd8d..745a4cb64 100644 --- a/docs/docs/new/build-source.md +++ b/docs/docs/new/build-source.md @@ -15,19 +15,21 @@ git clone --recurse https://github.com/janhq/nitro If you don't have git, you can download the source code as a file archive from [Nitro GitHub](https://github.com/janhq/nitro). Each [release](https://github.com/caddyserver/caddy/releases) also has source snapshots. ## Install Dependencies + Next, let's install the necessary dependencies. - **On MacOS with Apple Silicon:** - ```bash - ./install_deps.sh - ``` + + ```bash + ./install_deps.sh + ``` - **On Windows:** - ```bash - cmake -S ./nitro_deps -B ./build_deps/nitro_deps - cmake --build ./build_deps/nitro_deps --config Release - ``` + ```bash + cmake -S ./nitro_deps -B ./build_deps/nitro_deps + cmake --build ./build_deps/nitro_deps --config Release + ``` This creates a `build_deps` folder. @@ -37,46 +39,46 @@ Now, let's generate the build files. - **On MacOS, Linux, and Windows:** - ```bash - mkdir build && cd build - cmake .. - ``` + ```bash + mkdir build && cd build + cmake .. + ``` - **On MacOS with Intel processors:** - ```bash - mkdir build && cd build - cmake -DLLAMA_METAL=OFF .. - ``` + ```bash + mkdir build && cd build + cmake -DLLAMA_METAL=OFF .. + ``` - **On Linux with CUDA:** - ```bash - mkdir build && cd build - cmake -DLLAMA_CUBLAS=ON .. - ``` + ```bash + mkdir build && cd build + cmake -DLLAMA_CUBLAS=ON .. + ``` ## Build the Application Time to build Nitro! - **On MacOS:** - - ```bash - make -j $(sysctl -n hw.physicalcpu) - ``` + + ```bash + make -j $(sysctl -n hw.physicalcpu) + ``` - **On Linux:** - ```bash - make -j $(%NUMBER_OF_PROCESSORS%) - ``` + ```bash + make -j $(%NUMBER_OF_PROCESSORS%) + ``` - **On Windows:** - ```bash - cmake --build . --config Release - ``` + ```bash + cmake --build . --config Release + ``` ## Start process @@ -84,19 +86,20 @@ Finally, let's start Nitro. - **On MacOS and Linux:** - ```bash - ./nitro - ``` + ```bash + ./nitro + ``` - **On Windows:** - ```bash - cd Release - copy ..\..\build_deps\_install\bin\zlib.dll . - nitro.exe - ``` + ```bash + cd Release + copy ..\..\build_deps\_install\bin\zlib.dll . + nitro.exe + ``` To verify if the build was successful: + ```bash curl http://localhost:3928/healthz -``` \ No newline at end of file +``` diff --git a/docs/docs/new/quickstart.md b/docs/docs/new/quickstart.md index b1bee8cac..9ec8dec69 100644 --- a/docs/docs/new/quickstart.md +++ b/docs/docs/new/quickstart.md @@ -1,19 +1,24 @@ --- title: Quickstart --- + ## Step 1: Install Nitro ### For Linux and MacOS + Open your terminal and enter the following command. This will download and install Nitro on your system. - ```bash - curl -sfL https://raw.githubusercontent.com/janhq/nitro/main/install.sh -o /tmp/install.sh && chmod +x /tmp/install.sh && sudo bash /tmp/install.sh --gpu && rm /tmp/install.sh - ``` + +```bash +curl -sfL https://raw.githubusercontent.com/janhq/nitro/main/install.sh -o /tmp/install.sh && chmod +x /tmp/install.sh && sudo bash /tmp/install.sh --gpu && rm /tmp/install.sh +``` ### For Windows + Open PowerShell and execute the following command. This will perform the same actions as for Linux and MacOS but is tailored for Windows. - ```bash - powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; .\install.bat --gpu; Remove-Item -Path 'install.bat' }" - ``` + +```bash +powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; .\install.bat --gpu; Remove-Item -Path 'install.bat' }" +``` > **NOTE:**Installing Nitro will add new files and configurations to your system to enable it to run. @@ -24,6 +29,7 @@ For a manual installation process, see: [Install from Source](install.md) Next, we need to download a model. For this example, we'll use the [Llama2 7B chat model](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/tree/main). - Create a `/model` and navigate into it: + ```bash mkdir model && cd model wget -O llama-2-7b-model.gguf https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_M.gguf?download=true @@ -78,4 +84,4 @@ curl http://localhost:3928/v1/chat/completions \ This command sends a request to Nitro, asking it about the 2020 World Series winner. -- As you can see, A key benefit of Nitro is its alignment with [OpenAI's API structure](https://platform.openai.com/docs/guides/text-generation?lang=curl). Its inference call syntax closely mirrors that of OpenAI's API, facilitating an easier shift for those accustomed to OpenAI's framework. \ No newline at end of file +- As you can see, A key benefit of Nitro is its alignment with [OpenAI's API structure](https://platform.openai.com/docs/guides/text-generation?lang=curl). Its inference call syntax closely mirrors that of OpenAI's API, facilitating an easier shift for those accustomed to OpenAI's framework. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index b4fe10f5d..291637bd3 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -3,8 +3,7 @@ require("dotenv").config(); -const lightCodeTheme = require("prism-react-renderer/themes/github"); -const darkCodeTheme = require("prism-react-renderer/themes/dracula"); +const codeTheme = require("prism-react-renderer/themes/dracula"); /** @type {import('@docusaurus/types').Config} */ const config = { @@ -33,7 +32,7 @@ const config = { defaultLocale: "en", locales: ["en"], }, - + markdown: { mermaid: true, }, @@ -71,7 +70,7 @@ const config = { // Will be passed to @docusaurus/plugin-content-docs (false to disable) docs: { routeBasePath: "/", - sidebarPath: require.resolve("./sidebars.js"), + sidebarPath: "./sidebars.js", editUrl: "https://github.com/janhq/nitro/tree/main/docs", showLastUpdateAuthor: true, showLastUpdateTime: true, @@ -90,7 +89,7 @@ const config = { }, // Will be passed to @docusaurus/theme-classic. theme: { - customCss: require.resolve("./src/styles/main.scss"), + customCss: "./src/styles/main.scss", }, // Will be passed to @docusaurus/plugin-content-pages (false to disable) // pages: {}, @@ -129,7 +128,7 @@ const config = { title: "Nitro", logo: { alt: "Nitro Logo", - src: "img/logo.svg", + src: "img/logos/nitro.svg", }, items: [ // Navbar left @@ -161,9 +160,9 @@ const config = { ], }, prism: { - theme: lightCodeTheme, - darkTheme: darkCodeTheme, - additionalLanguages: ["python"], + theme: codeTheme, + darkTheme: codeTheme, + additionalLanguages: ["python", "powershell", "bash"], }, colorMode: { defaultMode: "dark", @@ -171,8 +170,8 @@ const config = { respectPrefersColorScheme: false, }, }), - // Only for react live - themes: ["@docusaurus/theme-live-codeblock", "@docusaurus/theme-mermaid"], + // Only for react live + themes: ["@docusaurus/theme-live-codeblock", "@docusaurus/theme-mermaid"], }; module.exports = config; diff --git a/docs/openapi/NitroAPI.yaml b/docs/openapi/NitroAPI.yaml index bc952bfc5..3b85557d3 100644 --- a/docs/openapi/NitroAPI.yaml +++ b/docs/openapi/NitroAPI.yaml @@ -40,7 +40,7 @@ paths: # under the appropriate group /healthz: get: - operationId: HeathCheck + operationId: heathCheck tags: - Health Check summary: Check the status of Nitro Server. @@ -171,7 +171,7 @@ paths: requestBody: content: application/json: - schema: + schema: $ref: "#/components/schemas/ChatCompletionRequest" x-codeSamples: - lang: "curl" @@ -255,7 +255,7 @@ components: default: "ASSISTANT:" nullable: true description: The prefix for assistant prompt. - + required: - llama_model_path @@ -493,7 +493,14 @@ components: description: Array representing the embedding vector items: type: arrays - example: [0.067819312214851379,0.17273959517478943,-0.31053683161735535, ... ,0.36176943778991699] + example: + [ + 0.067819312214851379, + 0.17273959517478943, + -0.31053683161735535, + ..., + 0.36176943778991699, + ] index: type: integer description: Index of the embedding in the array @@ -523,38 +530,40 @@ components: description: Total number of tokens involved in the operation example: 533 - - ChatCompletionRequest: type: object properties: messages: type: arrays description: Contains input data or prompts for the model to process - example: [{"content": "Hello there :wave:","role": "assistant"},{"content": "Can you write a long story","role": "user"}] + example: + [ + { "content": "Hello there :wave:", "role": "assistant" }, + { "content": "Can you write a long story", "role": "user" }, + ] stream: type: boolean - default: true + default: true description: Enables continuous output generation, allowing for streaming of model responses. model: type: string - example: "gpt-3.5-turbo" + example: "gpt-3.5-turbo" description: Specifies the model being used for inference or processing tasks. max_tokens: type: number - default: 2048 + default: 2048 description: The maximum number of tokens the model will generate in a single response stop: type: arrays - example: ['hello'] + example: ["hello"] description: Defines specific tokens or phrases at which the model will stop generating further output. frequency_penalty: type: number - default: 0 + default: 0 description: Adjusts the likelihood of the model repeating words or phrases in its output. presence_penalty: type: number - default: 0 + default: 0 description: Influences the generation of new and varied concepts in the model's output temperature: type: number @@ -631,6 +640,5 @@ components: type: integer example: 533 description: Total number of tokens used - ################################### ################################# diff --git a/docs/openapi/OpenAIAPI.yaml b/docs/openapi/OpenAIAPI.yaml index bd4a9cab1..d6a9faa17 100644 --- a/docs/openapi/OpenAIAPI.yaml +++ b/docs/openapi/OpenAIAPI.yaml @@ -5320,7 +5320,6 @@ components: scheme: "bearer" schemas: - LoadModelRequest: type: object properties: @@ -5377,7 +5376,7 @@ components: default: "ASSISTANT:" nullable: true description: The prefix for assistant prompt. - + required: - llama_model_path @@ -5599,7 +5598,8 @@ components: properties: embedding: type: array - example: [-0.987474262714386,0.29654932022094727,0.19979725778102875,...] + example: + [-0.987474262714386, 0.29654932022094727, 0.19979725778102875, ...] description: The list of embeddings generated by the model. ChatCompletionRequest: @@ -5621,27 +5621,27 @@ components: ] stream: type: boolean - default: true + default: true description: Enables continuous output generation, allowing for streaming of model responses. model: type: string - example: "gpt-3.5-turbo" + example: "gpt-3.5-turbo" description: Specifies the model being used for inference or processing tasks. max_tokens: type: number - default: 2048 + default: 2048 description: The maximum number of tokens the model will generate in a single response stop: type: arrays - example: ['hello'] + example: ["hello"] description: Defines specific tokens or phrases at which the model will stop generating further output. frequency_penalty: type: number - default: 0 + default: 0 description: Adjusts the likelihood of the model repeating words or phrases in its output. presence_penalty: type: number - default: 0 + default: 0 description: Influences the generation of new and varied concepts in the model's output temperature: type: number @@ -5657,7 +5657,7 @@ components: type: string example: Hello, I am an AI. description: The list of text generated by the model. -################################### + ################################### Error: type: object properties: @@ -9868,4 +9868,4 @@ x-oaiMeta: path: object - type: endpoint key: createEdit - path: create \ No newline at end of file + path: create diff --git a/docs/package.json b/docs/package.json index dbf358cb7..2d3f9ce41 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,31 +16,31 @@ "dependencies": { "@docusaurus/core": "^2.4.3", "@docusaurus/preset-classic": "^2.4.3", + "@docusaurus/theme-common": "^2.4.3", "@docusaurus/theme-live-codeblock": "^2.4.3", "@docusaurus/theme-mermaid": "^2.4.3", + "@docusaurus/utils": "^2.4.3", "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.0.18", "@mdx-js/react": "^1.6.22", "autoprefixer": "^10.4.16", "axios": "^1.5.1", - "clsx": "^1.2.1", - "@docusaurus/plugin-content-docs": "2.4.3", - "docusaurus-plugin-redoc": "^2.0.0", + "clsx": "^2.0.0", "docusaurus-plugin-sass": "^0.2.5", - "docusaurus-theme-redoc": "^2.0.0", - "js-yaml": "^4.1.0", "postcss": "^8.4.30", "posthog-docusaurus": "^2.0.0", "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", "react-icons": "^4.11.0", + "react-syntax-highlighter": "^15.5.0", "redocusaurus": "^2.0.0", "sass": "^1.69.3", + "tailwind-merge": "^2.0.0", "tailwindcss": "^3.3.3" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.4.1", + "@docusaurus/module-type-aliases": "2.4.3", "dotenv": "^16.3.1", "tailwindcss-animate": "^1.0.7" }, @@ -59,4 +59,4 @@ "engines": { "node": ">=16.14" } -} \ No newline at end of file +} diff --git a/docs/sidebars.js b/docs/sidebars.js index af8dbd21e..73798554c 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -23,17 +23,17 @@ const sidebars = { label: "Introduction", collapsible: false, collapsed: false, - items: [ - { type: "doc", id: "new/about", label: "About Nitro" }, - { type: "doc", id: "new/quickstart", label: "Quickstart" }, - { type: "doc", id: "new/install", label: "Installation" }, - "new/build-source" - ], + items: [ + { type: "doc", id: "new/about", label: "About Nitro" }, + { type: "doc", id: "new/quickstart", label: "Quickstart" }, + { type: "doc", id: "new/install", label: "Installation" }, + "new/build-source", + ], }, { - type: 'category', - label: 'Features', - link: { type: "doc", id: "features/feat"}, + type: "category", + label: "Features", + link: { type: "doc", id: "features/feat" }, items: [ "features/chat", "features/embed", @@ -72,5 +72,4 @@ const sidebars = { // ] }; - module.exports = sidebars; diff --git a/docs/src/components/Announcement/index.js b/docs/src/containers/Banner/index.js similarity index 98% rename from docs/src/components/Announcement/index.js rename to docs/src/containers/Banner/index.js index 641687684..9ff19c834 100644 --- a/docs/src/components/Announcement/index.js +++ b/docs/src/containers/Banner/index.js @@ -21,7 +21,7 @@ const socials = [ }, ]; -export default function AnnoncementBanner() { +export default function Banner() { const { stargazers } = useAppStars(); const { release } = useAppRelease(); diff --git a/docs/src/components/Elements/dropdown.js b/docs/src/containers/DownloadButton/index.js similarity index 83% rename from docs/src/components/Elements/dropdown.js rename to docs/src/containers/DownloadButton/index.js index 443547132..a8b13ae2d 100644 --- a/docs/src/components/Elements/dropdown.js +++ b/docs/src/containers/DownloadButton/index.js @@ -6,24 +6,19 @@ import axios from "axios"; const systemsTemplate = [ { - name: "Download for Mac (M1/M2)", + name: "Download for Mac", logo: require("@site/static/img/apple-logo-white.png").default, - fileFormat: "{appname}-mac-arm64-{tag}.dmg", - }, - { - name: "Download for Mac (Intel)", - logo: require("@site/static/img/apple-logo-white.png").default, - fileFormat: "{appname}-mac-x64-{tag}.dmg", + fileFormat: "{appname}-mac-arm64.zip", }, { name: "Download for Windows", logo: require("@site/static/img/windows-logo-white.png").default, - fileFormat: "{appname}-win-x64-{tag}.exe", + fileFormat: "{appname}-win-amd64.zip", }, { name: "Download for Linux", logo: require("@site/static/img/linux-logo-white.png").default, - fileFormat: "{appname}-linux-amd64-{tag}.deb", + fileFormat: "{appname}-linux-amd64.zip", }, ]; @@ -31,7 +26,7 @@ function classNames(...classes) { return classes.filter(Boolean).join(" "); } -export default function Dropdown() { +export default function DownloadButton() { const [systems, setSystems] = useState(systemsTemplate); const [defaultSystem, setDefaultSystem] = useState(systems[0]); @@ -54,25 +49,23 @@ export default function Dropdown() { }; const changeDefaultSystem = (systems) => { - const userAgent = navigator.userAgent; + const userAgent = typeof window !== "undefined" && navigator.userAgent; if (userAgent.includes("Windows")) { // windows user - setDefaultSystem(systems[2]); + setDefaultSystem(systems[1]); } else if (userAgent.includes("Linux")) { // linux user - setDefaultSystem(systems[3]); - } else if (userAgent.includes("Mac OS") && userAgent.includes("Intel")) { - // mac intel user - setDefaultSystem(systems[1]); + setDefaultSystem(systems[2]); + } else if (userAgent.includes("Mac OS")) { + setDefaultSystem(systems[0]); } else { - // mac user and also default setDefaultSystem(systems[0]); } }; useEffect(() => { const updateDownloadLinks = async () => { try { - const releaseInfo = await getLatestReleaseInfo("janhq", "jan"); + const releaseInfo = await getLatestReleaseInfo("janhq", "nitro"); // Extract appname from the first asset name const firstAssetName = releaseInfo.assets[0].name; @@ -98,7 +91,7 @@ export default function Dropdown() { .replace("{tag}", tag); return { ...system, - href: `https://github.com/janhq/jan/releases/download/${releaseInfo.tag_name}/${downloadUrl}`, + href: `https://github.com/janhq/nitro/releases/download/${releaseInfo.tag_name}/${downloadUrl}`, }; }); @@ -115,10 +108,10 @@ export default function Dropdown() { return (
- Logo + Logo {defaultSystem.name} diff --git a/docs/src/components/Footer/index.js b/docs/src/containers/Footer/index.js similarity index 71% rename from docs/src/components/Footer/index.js rename to docs/src/containers/Footer/index.js index c546c1f50..e565c60ef 100644 --- a/docs/src/components/Footer/index.js +++ b/docs/src/containers/Footer/index.js @@ -1,37 +1,16 @@ import React from "react"; const menus = [ - { - name: "Resources", - child: [ - { - menu: "Home", - path: "/", - }, - { - menu: "Platform", - path: "/platform", - }, - { - menu: "Solutions", - path: "/solutions", - }, - ], - }, { name: "For Developers", child: [ { - menu: "Documentation (WIP)", + menu: "Documentation", path: "/docs", }, { - menu: "Hardware (WIP)", - path: "/hardware", - }, - { - menu: "API (WIP)", - path: "/api", + menu: "API Reference", + path: "/api-reference", }, { menu: "Changelog", @@ -63,10 +42,6 @@ const menus = [ { name: "Company", child: [ - { - menu: "About", - path: "/about", - }, { menu: "Careers", path: "https://janai.bamboohr.com/careers", @@ -80,14 +55,22 @@ const getCurrentYear = new Date().getFullYear(); export default function Footer() { return ( -