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 977dd0e7d..e33bf9873 100644 --- a/docs/docs/new/about.md +++ b/docs/docs/new/about.md @@ -107,7 +107,7 @@ curl https://api.openai.com/v1/chat/completions \ 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. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 0ce9a51c3..291637bd3 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -3,7 +3,7 @@ require("dotenv").config(); -const codeTheme = require("prism-react-renderer").themes.dracula; +const codeTheme = require("prism-react-renderer/themes/dracula"); /** @type {import('@docusaurus/types').Config} */ const config = { diff --git a/docs/package.json b/docs/package.json index eba38744f..2d3f9ce41 100644 --- a/docs/package.json +++ b/docs/package.json @@ -29,7 +29,7 @@ "docusaurus-plugin-sass": "^0.2.5", "postcss": "^8.4.30", "posthog-docusaurus": "^2.0.0", - "prism-react-renderer": "^2.2.0", + "prism-react-renderer": "^1.3.5", "react": "^17.0.2", "react-dom": "^17.0.2", "react-icons": "^4.11.0", diff --git a/docs/src/containers/Footer/index.js b/docs/src/containers/Footer/index.js index 0a98a9e89..9ada837d6 100644 --- a/docs/src/containers/Footer/index.js +++ b/docs/src/containers/Footer/index.js @@ -6,7 +6,7 @@ const menus = [ child: [ { menu: "Documentation", - path: "/nitro/overview", + path: "/docs", }, { menu: "API Reference", diff --git a/docs/src/containers/Homepage/GetNitro/index.js b/docs/src/containers/Homepage/GetNitro/index.js index 9dfcf04d4..b091bf191 100644 --- a/docs/src/containers/Homepage/GetNitro/index.js +++ b/docs/src/containers/Homepage/GetNitro/index.js @@ -10,9 +10,10 @@ import { useClipboard } from "@site/src/hooks/useClipboard"; export default function GetNitro() { const userAgent = typeof window !== "undefined" && navigator.userAgent; - const codeStringShell = userAgent?.includes("Windows") - ? `powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; .\install.bat; Remove-Item -Path 'install.bat' }"` - : `curl -sfL https://raw.githubusercontent.com/janhq/nitro/main/install.sh | sudo /bin/bash -`; + const codeStringShell = + typeof window !== "undefined" && userAgent?.includes("Windows") + ? `powershell -Command "& { Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/janhq/nitro/main/install.bat' -OutFile 'install.bat'; .\install.bat; Remove-Item -Path 'install.bat' }"` + : `curl -sfL https://raw.githubusercontent.com/janhq/nitro/main/install.sh | sudo /bin/bash -`; const codeStringNpm = `#(Coming Soon)\nnpm install @janhq/nitro`; const codeStringPython = `#(Coming Soon)\npip install @janhq/nitro`; diff --git a/docs/yarn.lock b/docs/yarn.lock index 55c392411..337267d0a 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -2260,11 +2260,6 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109" integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== -"@types/prismjs@^1.26.0": - version "1.26.3" - resolved "https://registry.yarnpkg.com/@types/prismjs/-/prismjs-1.26.3.tgz#47fe8e784c2dee24fe636cab82e090d3da9b7dec" - integrity sha512-A0D0aTXvjlqJ5ZILMz3rNfDBOx9hHxLZYv2by47Sm/pqW35zzjusrZTryatjN/Rf8Us2gZrJD+KeHbUSTux1Cw== - "@types/prop-types@*": version "15.7.11" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" @@ -7031,14 +7026,6 @@ prism-react-renderer@^1.0.1, prism-react-renderer@^1.3.5: resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz#786bb69aa6f73c32ba1ee813fbe17a0115435085" integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg== -prism-react-renderer@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-2.2.0.tgz#f199b15716e0b8d0ccfd1986ff6fa226fb7ff2b1" - integrity sha512-j4AN0VkEr72598+47xDvpzeYyeh/wPPRNTt9nJFZqIZUxwGKwYqYgt7RVigZ3ZICJWJWN84KEuMKPNyypyhNIw== - dependencies: - "@types/prismjs" "^1.26.0" - clsx "^1.2.1" - prismjs@^1.27.0, prismjs@^1.28.0: version "1.29.0" resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12"