├── .editorconfig ├── .gitignore ├── .vitepress ├── components │ └── VideoPlayer.vue ├── config.ts └── theme │ ├── index.ts │ ├── style.css │ └── tailwind.css ├── LICENSE ├── README.md ├── anthropic.md ├── azure-openai.md ├── chat-external-documents.md ├── cloud-sync.md ├── credits.md ├── custom-model.md ├── gemini.md ├── getting-started.md ├── index.md ├── launcher.md ├── log-in.md ├── math-formula.md ├── ollama.md ├── openrouter.md ├── package.json ├── plugins ├── calculator.md ├── duckduckgo.md ├── google-search.md ├── overview.md └── request.md ├── pnpm-lock.yaml ├── postcss.config.cjs ├── pplx.md ├── prettier.config.cjs ├── privacy-policy.md ├── prompt-templates.md ├── refund-policy.md ├── shortcuts.md ├── tailwind.config.cjs ├── team.md ├── terms.md ├── text-to-speech.md ├── vercel.json └── web-access.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | charset = utf-8 11 | trim_trailing_whitespace = false 12 | insert_final_newline = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .vitepress/cache 4 | *.log 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /.vitepress/components/VideoPlayer.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 88 | -------------------------------------------------------------------------------- /.vitepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitepress" 2 | 3 | // https://vitepress.dev/reference/site-config 4 | export default defineConfig({ 5 | title: "ChatKit Docs", 6 | description: "Documentation for ChatKit", 7 | lastUpdated: true, 8 | themeConfig: { 9 | search: { 10 | provider: "local", 11 | }, 12 | // https://vitepress.dev/reference/default-theme-config 13 | nav: [ 14 | { text: "Home", link: "/" }, 15 | { text: "ChatKit", link: "https://chatkit.app" }, 16 | ], 17 | 18 | sidebar: [ 19 | { 20 | text: "Guide", 21 | items: [ 22 | { 23 | text: "Getting Started", 24 | link: "/getting-started", 25 | }, 26 | { 27 | text: "Chat over External Documents", 28 | link: "/chat-external-documents", 29 | }, 30 | { 31 | text: "Text to Speech", 32 | link: "/text-to-speech", 33 | }, 34 | { 35 | text: "Prompt Templates", 36 | link: "/prompt-templates", 37 | }, 38 | { text: "Launcher", link: "/launcher" }, 39 | { 40 | text: "Shortcuts", 41 | link: "/shortcuts", 42 | }, 43 | { 44 | text: "Credits", 45 | link: "/credits", 46 | }, 47 | { 48 | text: "Log In", 49 | link: "/log-in", 50 | }, 51 | { 52 | text: "Cloud Sync", 53 | link: "/cloud-sync", 54 | }, 55 | { text: "Team Plan", link: "/team" }, 56 | { text: "Web Access", link: "/web-access" }, 57 | { 58 | text: "Azure OpenAI", 59 | link: "/azure-openai", 60 | }, 61 | { 62 | text: "Google Gemini", 63 | link: "/gemini", 64 | }, 65 | { 66 | text: "Perplexity Models", 67 | link: "/pplx", 68 | }, 69 | { 70 | text: "OpenRouter Models", 71 | link: "/openrouter", 72 | }, 73 | { 74 | text: "Ollama Models", 75 | link: "/ollama", 76 | }, 77 | { 78 | text: "Custom Model", 79 | link: "/custom-model", 80 | }, 81 | { 82 | text: "Math Formula", 83 | link: "/math-formula", 84 | }, 85 | ], 86 | }, 87 | 88 | { 89 | text: "Company", 90 | items: [ 91 | { 92 | text: "Privacy policy", 93 | link: "/privacy-policy", 94 | }, 95 | { 96 | text: "Refund policy", 97 | link: "/refund-policy", 98 | }, 99 | { 100 | text: "Terms and Conditions", 101 | link: "/terms", 102 | }, 103 | ], 104 | }, 105 | ], 106 | 107 | socialLinks: [ 108 | { icon: "github", link: "https://github.com/egoist/chatkit-docs" }, 109 | ], 110 | 111 | editLink: { 112 | pattern: "https://github.com/egoist/chatkit-docs/blob/main/:path", 113 | }, 114 | }, 115 | }) 116 | -------------------------------------------------------------------------------- /.vitepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | // https://vitepress.dev/guide/custom-theme 2 | import { defineComponent, h, nextTick, onMounted, watch } from "vue" 3 | import { useRoute } from "vitepress" 4 | import Theme from "vitepress/theme" 5 | import mediumZoom from "medium-zoom" 6 | 7 | import VideoPlayer from "../components/VideoPlayer.vue" 8 | import "./tailwind.css" 9 | import "./style.css" 10 | 11 | const initZoom = () => { 12 | mediumZoom(".content img") 13 | } 14 | 15 | export default { 16 | ...Theme, 17 | 18 | Layout: defineComponent({ 19 | setup() { 20 | const route = useRoute() 21 | onMounted(() => { 22 | initZoom() 23 | }) 24 | 25 | watch( 26 | () => route.path, 27 | () => { 28 | nextTick(() => initZoom()) 29 | } 30 | ) 31 | 32 | return () => 33 | h(Theme.Layout, null, { 34 | // https://vitepress.dev/guide/extending-default-theme#layout-slots 35 | }) 36 | }, 37 | }), 38 | enhanceApp({ app, router, siteData }) { 39 | app.component("VideoPlayer", VideoPlayer) 40 | }, 41 | } 42 | -------------------------------------------------------------------------------- /.vitepress/theme/style.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Customize default theme styling by overriding CSS variables: 3 | * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css 4 | */ 5 | 6 | /** 7 | * Colors 8 | * -------------------------------------------------------------------------- */ 9 | 10 | :root { 11 | --vp-c-brand: #646cff; 12 | --vp-c-brand-light: #747bff; 13 | --vp-c-brand-lighter: #9499ff; 14 | --vp-c-brand-lightest: #bcc0ff; 15 | --vp-c-brand-dark: #535bf2; 16 | --vp-c-brand-darker: #454ce1; 17 | --vp-c-brand-dimm: rgba(100, 108, 255, 0.08); 18 | } 19 | 20 | /** 21 | * Component: Button 22 | * -------------------------------------------------------------------------- */ 23 | 24 | :root { 25 | --vp-button-brand-border: var(--vp-c-brand-light); 26 | --vp-button-brand-text: var(--vp-c-white); 27 | --vp-button-brand-bg: var(--vp-c-brand); 28 | --vp-button-brand-hover-border: var(--vp-c-brand-light); 29 | --vp-button-brand-hover-text: var(--vp-c-white); 30 | --vp-button-brand-hover-bg: var(--vp-c-brand-light); 31 | --vp-button-brand-active-border: var(--vp-c-brand-light); 32 | --vp-button-brand-active-text: var(--vp-c-white); 33 | --vp-button-brand-active-bg: var(--vp-button-brand-bg); 34 | } 35 | 36 | /** 37 | * Component: Home 38 | * -------------------------------------------------------------------------- */ 39 | 40 | :root { 41 | --vp-home-hero-name-color: transparent; 42 | --vp-home-hero-name-background: -webkit-linear-gradient( 43 | 120deg, 44 | #bd34fe 30%, 45 | #41d1ff 46 | ); 47 | 48 | --vp-home-hero-image-background-image: linear-gradient( 49 | -45deg, 50 | #bd34fe 50%, 51 | #47caff 50% 52 | ); 53 | --vp-home-hero-image-filter: blur(40px); 54 | } 55 | 56 | @media (min-width: 640px) { 57 | :root { 58 | --vp-home-hero-image-filter: blur(56px); 59 | } 60 | } 61 | 62 | @media (min-width: 960px) { 63 | :root { 64 | --vp-home-hero-image-filter: blur(72px); 65 | } 66 | } 67 | 68 | /** 69 | * Component: Custom Block 70 | * -------------------------------------------------------------------------- */ 71 | 72 | :root { 73 | --vp-custom-block-tip-border: var(--vp-c-brand); 74 | --vp-custom-block-tip-text: var(--vp-c-brand-darker); 75 | --vp-custom-block-tip-bg: var(--vp-c-brand-dimm); 76 | } 77 | 78 | .dark { 79 | --vp-custom-block-tip-border: var(--vp-c-brand); 80 | --vp-custom-block-tip-text: var(--vp-c-brand-lightest); 81 | --vp-custom-block-tip-bg: var(--vp-c-brand-dimm); 82 | } 83 | 84 | /** 85 | * Component: Algolia 86 | * -------------------------------------------------------------------------- */ 87 | 88 | .DocSearch { 89 | --docsearch-primary-color: var(--vp-c-brand) !important; 90 | } 91 | 92 | /** 93 | * VitePress: Custom fix 94 | * -------------------------------------------------------------------------- */ 95 | 96 | /* 97 | Use lighter colors for links in dark mode for a11y. 98 | Also specify some classes twice to have higher specificity 99 | over scoped class data attribute. 100 | */ 101 | .dark .vp-doc a, 102 | .dark .vp-doc a > code, 103 | .dark .VPNavBarMenuLink.VPNavBarMenuLink:hover, 104 | .dark .VPNavBarMenuLink.VPNavBarMenuLink.active, 105 | .dark .link.link:hover, 106 | .dark .link.link.active, 107 | .dark .edit-link-button.edit-link-button, 108 | .dark .pager-link .title { 109 | color: var(--vp-c-brand-lighter); 110 | } 111 | 112 | .dark .vp-doc a:hover, 113 | .dark .vp-doc a > code:hover { 114 | color: var(--vp-c-brand-lightest); 115 | opacity: 1; 116 | } 117 | 118 | /* Transition by color instead of opacity */ 119 | .dark .vp-doc .custom-block a { 120 | transition: color 0.25s; 121 | } 122 | 123 | -------------------------------------------------------------------------------- /.vitepress/theme/tailwind.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | kbd { 6 | @apply bg-zinc-100 rounded-lg border p-1 px-2 whitespace-nowrap text-xs text-zinc-600 border-zinc-300 dark:bg-zinc-800 dark:text-zinc-200 dark:border-zinc-600; 7 | } 8 | 9 | .medium-zoom-overlay { 10 | @apply z-[9998]; 11 | } 12 | 13 | .medium-zoom-image--opened { 14 | @apply z-[9999]; 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 ChatKit 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ChatKit Docs 2 | 3 | https://docs.chatkit.app 4 | 5 | ## MIT 6 | 7 | © [ChatKit](https://chatkit.app) 8 | -------------------------------------------------------------------------------- /anthropic.md: -------------------------------------------------------------------------------- 1 | # Anthropic 2 | 3 | [Claude by Anthropic](https://www.anthropic.com/claude) is available in ChatKit. 4 | 5 | By default we use a proxy of Anthropic's API because it doesn't allow cross-site access from browser (CORS). However if you worry about privacy (although we don't store your data), you can use your own API endpoint. 6 | -------------------------------------------------------------------------------- /azure-openai.md: -------------------------------------------------------------------------------- 1 | # Azure OpenAI 2 | 3 | We support a set of OpenAI models deployed on Microsoft Azure. They are available in the model list: 4 | 5 | ![azure openai models](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/PqTfGs.png) 6 | 7 | ## Deploy a model on Azure OpenAI 8 | 9 | We map each model to a deployment on Azure OpenAI by their deployment name: 10 | 11 | | model | deployment name | 12 | | ------------------- | --------------- | 13 | | Azure GPT-3.5 Turbo | gpt-35-turbo | 14 | | Azure GPT-4 Turbo | gpt-4-turbo | 15 | | Azure GPT-4 Vision | gpt-4-vision | 16 | 17 | For instance, if you want to use `Azure GPT-3.5 Turbo` on ChatKit, you need to create a deployment with the name `gpt-35-turbo` on Azure OpenAI: 18 | 19 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/7AvL1y.png) 20 | 21 | ## Setup 22 | 23 | To use Azure OpenAI, you need to configure your deployment endpoint and api key: 24 | 25 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/YdUFeO.png) 26 | 27 | You can obtain them from [Azure portal > Azure OpenAI](https://portal.azure.com/), the endpoint looks like `https://resource-name.openai.azure.com`: 28 | 29 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/79vLS6.png) 30 | -------------------------------------------------------------------------------- /chat-external-documents.md: -------------------------------------------------------------------------------- 1 | # Chat over External Documents 2 | 3 | ## Chat context 4 | 5 | ChatKit allows you to add URLs as chat context, it's useful for summarizing external documents or ask questions over them. 6 | 7 | 8 | 9 | Documents added in chat context will be retrieved using semantic search, meaning only the relevant parts of the document will be used in the conversation. 10 | 11 | ## Message attachments 12 | 13 | If you want to include the entire document in the conversation, you can upload it as a message attachment: 14 | 15 | ![attach](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/sKvv3k.png) 16 | 17 | ## Supported Document Type 18 | 19 | - Youtube videos (chat context only) 20 | - PDF 21 | - Office (.doc, .docx, .pptx, .xlsx) 22 | - CSV 23 | - JSON 24 | - Regular web page 25 | -------------------------------------------------------------------------------- /cloud-sync.md: -------------------------------------------------------------------------------- 1 | # Cloud Sync 2 | 3 | :::warning 4 | This feature is only available for licensed users. 5 | ::: 6 | 7 | For licensed users, the cloud sync feature allows you to sync your settings and chat history across multiple devices. 8 | 9 | To enable this you need to log in with your email in Account Settings: 10 | 11 | ![log in](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/1yIZOp.png) 12 | 13 | Then go to Cloud Sync and toggle the switch to enable it: 14 | 15 | ![cloud sync switch](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/PcqmFw.png) 16 | 17 | ## What's synced? 18 | 19 | Basically everything except your license key. This includes: 20 | 21 | - App settings (including your OpenAI API key (if any) etc.) 22 | - Chat history 23 | - Chat settings 24 | 25 | ## How your data is store? 26 | 27 | All data transmitted to and from ChatKit is encrypted using SSL to ensure secure communication. And data at rest is also encrypted to protect it from unauthorized access. The server and database is located in Hetzner.com US data center. 28 | 29 | You can request for data deletion (with or without deleting your account), we are also implementing this feature in the UI soon. 30 | 31 | The only personal data we collect is your email address, which is used to identify user for cloud sync. 32 | -------------------------------------------------------------------------------- /credits.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ChatKit [Premium](https://chatkit.app/#pricing) has the option to buy credits and use them instead of providing an OpenAI API Key. 4 | 5 | ## How to buy credits 6 | 7 | Open App Settings -> Account, click the "Buy Credits" button: 8 | 9 | ![Premium](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/HQ1KyI.png) 10 | 11 | ## How to use credits 12 | 13 | First, remove the OpenAI API key on ChatKit if you have set it before because this setting takes precedence over credits: 14 | 15 | ![openai api key setting](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/4t96rF.png) 16 | 17 | Alternately, you can force specific chats to use credits even if you have OpenAI API key in your settings: 18 | 19 | ![chat setting](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/b6gV1g.png) 20 | 21 | The chat interface has an indicator to show whether you're using credits or API key: 22 | 23 | ![indicator](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/MhA3x6.png) 24 | 25 | ## Pricing 26 | 27 | $5 in credits are priced at exactly $5 USD. Our pricing aligns with OpenAI's, with no addtional fees added, so please refer to [OpenAI Pricing](https://openai.com/pricing) for details on their API costs. 28 | 29 | ## Where are credits used? 30 | 31 | Any feature that is provided by OpenAI API can be used with credits. 32 | -------------------------------------------------------------------------------- /custom-model.md: -------------------------------------------------------------------------------- 1 | # Custom Model 2 | 3 | ChatKit supports custom models besides OpenAI models, as long as your custom model can be accessed from a URL that is compatible with [OpenAI's chat completion API](https://platform.openai.com/docs/api-reference/chat). 4 | 5 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/ALuz37.png) 6 | 7 | You can see a new form after clicking the "+ Custom model" button: 8 | 9 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/KXJIiM.png) 10 | 11 | - **Name**: Used to easily identify the model in the model list. 12 | - **Model**: Use as the `model` property in the request body. 13 | - **URL**: The API endpoint, we send POST request to this URL. 14 | - Proxy: send requests from our server instead of the browser, useful when the API doesn't support [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). 15 | - **Context limit**: Maxium context token limit. For example, Llama 2 has a context window of 4096 tokens. Your API provider usually shows this in the their documentation. 16 | - **API key**: The API key/token to authenticate your request. 17 | - **Headers**: Extra HTTP headers we send to the URL. 18 | - **Stream**: Whether your custom model API can stream AI responses. 19 | 20 | ## Notes 21 | 22 | When a custom model is selected, it's also used to generate sugguested questions and chat titles. 23 | -------------------------------------------------------------------------------- /gemini.md: -------------------------------------------------------------------------------- 1 | # Google Gemini 2 | 3 | Supported models: 4 | 5 | - gemini-pro 6 | - gemini-pro-vision 7 | - gemini-1.5-pro 8 | 9 | To use Gemini you need an API key from [Google AI Studio](https://makersuite.google.com/u/2/app/apikey). 10 | 11 | It's currently free and a Pay-as-you-go plan will be available soon, check out Google AI's [pricing page](https://ai.google.dev/pricing) for more. 12 | 13 | When you have your API key, you can set it in [Settings -> Models](https://chatkit.app/#settings/models). 14 | 15 | ## Gemini 1.5 Pro 16 | 17 | Gemini 1.5 Pro supports prompting with text, image, and audio data. It doesn't directly support video files but ChatKit will support it soon. 18 | -------------------------------------------------------------------------------- /getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Using API key or Credits 4 | 5 | There're two ways to use ChatKit: 6 | 7 | 1. Using Your own OpenAI API key 8 | 2. Using ChatKit Credits (requires ChatKit License) 9 | 10 | ## Using OpenAI API key 11 | 12 | ::: warning 13 | Using OpenAI API key does NOT require a ChatGPT Plus subscription, ChatGPT Plus subscription does NOT affect the OpenAI API key usage. 14 | 15 | Using OpenAI API key is NOT free, you will follow OpenAI's pricing model. OpenAI is pay as you go, so you only pay for the tokens you use, which is much cheaper than ChatGPT Plus. Here's the detail price for all the models: https://openai.com/pricing 16 | ::: 17 | 18 | 1. Go to [OpenAI](https://platform.openai.com/) and create an account 19 | 2. Upgrade to a paid plan on [OpenAI](https://platform.openai.com/account/billing/overview), because free accounts have usage limits and also rate limits. OpenAI is pay as you go, so you only pay for what you use. 20 | 3. Go to [OpenAI API](https://platform.openai.com/account/api-keys) and create a new API key. 21 | 4. Go to ChatKit and open App Settings (top-right corner) to paste the OpenAI API key (see the video below) 22 | 23 | 24 | 25 | ## Using ChatKit Credits 26 | 27 | 1. Go to [ChatKit](https://chatkit.app/#pricing) and purcahse a license. 28 | 2. After successful payment you will get an email with your license key. 29 | 3. Go to ChatKit and click the "Settings" button (top-right corner) to paste the ChatKit license key in the "Account" tab. 30 | 4. After that you can buy ChatKit Credits. 31 | 32 | :::warning 33 | If you have set an OpenAI API key on ChatKit, you need to remove it first before you can use ChatKit Credits. See more about [credits](./credits.md). 34 | ::: 35 | 36 | ## Activate your License 37 | 38 | You will receive your license key in the email upon successful payment, and you can use it to activate ChatKit: 39 | 40 | 41 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | # Learn how to use ChatKit 2 | 3 | ChatKit is easy-to-use, but as features grow, it can become difficult to keep track of them. This guide will document all the things you can do with ChatKit. 4 | -------------------------------------------------------------------------------- /launcher.md: -------------------------------------------------------------------------------- 1 | # Launcher 2 | 3 | ChatKit Launcher is a feature exclusively in the desktop version of ChatKit. It allows you to quickly run your saved prompts or custom prompts from anywhere on your computer. 4 | 5 | The launcher is based on Prompt Templates, so be sure to learn about [Prompt Templates](prompt-templates.md) first. 6 | 7 | ## How to use 8 | 9 | In the desktop version of Prompt Templates, you can bind a shortcut to them: 10 | 11 | ![](https://cdn.jsdelivr.net/gh/egoist-bot/images@main/uPic/knp1Hq.png) 12 | 13 | For example you can bind `CommandOrControl+Shift+/,` and when the shortcut is triggered, it will open a panel for quick access to prompts: 14 | 15 |