diff --git a/website/astro.config.mjs b/website/astro.config.mjs index a4a2e5211..3c8b613a8 100644 --- a/website/astro.config.mjs +++ b/website/astro.config.mjs @@ -4,6 +4,7 @@ import starlight from '@astrojs/starlight' import starlightThemeRapide from 'starlight-theme-rapide' import starlightSidebarTopics from 'starlight-sidebar-topics' import starlightVideos from 'starlight-videos' +// import starlightOpenAPI, { openAPISidebarGroups } from 'starlight-openapi' // https://astro.build/config export default defineConfig({ @@ -104,26 +105,6 @@ export default defineConfig({ }, ], }, - { - label: 'Products', - link: '/products/', - icon: 'forward-slash', - items: [ - { label: 'Overview', slug: 'products' }, - { - label: 'Models', - autogenerate: { directory: 'products/models' }, - }, - { - label: 'Platforms', - autogenerate: { directory: 'products/platforms' }, - }, - { - label: 'Tools', - autogenerate: { directory: 'products/tools' }, - }, - ], - }, { label: 'Jan AI University', link: '/university/', @@ -169,7 +150,7 @@ export default defineConfig({ }, ], { - exclude: ['/prods'], + exclude: ['/prods', '/api-reference', '/products', '/products/**/*'], topics: { university: [ '/university/getting-started/what-is-jan', @@ -188,6 +169,9 @@ export default defineConfig({ href: 'https://github.com/menloresearch/jan', }, ], + components: { + Header: './src/components/CustomNav.astro', + }, }), ], }) diff --git a/website/bun.lock b/website/bun.lock index a14a47a64..ed1118591 100644 --- a/website/bun.lock +++ b/website/bun.lock @@ -5,10 +5,12 @@ "name": "website", "dependencies": { "@astrojs/starlight": "^0.35.1", + "@lorenzo_lewis/starlight-utils": "^0.3.2", "astro": "^5.6.1", "gsap": "^3.13.0", "phosphor-astro": "^2.1.0", "sharp": "^0.34.2", + "starlight-openapi": "^0.19.1", "starlight-sidebar-topics": "^0.6.0", "starlight-theme-rapide": "^0.5.1", "starlight-videos": "^0.3.0", @@ -16,6 +18,8 @@ }, }, "packages": { + "@apidevtools/swagger-methods": ["@apidevtools/swagger-methods@3.0.2", "", {}, "sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg=="], + "@astro-community/astro-embed-youtube": ["@astro-community/astro-embed-youtube@0.5.6", "", { "dependencies": { "lite-youtube-embed": "^0.3.3" }, "peerDependencies": { "astro": "^2.0.0 || ^3.0.0-beta || ^4.0.0-beta || ^5.0.0-beta" } }, "sha512-/mRfCl/eTBUz0kmjD1psOy0qoDDBorVp0QumUacjFcIkBullYtbeFQ2ZGZ+3N/tA6cR/OIyzr2QA4dQXlY6USg=="], "@astrojs/compiler": ["@astrojs/compiler@2.12.2", "", {}, "sha512-w2zfvhjNCkNMmMMOn5b0J8+OmUaBL1o40ipMvqcG6NRpdC+lKxmTi48DT8Xw0SzJ3AfmeFLB45zXZXtmbsjcgw=="], @@ -34,6 +38,8 @@ "@astrojs/telemetry": ["@astrojs/telemetry@3.3.0", "", { "dependencies": { "ci-info": "^4.2.0", "debug": "^4.4.0", "dlv": "^1.1.3", "dset": "^3.1.4", "is-docker": "^3.0.0", "is-wsl": "^3.1.0", "which-pm-runs": "^1.1.0" } }, "sha512-UFBgfeldP06qu6khs/yY+q1cDAaArM2/7AEIqQ9Cuvf7B1hNLq0xDrZkct+QoIGyjq56y8IaE2I3CTvG99mlhQ=="], + "@babel/code-frame": ["@babel/code-frame@7.27.1", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.27.1", "js-tokens": "^4.0.0", "picocolors": "^1.1.1" } }, "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg=="], + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.27.1", "", {}, "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow=="], @@ -110,6 +116,8 @@ "@expressive-code/plugin-text-markers": ["@expressive-code/plugin-text-markers@0.41.3", "", { "dependencies": { "@expressive-code/core": "^0.41.3" } }, "sha512-SN8tkIzDpA0HLAscEYD2IVrfLiid6qEdE9QLlGVSxO1KEw7qYvjpbNBQjUjMr5/jvTJ7ys6zysU2vLPHE0sb2g=="], + "@humanwhocodes/momoa": ["@humanwhocodes/momoa@2.0.4", "", {}, "sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA=="], + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.34.3", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.0" }, "os": "darwin", "cpu": "arm64" }, "sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg=="], "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.34.3", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.2.0" }, "os": "darwin", "cpu": "x64" }, "sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA=="], @@ -156,6 +164,10 @@ "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.4", "", {}, "sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw=="], + "@jsdevtools/ono": ["@jsdevtools/ono@7.1.3", "", {}, "sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg=="], + + "@lorenzo_lewis/starlight-utils": ["@lorenzo_lewis/starlight-utils@0.3.2", "", { "dependencies": { "astro-integration-kit": "^0.18.0" }, "peerDependencies": { "@astrojs/starlight": ">=0.32.0", "astro": ">=5" } }, "sha512-9GCZLyfIUTkXuE39jHjcCSwnOzm6hSGnC8DrHlo2imegiZmZSdG0eBMA/sTb/shLkvCzE2SGCaKM+EwIeO6oDw=="], + "@mdx-js/mdx": ["@mdx-js/mdx@3.1.0", "", { "dependencies": { "@types/estree": "^1.0.0", "@types/estree-jsx": "^1.0.0", "@types/hast": "^3.0.0", "@types/mdx": "^2.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", "estree-walker": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", "recma-build-jsx": "^1.0.0", "recma-jsx": "^1.0.0", "recma-stringify": "^1.0.0", "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "source-map": "^0.7.0", "unified": "^11.0.0", "unist-util-position-from-estree": "^2.0.0", "unist-util-stringify-position": "^4.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-/QxEhPAvGwbQmy1Px8F899L5Uc2KZ6JtXwlCgJmjSTBedwOZkByYcBG4GceIGPXRDsmfxhHazuS+hlOShRLeDw=="], "@oslojs/encoding": ["@oslojs/encoding@1.1.0", "", {}, "sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ=="], @@ -172,6 +184,14 @@ "@pagefind/windows-x64": ["@pagefind/windows-x64@1.3.0", "", { "os": "win32", "cpu": "x64" }, "sha512-BR1bIRWOMqkf8IoU576YDhij1Wd/Zf2kX/kCI0b2qzCKC8wcc2GQJaaRMCpzvCCrmliO4vtJ6RITp/AnoYUUmQ=="], + "@readme/better-ajv-errors": ["@readme/better-ajv-errors@2.3.2", "", { "dependencies": { "@babel/code-frame": "^7.22.5", "@babel/runtime": "^7.22.5", "@humanwhocodes/momoa": "^2.0.3", "jsonpointer": "^5.0.0", "leven": "^3.1.0", "picocolors": "^1.1.1" }, "peerDependencies": { "ajv": "4.11.8 - 8" } }, "sha512-T4GGnRAlY3C339NhoUpgJJFsMYko9vIgFAlhgV+/vEGFw66qEY4a4TRJIAZBcX/qT1pq5DvXSme+SQODHOoBrw=="], + + "@readme/json-schema-ref-parser": ["@readme/json-schema-ref-parser@1.2.0", "", { "dependencies": { "@jsdevtools/ono": "^7.1.3", "@types/json-schema": "^7.0.6", "call-me-maybe": "^1.0.1", "js-yaml": "^4.1.0" } }, "sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA=="], + + "@readme/openapi-parser": ["@readme/openapi-parser@2.7.0", "", { "dependencies": { "@apidevtools/swagger-methods": "^3.0.2", "@jsdevtools/ono": "^7.1.3", "@readme/better-ajv-errors": "^2.0.0", "@readme/json-schema-ref-parser": "^1.2.0", "@readme/openapi-schemas": "^3.1.0", "ajv": "^8.12.0", "ajv-draft-04": "^1.0.0", "call-me-maybe": "^1.0.1" }, "peerDependencies": { "openapi-types": ">=7" } }, "sha512-P8WSr8WTOxilnT89tcCRKWYsG/II4sAwt1a/DIWub8xTtkrG9cCBBy/IUcvc5X8oGWN82MwcTA3uEkDrXZd/7A=="], + + "@readme/openapi-schemas": ["@readme/openapi-schemas@3.1.0", "", {}, "sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw=="], + "@rollup/pluginutils": ["@rollup/pluginutils@5.2.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-walker": "^2.0.2", "picomatch": "^4.0.2" }, "peerDependencies": { "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" }, "optionalPeers": ["rollup"] }, "sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw=="], "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.45.1", "", { "os": "android", "cpu": "arm" }, "sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA=="], @@ -242,6 +262,8 @@ "@types/js-yaml": ["@types/js-yaml@4.0.9", "", {}, "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg=="], + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], "@types/mdx": ["@types/mdx@2.0.13", "", {}, "sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw=="], @@ -262,6 +284,10 @@ "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], + "ajv": ["ajv@8.17.1", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2" } }, "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g=="], + + "ajv-draft-04": ["ajv-draft-04@1.0.0", "", { "peerDependencies": { "ajv": "^8.5.0" }, "optionalPeers": ["ajv"] }, "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw=="], + "ansi-align": ["ansi-align@3.0.1", "", { "dependencies": { "string-width": "^4.1.0" } }, "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w=="], "ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], @@ -278,12 +304,16 @@ "array-iterate": ["array-iterate@2.0.1", "", {}, "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg=="], + "ast-types": ["ast-types@0.16.1", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg=="], + "astring": ["astring@1.9.0", "", { "bin": { "astring": "bin/astring" } }, "sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg=="], "astro": ["astro@5.12.1", "", { "dependencies": { "@astrojs/compiler": "^2.12.2", "@astrojs/internal-helpers": "0.6.1", "@astrojs/markdown-remark": "6.3.3", "@astrojs/telemetry": "3.3.0", "@capsizecss/unpack": "^2.4.0", "@oslojs/encoding": "^1.1.0", "@rollup/pluginutils": "^5.1.4", "acorn": "^8.14.1", "aria-query": "^5.3.2", "axobject-query": "^4.1.0", "boxen": "8.0.1", "ci-info": "^4.2.0", "clsx": "^2.1.1", "common-ancestor-path": "^1.0.1", "cookie": "^1.0.2", "cssesc": "^3.0.0", "debug": "^4.4.0", "deterministic-object-hash": "^2.0.2", "devalue": "^5.1.1", "diff": "^5.2.0", "dlv": "^1.1.3", "dset": "^3.1.4", "es-module-lexer": "^1.6.0", "esbuild": "^0.25.0", "estree-walker": "^3.0.3", "flattie": "^1.1.1", "fontace": "~0.3.0", "github-slugger": "^2.0.0", "html-escaper": "3.0.3", "http-cache-semantics": "^4.1.1", "import-meta-resolve": "^4.1.0", "js-yaml": "^4.1.0", "kleur": "^4.1.5", "magic-string": "^0.30.17", "magicast": "^0.3.5", "mrmime": "^2.0.1", "neotraverse": "^0.6.18", "p-limit": "^6.2.0", "p-queue": "^8.1.0", "package-manager-detector": "^1.1.0", "picomatch": "^4.0.2", "prompts": "^2.4.2", "rehype": "^13.0.2", "semver": "^7.7.1", "shiki": "^3.2.1", "smol-toml": "^1.3.4", "tinyexec": "^0.3.2", "tinyglobby": "^0.2.12", "tsconfck": "^3.1.5", "ultrahtml": "^1.6.0", "unifont": "~0.5.0", "unist-util-visit": "^5.0.0", "unstorage": "^1.15.0", "vfile": "^6.0.3", "vite": "^6.3.4", "vitefu": "^1.0.6", "xxhash-wasm": "^1.1.0", "yargs-parser": "^21.1.1", "yocto-spinner": "^0.2.1", "zod": "^3.24.2", "zod-to-json-schema": "^3.24.5", "zod-to-ts": "^1.2.0" }, "optionalDependencies": { "sharp": "^0.33.3" }, "bin": { "astro": "astro.js" } }, "sha512-/gH9cLIp6UNdbJO1FPBVN/Ea+1I9hJdQoLJKYUsXIRIfHcyF/3NCg0QVDJGw1oWkyQT6x6poQsnbgY9UXitjiw=="], "astro-expressive-code": ["astro-expressive-code@0.41.3", "", { "dependencies": { "rehype-expressive-code": "^0.41.3" }, "peerDependencies": { "astro": "^4.0.0-beta || ^5.0.0-beta || ^3.3.0" } }, "sha512-u+zHMqo/QNLE2eqYRCrK3+XMlKakv33Bzuz+56V1gs8H0y6TZ0hIi3VNbIxeTn51NLn+mJfUV/A0kMNfE4rANw=="], + "astro-integration-kit": ["astro-integration-kit@0.18.0", "", { "dependencies": { "pathe": "^1.1.2", "recast": "^0.23.7" }, "peerDependencies": { "astro": "^4.12.0 || ^5.0.0" } }, "sha512-Z0QW5IQjosuKQDEGYYkvUX6EhEtrmE4/oViqWz23QveV8U7AuyFsTdg00WRNPevWZl/5a4lLUeDpv4bCRynRRg=="], + "axobject-query": ["axobject-query@4.1.0", "", {}, "sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ=="], "bail": ["bail@2.0.2", "", {}, "sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw=="], @@ -304,6 +334,8 @@ "brotli": ["brotli@1.3.3", "", { "dependencies": { "base64-js": "^1.1.2" } }, "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg=="], + "call-me-maybe": ["call-me-maybe@1.0.2", "", {}, "sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ=="], + "camelcase": ["camelcase@8.0.0", "", {}, "sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA=="], "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], @@ -398,6 +430,8 @@ "escape-string-regexp": ["escape-string-regexp@5.0.0", "", {}, "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw=="], + "esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="], + "estree-util-attach-comments": ["estree-util-attach-comments@3.0.0", "", { "dependencies": { "@types/estree": "^1.0.0" } }, "sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw=="], "estree-util-build-jsx": ["estree-util-build-jsx@3.0.1", "", { "dependencies": { "@types/estree-jsx": "^1.0.0", "devlop": "^1.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-walker": "^3.0.0" } }, "sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ=="], @@ -420,6 +454,8 @@ "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + "fast-uri": ["fast-uri@3.0.6", "", {}, "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw=="], + "fdir": ["fdir@6.4.6", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w=="], "flattie": ["flattie@1.1.1", "", {}, "sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ=="], @@ -516,12 +552,20 @@ "iso8601-duration": ["iso8601-duration@2.1.2", "", {}, "sha512-yXteYUiKv6x8seaDzyBwnZtPpmx766KfvQuaVNyPifYOjmPdOo3ajd4phDNa7Y5mTQGnXsNEcXFtVun1FjYXxQ=="], + "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], + "js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="], + "json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + + "jsonpointer": ["jsonpointer@5.0.1", "", {}, "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ=="], + "kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="], "klona": ["klona@2.0.6", "", {}, "sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA=="], + "leven": ["leven@3.1.0", "", {}, "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A=="], + "lite-youtube-embed": ["lite-youtube-embed@0.3.3", "", {}, "sha512-gFfVVnj6NRjxVfJKo3qoLtpi0v5mn3AcR4eKD45wrxQuxzveFJUb+7Cr6uV6n+DjO8X3p0UzPPquhGt0H/y+NA=="], "longest-streak": ["longest-streak@3.1.0", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="], @@ -674,6 +718,8 @@ "oniguruma-to-es": ["oniguruma-to-es@4.3.3", "", { "dependencies": { "oniguruma-parser": "^0.12.1", "regex": "^6.0.1", "regex-recursion": "^6.0.2" } }, "sha512-rPiZhzC3wXwE59YQMRDodUwwT9FZ9nNBwQQfsd1wfdtlKEyCdRV0avrTcSZ5xlIvGRVPd/cx6ZN45ECmS39xvg=="], + "openapi-types": ["openapi-types@12.1.3", "", {}, "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw=="], + "p-limit": ["p-limit@6.2.0", "", { "dependencies": { "yocto-queue": "^1.1.1" } }, "sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA=="], "p-queue": ["p-queue@8.1.0", "", { "dependencies": { "eventemitter3": "^5.0.1", "p-timeout": "^6.1.2" } }, "sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw=="], @@ -692,6 +738,8 @@ "parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="], + "pathe": ["pathe@1.1.2", "", {}, "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ=="], + "phosphor-astro": ["phosphor-astro@2.1.0", "", {}, "sha512-qyYUlxF8DbfHc+85DDGPL04ghNBwrVK75EsNsBfYOChiCeCRwAwfbHxj/qqPrrSFPMgh9cUyEvgKYjI/7bjCUA=="], "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], @@ -714,6 +762,8 @@ "readdirp": ["readdirp@4.1.2", "", {}, "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg=="], + "recast": ["recast@0.23.11", "", { "dependencies": { "ast-types": "^0.16.1", "esprima": "~4.0.0", "source-map": "~0.6.1", "tiny-invariant": "^1.3.3", "tslib": "^2.0.1" } }, "sha512-YTUo+Flmw4ZXiWfQKGcwwc11KnoRAYgzAE2E7mXKCjSviTKShtxBsN6YUUBB2gtaBzKzeKunxhUwNHQuRryhWA=="], + "recma-build-jsx": ["recma-build-jsx@1.0.0", "", { "dependencies": { "@types/estree": "^1.0.0", "estree-util-build-jsx": "^3.0.0", "vfile": "^6.0.0" } }, "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew=="], "recma-jsx": ["recma-jsx@1.0.0", "", { "dependencies": { "acorn-jsx": "^5.0.0", "estree-util-to-js": "^2.0.0", "recma-parse": "^1.0.0", "recma-stringify": "^1.0.0", "unified": "^11.0.0" } }, "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q=="], @@ -756,6 +806,8 @@ "remark-stringify": ["remark-stringify@11.0.0", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="], + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + "restructure": ["restructure@3.0.2", "", {}, "sha512-gSfoiOEA0VPE6Tukkrr7I0RBdE0s7H1eFCDBk05l1KIQT1UIKNc5JZy6jdyW6eYH3aR3g5b3PuL77rq0hvwtAw=="], "retext": ["retext@9.0.0", "", { "dependencies": { "@types/nlcst": "^2.0.0", "retext-latin": "^4.0.0", "retext-stringify": "^4.0.0", "unified": "^11.0.0" } }, "sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA=="], @@ -792,6 +844,8 @@ "srt-parser-2": ["srt-parser-2@1.2.3", "", { "bin": { "srt-parser-2": "bin/index.js" } }, "sha512-dANP1AyJTI503H0/kXwRza+7QxDB3BqeFvEKTF4MI9lQcBe8JbRUQTKVIGzGABJCwBovEYavZ2Qsdm/s8XKz8A=="], + "starlight-openapi": ["starlight-openapi@0.19.1", "", { "dependencies": { "@readme/openapi-parser": "^2.7.0", "github-slugger": "^2.0.0", "url-template": "^3.1.1" }, "peerDependencies": { "@astrojs/markdown-remark": ">=6.0.1", "@astrojs/starlight": ">=0.34.0", "astro": ">=5.5.0" } }, "sha512-hEwbLlxpWaEceJM6Cj66Amh/CCDH5mbZ/MO55byWSUmBGmitkmWMUMTPhbSj8Y7MD2SQ7uJ83tcnfaDpfwxk4Q=="], + "starlight-sidebar-topics": ["starlight-sidebar-topics@0.6.0", "", { "dependencies": { "picomatch": "^4.0.2" }, "peerDependencies": { "@astrojs/starlight": ">=0.32.0" } }, "sha512-ysmOR7zaHYKtk18/mpW4MbEMDioR/ZBsisu9bdQrq0v9BlHWpW7gAdWlqFWO9zdv1P7l0Mo1WKd0wJ0UtqOVEQ=="], "starlight-theme-rapide": ["starlight-theme-rapide@0.5.1", "", { "peerDependencies": { "@astrojs/starlight": ">=0.34.0" } }, "sha512-QRF6mzcYHLEX5UpUvOPXVVwISS298siIJLcKextoMLhXcnF12nX+IYJ0LNxFk9XaPbX9uDXIieSBJf5Pztkteg=="], @@ -812,6 +866,8 @@ "tiny-inflate": ["tiny-inflate@1.0.3", "", {}, "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw=="], + "tiny-invariant": ["tiny-invariant@1.3.3", "", {}, "sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg=="], + "tinyexec": ["tinyexec@0.3.2", "", {}, "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA=="], "tinyglobby": ["tinyglobby@0.2.14", "", { "dependencies": { "fdir": "^6.4.4", "picomatch": "^4.0.2" } }, "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ=="], @@ -866,6 +922,8 @@ "unstorage": ["unstorage@1.16.1", "", { "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", "destr": "^2.0.5", "h3": "^1.15.3", "lru-cache": "^10.4.3", "node-fetch-native": "^1.6.6", "ofetch": "^1.4.1", "ufo": "^1.6.1" }, "peerDependencies": { "@azure/app-configuration": "^1.8.0", "@azure/cosmos": "^4.2.0", "@azure/data-tables": "^13.3.0", "@azure/identity": "^4.6.0", "@azure/keyvault-secrets": "^4.9.0", "@azure/storage-blob": "^12.26.0", "@capacitor/preferences": "^6.0.3 || ^7.0.0", "@deno/kv": ">=0.9.0", "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", "@planetscale/database": "^1.19.0", "@upstash/redis": "^1.34.3", "@vercel/blob": ">=0.27.1", "@vercel/kv": "^1.0.1", "aws4fetch": "^1.0.20", "db0": ">=0.2.1", "idb-keyval": "^6.2.1", "ioredis": "^5.4.2", "uploadthing": "^7.4.4" }, "optionalPeers": ["@azure/app-configuration", "@azure/cosmos", "@azure/data-tables", "@azure/identity", "@azure/keyvault-secrets", "@azure/storage-blob", "@capacitor/preferences", "@deno/kv", "@netlify/blobs", "@planetscale/database", "@upstash/redis", "@vercel/blob", "@vercel/kv", "aws4fetch", "db0", "idb-keyval", "ioredis", "uploadthing"] }, "sha512-gdpZ3guLDhz+zWIlYP1UwQ259tG5T5vYRzDaHMkQ1bBY1SQPutvZnrRjTFaWUUpseErJIgAZS51h6NOcZVZiqQ=="], + "url-template": ["url-template@3.1.1", "", {}, "sha512-4oszoaEKE/mQOtAmdMWqIRHmkxWkUZMnXFnjQ5i01CuRSK3uluxcH1MRVVVWmhlnzT1SCDfKxxficm2G37qzCA=="], + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], @@ -922,6 +980,8 @@ "prompts/kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + "recast/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "ansi-align/string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], "ansi-align/string-width/strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], diff --git a/website/package.json b/website/package.json index 4b936cd56..e932b0ecd 100644 --- a/website/package.json +++ b/website/package.json @@ -11,10 +11,12 @@ }, "dependencies": { "@astrojs/starlight": "^0.35.1", + "@lorenzo_lewis/starlight-utils": "^0.3.2", "astro": "^5.6.1", "gsap": "^3.13.0", "phosphor-astro": "^2.1.0", "sharp": "^0.34.2", + "starlight-openapi": "^0.19.1", "starlight-sidebar-topics": "^0.6.0", "starlight-theme-rapide": "^0.5.1", "starlight-videos": "^0.3.0" diff --git a/website/public/openapi/openapi.json b/website/public/openapi/openapi.json new file mode 100644 index 000000000..75a60d208 --- /dev/null +++ b/website/public/openapi/openapi.json @@ -0,0 +1,1459 @@ +{ + "openapi": "3.1.0", + "info": { "title": "πJan API", "version": "0.3.14" }, + "paths": { + "/v1/completions": { + "post": { + "tags": ["OpenAI V1"], + "summary": "Completion", + "operationId": "create_completion_v1_completions_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateCompletionRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { "$ref": "#/components/schemas/CreateCompletionResponse" }, + { "type": "string" }, + { "$ref": "#/components/schemas/CreateCompletionResponse" } + ], + "title": "Completion response, when stream=False" + } + }, + "text/event-stream": { + "schema": { + "type": "string", + "title": "Server Side Streaming response, when stream=True. See SSE format: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format", + "example": "data: {... see CreateCompletionResponse ...} \\n\\n data: ... \\n\\n ... data: [DONE]" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/v1/embeddings": { + "post": { + "tags": ["OpenAI V1"], + "summary": "Embedding", + "operationId": "create_embedding_v1_embeddings_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEmbeddingRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { "application/json": { "schema": {} } } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/v1/chat/completions": { + "post": { + "tags": ["OpenAI V1"], + "summary": "Chat", + "operationId": "create_chat_completion_v1_chat_completions_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateChatCompletionRequest" + }, + "examples": { + "normal": { + "summary": "Chat Completion", + "value": { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "What is the capital of France?" + } + ] + } + }, + "json_mode": { + "summary": "JSON Mode", + "value": { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Who won the world series in 2020" + } + ], + "response_format": { "type": "json_object" } + } + }, + "tool_calling": { + "summary": "Tool Calling", + "value": { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Extract Jason is 30 years old." + } + ], + "tools": [ + { + "type": "function", + "function": { + "name": "User", + "description": "User record", + "parameters": { + "type": "object", + "properties": { + "name": { "type": "string" }, + "age": { "type": "number" } + }, + "required": ["name", "age"] + } + } + } + ], + "tool_choice": { + "type": "function", + "function": { "name": "User" } + } + } + }, + "logprobs": { + "summary": "Logprobs", + "value": { + "model": "gpt-3.5-turbo", + "messages": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "What is the capital of France?" + } + ], + "logprobs": true, + "top_logprobs": 10 + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + }, + { "type": "string" }, + { + "$ref": "#/components/schemas/CreateChatCompletionResponse" + } + ], + "title": "Completion response, when stream=False" + } + }, + "text/event-stream": { + "schema": { + "type": "string", + "title": "Server Side Streaming response, when stream=TrueSee SSE format: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format", + "example": "data: {... see CreateChatCompletionResponse ...} \\n\\n data: ... \\n\\n ... data: [DONE]" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/v1/models": { + "get": { + "tags": ["OpenAI V1"], + "summary": "Models", + "operationId": "get_models_v1_models_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/ModelList" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/extras/tokenize": { + "post": { + "tags": ["Extras"], + "summary": "Tokenize", + "operationId": "tokenize_extras_tokenize_post", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TokenizeInputRequest" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenizeInputResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/extras/tokenize/count": { + "post": { + "tags": ["Extras"], + "summary": "Tokenize Count", + "operationId": "count_query_tokens_extras_tokenize_count_post", + "requestBody": { + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/TokenizeInputRequest" } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TokenizeInputCountResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + }, + "/extras/detokenize": { + "post": { + "tags": ["Extras"], + "summary": "Detokenize", + "operationId": "detokenize_extras_detokenize_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DetokenizeInputRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DetokenizeInputResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/HTTPValidationError" } + } + } + } + }, + "security": [{ "HTTPBearer": [] }] + } + } + }, + "components": { + "schemas": { + "ChatCompletionFunction": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "description": { "type": "string", "title": "Description" }, + "parameters": { + "additionalProperties": { + "anyOf": [ + { "type": "integer" }, + { "type": "string" }, + { "type": "boolean" }, + { "items": {}, "type": "array" }, + { "additionalProperties": true, "type": "object" }, + { "type": "null" } + ] + }, + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": ["name", "parameters"], + "title": "ChatCompletionFunction" + }, + "ChatCompletionLogprobToken": { + "properties": { + "token": { "type": "string", "title": "Token" }, + "logprob": { "type": "number", "title": "Logprob" }, + "bytes": { + "anyOf": [ + { "items": { "type": "integer" }, "type": "array" }, + { "type": "null" } + ], + "title": "Bytes" + }, + "top_logprobs": { + "items": { + "$ref": "#/components/schemas/ChatCompletionTopLogprobToken" + }, + "type": "array", + "title": "Top Logprobs" + } + }, + "type": "object", + "required": ["token", "logprob", "bytes", "top_logprobs"], + "title": "ChatCompletionLogprobToken" + }, + "ChatCompletionLogprobs": { + "properties": { + "content": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ChatCompletionLogprobToken" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Content" + }, + "refusal": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ChatCompletionLogprobToken" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Refusal" + } + }, + "type": "object", + "required": ["content", "refusal"], + "title": "ChatCompletionLogprobs" + }, + "ChatCompletionMessageToolCall": { + "properties": { + "id": { "type": "string", "title": "Id" }, + "type": { "type": "string", "const": "function", "title": "Type" }, + "function": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCallFunction" + } + }, + "type": "object", + "required": ["id", "type", "function"], + "title": "ChatCompletionMessageToolCall" + }, + "ChatCompletionMessageToolCallFunction": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "arguments": { "type": "string", "title": "Arguments" } + }, + "type": "object", + "required": ["name", "arguments"], + "title": "ChatCompletionMessageToolCallFunction" + }, + "ChatCompletionNamedToolChoice": { + "properties": { + "type": { "type": "string", "const": "function", "title": "Type" }, + "function": { + "$ref": "#/components/schemas/ChatCompletionNamedToolChoiceFunction" + } + }, + "type": "object", + "required": ["type", "function"], + "title": "ChatCompletionNamedToolChoice" + }, + "ChatCompletionNamedToolChoiceFunction": { + "properties": { "name": { "type": "string", "title": "Name" } }, + "type": "object", + "required": ["name"], + "title": "ChatCompletionNamedToolChoiceFunction" + }, + "ChatCompletionRequestAssistantMessage": { + "properties": { + "role": { "type": "string", "const": "assistant", "title": "Role" }, + "content": { "type": "string", "title": "Content" }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCall" + }, + "type": "array", + "title": "Tool Calls" + }, + "function_call": { + "$ref": "#/components/schemas/ChatCompletionRequestAssistantMessageFunctionCall" + } + }, + "type": "object", + "required": ["role"], + "title": "ChatCompletionRequestAssistantMessage" + }, + "ChatCompletionRequestAssistantMessageFunctionCall": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "arguments": { "type": "string", "title": "Arguments" } + }, + "type": "object", + "required": ["name", "arguments"], + "title": "ChatCompletionRequestAssistantMessageFunctionCall" + }, + "ChatCompletionRequestFunctionCallOption": { + "properties": { "name": { "type": "string", "title": "Name" } }, + "type": "object", + "required": ["name"], + "title": "ChatCompletionRequestFunctionCallOption" + }, + "ChatCompletionRequestFunctionMessage": { + "properties": { + "role": { "type": "string", "const": "function", "title": "Role" }, + "content": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Content" + }, + "name": { "type": "string", "title": "Name" } + }, + "type": "object", + "required": ["role", "content", "name"], + "title": "ChatCompletionRequestFunctionMessage" + }, + "ChatCompletionRequestMessageContentPartImage": { + "properties": { + "type": { "type": "string", "const": "image_url", "title": "Type" }, + "image_url": { + "anyOf": [ + { "type": "string" }, + { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPartImageImageUrl" + } + ], + "title": "Image Url" + } + }, + "type": "object", + "required": ["type", "image_url"], + "title": "ChatCompletionRequestMessageContentPartImage" + }, + "ChatCompletionRequestMessageContentPartImageImageUrl": { + "properties": { + "url": { "type": "string", "title": "Url" }, + "detail": { + "type": "string", + "enum": ["auto", "low", "high"], + "title": "Detail" + } + }, + "type": "object", + "required": ["url"], + "title": "ChatCompletionRequestMessageContentPartImageImageUrl" + }, + "ChatCompletionRequestMessageContentPartText": { + "properties": { + "type": { "type": "string", "const": "text", "title": "Type" }, + "text": { "type": "string", "title": "Text" } + }, + "type": "object", + "required": ["type", "text"], + "title": "ChatCompletionRequestMessageContentPartText" + }, + "ChatCompletionRequestResponseFormat": { + "properties": { + "type": { + "type": "string", + "enum": ["text", "json_object"], + "title": "Type" + }, + "schema": { + "anyOf": [ + { "type": "integer" }, + { "type": "string" }, + { "type": "boolean" }, + { "items": {}, "type": "array" }, + { "additionalProperties": true, "type": "object" }, + { "type": "null" } + ], + "title": "Schema" + } + }, + "type": "object", + "required": ["type"], + "title": "ChatCompletionRequestResponseFormat" + }, + "ChatCompletionRequestSystemMessage": { + "properties": { + "role": { "type": "string", "const": "system", "title": "Role" }, + "content": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Content" + } + }, + "type": "object", + "required": ["role", "content"], + "title": "ChatCompletionRequestSystemMessage" + }, + "ChatCompletionRequestToolMessage": { + "properties": { + "role": { "type": "string", "const": "tool", "title": "Role" }, + "content": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Content" + }, + "tool_call_id": { "type": "string", "title": "Tool Call Id" } + }, + "type": "object", + "required": ["role", "content", "tool_call_id"], + "title": "ChatCompletionRequestToolMessage" + }, + "ChatCompletionRequestUserMessage": { + "properties": { + "role": { "type": "string", "const": "user", "title": "Role" }, + "content": { + "anyOf": [ + { "type": "string" }, + { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPartText" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestMessageContentPartImage" + } + ] + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Content" + } + }, + "type": "object", + "required": ["role", "content"], + "title": "ChatCompletionRequestUserMessage" + }, + "ChatCompletionResponseChoice": { + "properties": { + "index": { "type": "integer", "title": "Index" }, + "message": { + "$ref": "#/components/schemas/ChatCompletionResponseMessage" + }, + "logprobs": { + "anyOf": [ + { "$ref": "#/components/schemas/ChatCompletionLogprobs" }, + { "type": "null" } + ] + }, + "finish_reason": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Finish Reason" + } + }, + "type": "object", + "required": ["index", "message", "logprobs", "finish_reason"], + "title": "ChatCompletionResponseChoice" + }, + "ChatCompletionResponseFunctionCall": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "arguments": { "type": "string", "title": "Arguments" } + }, + "type": "object", + "required": ["name", "arguments"], + "title": "ChatCompletionResponseFunctionCall" + }, + "ChatCompletionResponseMessage": { + "properties": { + "content": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Content" + }, + "tool_calls": { + "items": { + "$ref": "#/components/schemas/ChatCompletionMessageToolCall" + }, + "type": "array", + "title": "Tool Calls" + }, + "role": { + "type": "string", + "enum": ["assistant", "function"], + "title": "Role" + }, + "function_call": { + "$ref": "#/components/schemas/ChatCompletionResponseFunctionCall" + } + }, + "type": "object", + "required": ["content", "role"], + "title": "ChatCompletionResponseMessage" + }, + "ChatCompletionTool": { + "properties": { + "type": { "type": "string", "const": "function", "title": "Type" }, + "function": { + "$ref": "#/components/schemas/ChatCompletionToolFunction" + } + }, + "type": "object", + "required": ["type", "function"], + "title": "ChatCompletionTool" + }, + "ChatCompletionToolFunction": { + "properties": { + "name": { "type": "string", "title": "Name" }, + "description": { "type": "string", "title": "Description" }, + "parameters": { + "additionalProperties": { + "anyOf": [ + { "type": "integer" }, + { "type": "string" }, + { "type": "boolean" }, + { "items": {}, "type": "array" }, + { "additionalProperties": true, "type": "object" }, + { "type": "null" } + ] + }, + "type": "object", + "title": "Parameters" + } + }, + "type": "object", + "required": ["name", "parameters"], + "title": "ChatCompletionToolFunction" + }, + "ChatCompletionTopLogprobToken": { + "properties": { + "token": { "type": "string", "title": "Token" }, + "logprob": { "type": "number", "title": "Logprob" }, + "bytes": { + "anyOf": [ + { "items": { "type": "integer" }, "type": "array" }, + { "type": "null" } + ], + "title": "Bytes" + } + }, + "type": "object", + "required": ["token", "logprob", "bytes"], + "title": "ChatCompletionTopLogprobToken" + }, + "CompletionChoice": { + "properties": { + "text": { "type": "string", "title": "Text" }, + "index": { "type": "integer", "title": "Index" }, + "logprobs": { + "anyOf": [ + { "$ref": "#/components/schemas/CompletionLogprobs" }, + { "type": "null" } + ] + }, + "finish_reason": { + "anyOf": [ + { "type": "string", "enum": ["stop", "length"] }, + { "type": "null" } + ], + "title": "Finish Reason" + } + }, + "type": "object", + "required": ["text", "index", "logprobs", "finish_reason"], + "title": "CompletionChoice" + }, + "CompletionLogprobs": { + "properties": { + "text_offset": { + "items": { "type": "integer" }, + "type": "array", + "title": "Text Offset" + }, + "token_logprobs": { + "items": { "anyOf": [{ "type": "number" }, { "type": "null" }] }, + "type": "array", + "title": "Token Logprobs" + }, + "tokens": { + "items": { "type": "string" }, + "type": "array", + "title": "Tokens" + }, + "top_logprobs": { + "items": { + "anyOf": [ + { + "additionalProperties": { "type": "number" }, + "type": "object" + }, + { "type": "null" } + ] + }, + "type": "array", + "title": "Top Logprobs" + } + }, + "type": "object", + "required": ["text_offset", "token_logprobs", "tokens", "top_logprobs"], + "title": "CompletionLogprobs" + }, + "CompletionUsage": { + "properties": { + "prompt_tokens": { "type": "integer", "title": "Prompt Tokens" }, + "completion_tokens": { + "type": "integer", + "title": "Completion Tokens" + }, + "total_tokens": { "type": "integer", "title": "Total Tokens" } + }, + "type": "object", + "required": ["prompt_tokens", "completion_tokens", "total_tokens"], + "title": "CompletionUsage" + }, + "CreateChatCompletionRequest": { + "properties": { + "messages": { + "items": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestSystemMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestUserMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestAssistantMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestToolMessage" + }, + { + "$ref": "#/components/schemas/ChatCompletionRequestFunctionMessage" + } + ] + }, + "type": "array", + "title": "Messages", + "description": "A list of messages to generate completions for.", + "default": [] + }, + "functions": { + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/ChatCompletionFunction" + }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Functions", + "description": "A list of functions to apply to the generated completions." + }, + "function_call": { + "anyOf": [ + { "type": "string", "enum": ["none", "auto"] }, + { + "$ref": "#/components/schemas/ChatCompletionRequestFunctionCallOption" + }, + { "type": "null" } + ], + "title": "Function Call", + "description": "A function to apply to the generated completions." + }, + "tools": { + "anyOf": [ + { + "items": { "$ref": "#/components/schemas/ChatCompletionTool" }, + "type": "array" + }, + { "type": "null" } + ], + "title": "Tools", + "description": "A list of tools to apply to the generated completions." + }, + "tool_choice": { + "anyOf": [ + { "type": "string", "enum": ["none", "auto", "required"] }, + { "$ref": "#/components/schemas/ChatCompletionNamedToolChoice" }, + { "type": "null" } + ], + "title": "Tool Choice", + "description": "A tool to apply to the generated completions." + }, + "max_tokens": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Max Tokens", + "description": "The maximum number of tokens to generate. Defaults to inf" + }, + "min_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Min Tokens", + "description": "The minimum number of tokens to generate. It may return fewer tokens if another condition is met (e.g. max_tokens, stop).", + "default": 0 + }, + "logprobs": { + "anyOf": [{ "type": "boolean" }, { "type": "null" }], + "title": "Logprobs", + "description": "Whether to output the logprobs or not. Default is True", + "default": false + }, + "top_logprobs": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Top Logprobs", + "description": "The number of logprobs to generate. If None, no logprobs are generated. logprobs need to set to True." + }, + "temperature": { + "type": "number", + "title": "Temperature", + "description": "Adjust the randomness of the generated text.\n\nTemperature is a hyperparameter that controls the randomness of the generated text. It affects the probability distribution of the model's output tokens. A higher temperature (e.g., 1.5) makes the output more random and creative, while a lower temperature (e.g., 0.5) makes the output more focused, deterministic, and conservative. The default value is 0.8, which provides a balance between randomness and determinism. At the extreme, a temperature of 0 will always pick the most likely next token, leading to identical outputs in each run.", + "default": 0.8 + }, + "top_p": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Top P", + "description": "Limit the next token selection to a subset of tokens with a cumulative probability above a threshold P.\n\nTop-p sampling, also known as nucleus sampling, is another text generation method that selects the next token from a subset of tokens that together have a cumulative probability of at least p. This method provides a balance between diversity and quality by considering both the probabilities of tokens and the number of tokens to sample from. A higher value for top_p (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text.", + "default": 0.95 + }, + "min_p": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Min P", + "description": "Sets a minimum base probability threshold for token selection.\n\nThe Min-P sampling method was designed as an alternative to Top-P, and aims to ensure a balance of quality and variety. The parameter min_p represents the minimum probability for a token to be considered, relative to the probability of the most likely token. For example, with min_p=0.05 and the most likely token having a probability of 0.9, logits with a value less than 0.045 are filtered out.", + "default": 0.05 + }, + "stop": { + "anyOf": [ + { "type": "string" }, + { "items": { "type": "string" }, "type": "array" }, + { "type": "null" } + ], + "title": "Stop", + "description": "A list of tokens at which to stop generation. If None, no stop tokens are used." + }, + "stream": { + "type": "boolean", + "title": "Stream", + "description": "Whether to stream the results as they are generated. Useful for chatbots.", + "default": false + }, + "presence_penalty": { + "anyOf": [ + { "type": "number", "maximum": 2.0, "minimum": -2.0 }, + { "type": "null" } + ], + "title": "Presence Penalty", + "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "default": 0.0 + }, + "frequency_penalty": { + "anyOf": [ + { "type": "number", "maximum": 2.0, "minimum": -2.0 }, + { "type": "null" } + ], + "title": "Frequency Penalty", + "description": "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "default": 0.0 + }, + "logit_bias": { + "anyOf": [ + { + "additionalProperties": { "type": "number" }, + "type": "object" + }, + { "type": "null" } + ], + "title": "Logit Bias" + }, + "seed": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Seed" + }, + "response_format": { + "anyOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestResponseFormat" + }, + { "type": "null" } + ] + }, + "model": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Model", + "description": "The model to use for generating completions." + }, + "n": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "N", + "default": 1 + }, + "user": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "User" + }, + "top_k": { + "type": "integer", + "minimum": 0.0, + "title": "Top K", + "description": "Limit the next token selection to the K most probable tokens.\n\nTop-k sampling is a text generation method that selects the next token only from the top k most likely tokens predicted by the model. It helps reduce the risk of generating low-probability or nonsensical tokens, but it may also limit the diversity of the output. A higher value for top_k (e.g., 100) will consider more tokens and lead to more diverse text, while a lower value (e.g., 10) will focus on the most probable tokens and generate more conservative text.", + "default": 40 + }, + "repeat_penalty": { + "type": "number", + "minimum": 0.0, + "title": "Repeat Penalty", + "description": "A penalty applied to each token that is already generated. This helps prevent the model from repeating itself.\n\nRepeat penalty is a hyperparameter used to penalize the repetition of token sequences during text generation. It helps prevent the model from generating repetitive or monotonous text. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient.", + "default": 1.1 + }, + "logit_bias_type": { + "anyOf": [ + { "type": "string", "enum": ["input_ids", "tokens"] }, + { "type": "null" } + ], + "title": "Logit Bias Type" + }, + "mirostat_mode": { + "type": "integer", + "maximum": 2.0, + "minimum": 0.0, + "title": "Mirostat Mode", + "description": "Enable Mirostat constant-perplexity algorithm of the specified version (1 or 2; 0 = disabled)", + "default": 0 + }, + "mirostat_tau": { + "type": "number", + "maximum": 10.0, + "minimum": 0.0, + "title": "Mirostat Tau", + "description": "Mirostat target entropy, i.e. the target perplexity - lower values produce focused and coherent text, larger values produce more diverse and less coherent text", + "default": 5.0 + }, + "mirostat_eta": { + "type": "number", + "maximum": 1.0, + "minimum": 0.001, + "title": "Mirostat Eta", + "description": "Mirostat learning rate", + "default": 0.1 + }, + "grammar": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Grammar" + } + }, + "type": "object", + "title": "CreateChatCompletionRequest", + "examples": [ + { + "messages": [ + { "content": "You are a helpful assistant.", "role": "system" }, + { "content": "What is the capital of France?", "role": "user" } + ] + } + ] + }, + "CreateChatCompletionResponse": { + "properties": { + "id": { "type": "string", "title": "Id" }, + "object": { + "type": "string", + "const": "chat.completion", + "title": "Object" + }, + "created": { "type": "integer", "title": "Created" }, + "model": { "type": "string", "title": "Model" }, + "choices": { + "items": { + "$ref": "#/components/schemas/ChatCompletionResponseChoice" + }, + "type": "array", + "title": "Choices" + }, + "usage": { "$ref": "#/components/schemas/CompletionUsage" } + }, + "type": "object", + "required": ["id", "object", "created", "model", "choices", "usage"], + "title": "CreateChatCompletionResponse" + }, + "CreateCompletionRequest": { + "properties": { + "prompt": { + "anyOf": [ + { "type": "string" }, + { "items": { "type": "string" }, "type": "array" } + ], + "title": "Prompt", + "description": "The prompt to generate completions for.", + "default": "" + }, + "suffix": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Suffix", + "description": "A suffix to append to the generated text. If None, no suffix is appended. Useful for chatbots." + }, + "max_tokens": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Max Tokens", + "description": "The maximum number of tokens to generate.", + "default": 16 + }, + "min_tokens": { + "type": "integer", + "minimum": 0.0, + "title": "Min Tokens", + "description": "The minimum number of tokens to generate. It may return fewer tokens if another condition is met (e.g. max_tokens, stop).", + "default": 0 + }, + "temperature": { + "type": "number", + "title": "Temperature", + "description": "Adjust the randomness of the generated text.\n\nTemperature is a hyperparameter that controls the randomness of the generated text. It affects the probability distribution of the model's output tokens. A higher temperature (e.g., 1.5) makes the output more random and creative, while a lower temperature (e.g., 0.5) makes the output more focused, deterministic, and conservative. The default value is 0.8, which provides a balance between randomness and determinism. At the extreme, a temperature of 0 will always pick the most likely next token, leading to identical outputs in each run.", + "default": 0.8 + }, + "top_p": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Top P", + "description": "Limit the next token selection to a subset of tokens with a cumulative probability above a threshold P.\n\nTop-p sampling, also known as nucleus sampling, is another text generation method that selects the next token from a subset of tokens that together have a cumulative probability of at least p. This method provides a balance between diversity and quality by considering both the probabilities of tokens and the number of tokens to sample from. A higher value for top_p (e.g., 0.95) will lead to more diverse text, while a lower value (e.g., 0.5) will generate more focused and conservative text.", + "default": 0.95 + }, + "min_p": { + "type": "number", + "maximum": 1.0, + "minimum": 0.0, + "title": "Min P", + "description": "Sets a minimum base probability threshold for token selection.\n\nThe Min-P sampling method was designed as an alternative to Top-P, and aims to ensure a balance of quality and variety. The parameter min_p represents the minimum probability for a token to be considered, relative to the probability of the most likely token. For example, with min_p=0.05 and the most likely token having a probability of 0.9, logits with a value less than 0.045 are filtered out.", + "default": 0.05 + }, + "echo": { + "type": "boolean", + "title": "Echo", + "description": "Whether to echo the prompt in the generated text. Useful for chatbots.", + "default": false + }, + "stop": { + "anyOf": [ + { "type": "string" }, + { "items": { "type": "string" }, "type": "array" }, + { "type": "null" } + ], + "title": "Stop", + "description": "A list of tokens at which to stop generation. If None, no stop tokens are used." + }, + "stream": { + "type": "boolean", + "title": "Stream", + "description": "Whether to stream the results as they are generated. Useful for chatbots.", + "default": false + }, + "logprobs": { + "anyOf": [ + { "type": "integer", "minimum": 0.0 }, + { "type": "null" } + ], + "title": "Logprobs", + "description": "The number of logprobs to generate. If None, no logprobs are generated." + }, + "presence_penalty": { + "anyOf": [ + { "type": "number", "maximum": 2.0, "minimum": -2.0 }, + { "type": "null" } + ], + "title": "Presence Penalty", + "description": "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.", + "default": 0.0 + }, + "frequency_penalty": { + "anyOf": [ + { "type": "number", "maximum": 2.0, "minimum": -2.0 }, + { "type": "null" } + ], + "title": "Frequency Penalty", + "description": "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.", + "default": 0.0 + }, + "logit_bias": { + "anyOf": [ + { + "additionalProperties": { "type": "number" }, + "type": "object" + }, + { "type": "null" } + ], + "title": "Logit Bias" + }, + "seed": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Seed" + }, + "model": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Model", + "description": "The model to use for generating completions." + }, + "n": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "N", + "default": 1 + }, + "best_of": { + "anyOf": [{ "type": "integer" }, { "type": "null" }], + "title": "Best Of", + "default": 1 + }, + "user": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "User" + }, + "top_k": { + "type": "integer", + "minimum": 0.0, + "title": "Top K", + "description": "Limit the next token selection to the K most probable tokens.\n\nTop-k sampling is a text generation method that selects the next token only from the top k most likely tokens predicted by the model. It helps reduce the risk of generating low-probability or nonsensical tokens, but it may also limit the diversity of the output. A higher value for top_k (e.g., 100) will consider more tokens and lead to more diverse text, while a lower value (e.g., 10) will focus on the most probable tokens and generate more conservative text.", + "default": 40 + }, + "repeat_penalty": { + "type": "number", + "minimum": 0.0, + "title": "Repeat Penalty", + "description": "A penalty applied to each token that is already generated. This helps prevent the model from repeating itself.\n\nRepeat penalty is a hyperparameter used to penalize the repetition of token sequences during text generation. It helps prevent the model from generating repetitive or monotonous text. A higher value (e.g., 1.5) will penalize repetitions more strongly, while a lower value (e.g., 0.9) will be more lenient.", + "default": 1.1 + }, + "logit_bias_type": { + "anyOf": [ + { "type": "string", "enum": ["input_ids", "tokens"] }, + { "type": "null" } + ], + "title": "Logit Bias Type" + }, + "mirostat_mode": { + "type": "integer", + "maximum": 2.0, + "minimum": 0.0, + "title": "Mirostat Mode", + "description": "Enable Mirostat constant-perplexity algorithm of the specified version (1 or 2; 0 = disabled)", + "default": 0 + }, + "mirostat_tau": { + "type": "number", + "maximum": 10.0, + "minimum": 0.0, + "title": "Mirostat Tau", + "description": "Mirostat target entropy, i.e. the target perplexity - lower values produce focused and coherent text, larger values produce more diverse and less coherent text", + "default": 5.0 + }, + "mirostat_eta": { + "type": "number", + "maximum": 1.0, + "minimum": 0.001, + "title": "Mirostat Eta", + "description": "Mirostat learning rate", + "default": 0.1 + }, + "grammar": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Grammar" + } + }, + "type": "object", + "title": "CreateCompletionRequest", + "examples": [ + { + "prompt": "\n\n### Instructions:\nWhat is the capital of France?\n\n### Response:\n", + "stop": ["\n", "###"] + } + ] + }, + "CreateCompletionResponse": { + "properties": { + "id": { "type": "string", "title": "Id" }, + "object": { + "type": "string", + "const": "text_completion", + "title": "Object" + }, + "created": { "type": "integer", "title": "Created" }, + "model": { "type": "string", "title": "Model" }, + "choices": { + "items": { "$ref": "#/components/schemas/CompletionChoice" }, + "type": "array", + "title": "Choices" + }, + "usage": { "$ref": "#/components/schemas/CompletionUsage" } + }, + "type": "object", + "required": ["id", "object", "created", "model", "choices"], + "title": "CreateCompletionResponse" + }, + "CreateEmbeddingRequest": { + "properties": { + "model": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Model", + "description": "The model to use for generating completions." + }, + "input": { + "anyOf": [ + { "type": "string" }, + { "items": { "type": "string" }, "type": "array" } + ], + "title": "Input", + "description": "The input to embed." + }, + "user": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "User" + } + }, + "type": "object", + "required": ["input"], + "title": "CreateEmbeddingRequest", + "examples": [{ "input": "The food was delicious and the waiter..." }] + }, + "DetokenizeInputRequest": { + "properties": { + "model": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Model", + "description": "The model to use for generating completions." + }, + "tokens": { + "items": { "type": "integer" }, + "type": "array", + "title": "Tokens", + "description": "A list of toekns to detokenize." + } + }, + "type": "object", + "required": ["tokens"], + "title": "DetokenizeInputRequest", + "example": [{ "tokens": [123, 321, 222] }] + }, + "DetokenizeInputResponse": { + "properties": { + "text": { + "type": "string", + "title": "Text", + "description": "The detokenized text." + } + }, + "type": "object", + "required": ["text"], + "title": "DetokenizeInputResponse", + "example": { "text": "How many tokens in this query?" } + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { "$ref": "#/components/schemas/ValidationError" }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "ModelData": { + "properties": { + "id": { "type": "string", "title": "Id" }, + "object": { "type": "string", "const": "model", "title": "Object" }, + "owned_by": { "type": "string", "title": "Owned By" }, + "permissions": { + "items": { "type": "string" }, + "type": "array", + "title": "Permissions" + } + }, + "type": "object", + "required": ["id", "object", "owned_by", "permissions"], + "title": "ModelData" + }, + "ModelList": { + "properties": { + "object": { "type": "string", "const": "list", "title": "Object" }, + "data": { + "items": { "$ref": "#/components/schemas/ModelData" }, + "type": "array", + "title": "Data" + } + }, + "type": "object", + "required": ["object", "data"], + "title": "ModelList" + }, + "TokenizeInputCountResponse": { + "properties": { + "count": { + "type": "integer", + "title": "Count", + "description": "The number of tokens in the input." + } + }, + "type": "object", + "required": ["count"], + "title": "TokenizeInputCountResponse", + "example": { "count": 5 } + }, + "TokenizeInputRequest": { + "properties": { + "model": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Model", + "description": "The model to use for generating completions." + }, + "input": { + "type": "string", + "title": "Input", + "description": "The input to tokenize." + } + }, + "type": "object", + "required": ["input"], + "title": "TokenizeInputRequest", + "examples": [{ "input": "How many tokens in this query?" }] + }, + "TokenizeInputResponse": { + "properties": { + "tokens": { + "items": { "type": "integer" }, + "type": "array", + "title": "Tokens", + "description": "A list of tokens." + } + }, + "type": "object", + "required": ["tokens"], + "title": "TokenizeInputResponse", + "example": { "tokens": [123, 321, 222] } + }, + "ValidationError": { + "properties": { + "loc": { + "items": { "anyOf": [{ "type": "string" }, { "type": "integer" }] }, + "type": "array", + "title": "Location" + }, + "msg": { "type": "string", "title": "Message" }, + "type": { "type": "string", "title": "Error Type" } + }, + "type": "object", + "required": ["loc", "msg", "type"], + "title": "ValidationError" + } + }, + "securitySchemes": { "HTTPBearer": { "type": "http", "scheme": "bearer" } } + } +} diff --git a/website/src/assets/jan_desktop.png b/website/src/assets/jan_desktop.png new file mode 100644 index 000000000..4d200df0a Binary files /dev/null and b/website/src/assets/jan_desktop.png differ diff --git a/website/src/assets/jan_everywhere.png b/website/src/assets/jan_everywhere.png new file mode 100644 index 000000000..ee47a84db Binary files /dev/null and b/website/src/assets/jan_everywhere.png differ diff --git a/website/src/assets/jan_sync.png b/website/src/assets/jan_sync.png new file mode 100644 index 000000000..95fddb9ca Binary files /dev/null and b/website/src/assets/jan_sync.png differ diff --git a/website/src/assets/jan_web.png b/website/src/assets/jan_web.png new file mode 100644 index 000000000..dc17ad08f Binary files /dev/null and b/website/src/assets/jan_web.png differ diff --git a/website/src/components/CustomNav.astro b/website/src/components/CustomNav.astro new file mode 100644 index 000000000..5461db307 --- /dev/null +++ b/website/src/components/CustomNav.astro @@ -0,0 +1,227 @@ +--- +// Custom navigation component to add Products and API Reference links +// This overrides the default Starlight Header component +import Search from '@astrojs/starlight/components/Search.astro'; +import ThemeSelect from '@astrojs/starlight/components/ThemeSelect.astro'; +--- + +