├── .dockerignore ├── .env.local ├── .eslintrc.json ├── .github └── workflows │ ├── exportAndPushToNode.yml │ └── nextjs.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── SECURITY.md ├── __tests__ └── utils │ └── app │ └── importExports.test.ts ├── components ├── Buttons │ └── SidebarActionButton │ │ ├── SidebarActionButton.tsx │ │ └── index.ts ├── Chat │ ├── Chat.tsx │ ├── ChatInput.tsx │ ├── ChatLoader.tsx │ ├── ChatMessage.tsx │ ├── ErrorMessageDiv.tsx │ ├── MemoizedChatMessage.tsx │ ├── ModelSelect.tsx │ ├── PluginSelect.tsx │ ├── PromptList.tsx │ ├── PromptsList.ts │ ├── Regenerate.tsx │ ├── SystemNodes.tsx │ ├── SystemPrompt.tsx │ ├── Temperature.tsx │ └── VariableModal.tsx ├── Chatbar │ ├── Chatbar.context.tsx │ ├── Chatbar.state.tsx │ ├── Chatbar.tsx │ └── components │ │ ├── ChatFolders.tsx │ │ ├── ChatbarSettings.tsx │ │ ├── ClearConversations.tsx │ │ ├── Conversation.tsx │ │ ├── Conversations.tsx │ │ └── PluginKeys.tsx ├── Folder │ ├── Folder.tsx │ └── index.ts ├── Loading │ └── index.tsx ├── Markdown │ ├── CodeBlock.tsx │ └── MemoizedReactMarkdown.tsx ├── Mobile │ └── Navbar.tsx ├── Search │ ├── Search.tsx │ └── index.ts ├── Settings │ ├── ApiTutarialDialog.tsx │ ├── Import.tsx │ ├── Key.tsx │ ├── NodeInfoDialog.tsx │ ├── QueryUrl.tsx │ └── SettingDialog.tsx ├── Sidebar │ ├── Sidebar.tsx │ ├── SidebarButton.tsx │ ├── components │ │ └── OpenCloseButton.tsx │ └── index.ts └── Spinner │ ├── Spinner.tsx │ └── index.ts ├── docker-compose.yml ├── hooks ├── useCreateReducer.ts ├── useFetch.ts └── useHost.ts ├── next-i18next.config.js ├── next.config.js ├── package-lock.json ├── package.json ├── pages ├── _app.js ├── _document.js ├── api │ ├── home │ │ ├── home.context.tsx │ │ ├── home.state.tsx │ │ ├── home.tsx │ │ └── index.ts │ └── models.ts └── index.tsx ├── postcss.config.js ├── prettier.config.js ├── public ├── GaiaNet-black.svg ├── GaiaNet-white.svg ├── GitHubPages.png ├── NextjsAction.png ├── dashboard │ └── index.html ├── favicon.ico ├── favicon.png ├── fonts │ ├── IBMPlexMono-Bold.ttf │ ├── IBMPlexMono-Regular.ttf │ ├── SourceCodePro-Bold.ttf │ ├── SourceCodePro-Regular.ttf │ ├── SpaceGrotesk-Bold.ttf │ ├── SpaceGrotesk-Regular.ttf │ ├── SpaceMono-Bold.ttf │ └── SpaceMono-Regular.ttf ├── gaianet-opacity.png ├── icons │ ├── APITutorial.png │ ├── api-tutorial.png │ ├── github-white.svg │ ├── github.svg │ ├── huggingface-white.svg │ ├── huggingface.svg │ ├── icon-bot.svg │ ├── icon-care-down.svg │ ├── icon-care-right.svg │ ├── icon-link.svg │ ├── icon-message.svg │ ├── icon-send.svg │ ├── icon-upload.svg │ ├── icon-user.svg │ ├── twitter-white.svg │ └── twitter.svg ├── llamaedge.svg ├── locales │ ├── ar │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── bn │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── ca │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ └── sidebar.json │ ├── de │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── en │ │ └── common.json │ ├── es │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── fi │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── fr │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── he │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── id │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── it │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── ja │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── ko │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── pl │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── pt │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── ro │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── ru │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── si │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── sv │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── te │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ ├── tr │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ └── sidebar.json │ ├── vi │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json │ └── zh │ │ ├── chat.json │ │ ├── common.json │ │ ├── markdown.json │ │ ├── promptbar.json │ │ ├── settings.json │ │ └── sidebar.json ├── logo-big.png ├── logo-opacity.png ├── screenshot.png └── screenshots │ └── screenshot-0402023.jpg ├── services ├── errorService.ts └── useApiService.ts ├── styles ├── MonaspaceNeon.ttf ├── Styrene A-Medium-Web.ttf ├── Styrene A-Regular-Web.ttf └── globals.css ├── tailwind.config.js ├── tsconfig.json ├── types ├── chat.ts ├── data.ts ├── env.ts ├── error.ts ├── export.ts ├── folder.ts ├── google.ts ├── index.ts ├── openai.ts ├── plugin.ts ├── prompt.ts ├── settings.ts └── storage.ts ├── utils ├── app │ ├── api.ts │ ├── clean.ts │ ├── codeblock.ts │ ├── const.ts │ ├── conversation.ts │ ├── folders.ts │ ├── importExport.ts │ ├── prompts.ts │ └── settings.ts ├── data │ └── throttle.ts └── server │ ├── google.ts │ └── index.ts ├── vitest.config.ts └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | .env 2 | .env.local 3 | node_modules 4 | test-results 5 | -------------------------------------------------------------------------------- /.env.local: -------------------------------------------------------------------------------- 1 | # Chatbot UI 2 | NEXT_PUBLIC_API_URL = ".." 3 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /.github/workflows/exportAndPushToNode.yml: -------------------------------------------------------------------------------- 1 | name: to node 2 | on: 3 | push: 4 | branches: [ "main" ] 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | actions: write 13 | checks: write 14 | contents: write 15 | deployments: write 16 | issues: write 17 | packages: write 18 | pull-requests: write 19 | repository-projects: write 20 | security-events: write 21 | statuses: write 22 | steps: 23 | - uses: actions/checkout@v4 24 | with: 25 | token: ${{ secrets.GH_TOKEN }} 26 | - name: Use Node.js 27 | uses: actions/setup-node@v4 28 | with: 29 | node-version: 16.x 30 | - name: Install Dependencies 31 | run: yarn 32 | 33 | - name: Build Project 34 | run: | 35 | yarn build 36 | yarn export 37 | 38 | - name: Rename and zip Export 39 | run: | 40 | mkdir -p dashboard 41 | mv out dashboard/chatbot-ui 42 | cd dashboard/chatbot-ui 43 | mv _next ../ 44 | mv fonts ../ 45 | cd ../../ 46 | mv public/dashboard/index.html dashboard 47 | tar czvf dashboard.tar.gz dashboard 48 | 49 | - name: Create Release 50 | id: create_release 51 | uses: actions/create-release@v1 52 | env: 53 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 54 | with: 55 | tag_name: ${{ github.ref }} 56 | release_name: Release ${{ github.ref }} 57 | 58 | - name: Upload Release Asset 59 | uses: actions/upload-release-asset@v1 60 | env: 61 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} 62 | with: 63 | upload_url: ${{ steps.create_release.outputs.upload_url }} 64 | asset_path: dashboard.tar.gz 65 | asset_name: dashboard.tar.gz 66 | asset_content_type: application/zip -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | /test-results 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | /dist 16 | 17 | # production 18 | /build 19 | 20 | # misc 21 | .DS_Store 22 | *.pem 23 | 24 | # debug 25 | npm-debug.log* 26 | yarn-debug.log* 27 | yarn-error.log* 28 | .pnpm-debug.log* 29 | 30 | # local env files 31 | .env*.local 32 | 33 | # vercel 34 | .vercel 35 | 36 | # typescript 37 | *.tsbuildinfo 38 | next-env.d.ts 39 | .idea 40 | pnpm-lock.yaml 41 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # 🛠️ Contributing to Chatbot UI 2 | 3 | Thank you for your interest in contributing to **Chatbot UI**! 4 | We’re excited to build this together with the community. 5 | 6 | Before getting started, please read through the guidelines below to ensure a smooth contribution process. 7 | 8 | --- 9 | 10 | ## What You Can Contribute 11 | 12 | We welcome all kinds of contributions, including: 13 | 14 | - 🐛 Bug fixes 15 | - ✨ New features or enhancements 16 | - ⚙️ Code refactoring or optimizations 17 | - 🌍 Translations for internationalization (i18n) 18 | - 🧪 Additional tests or test improvements 19 | 20 | --- 21 | 22 | ## 🚀 Getting Started 23 | 24 | 1. **Fork** the repository. 25 | 2. **Clone** your fork: 26 | 27 | ```bash 28 | git clone https://github.com/YOUR_USERNAME/chatbot-ui.git 29 | cd chatbot-ui 30 | ``` 31 | 32 | 3. **Create a new branch**: 33 | 34 | ```bash 35 | git checkout -b feature/my-feature-name 36 | ``` 37 | 38 | 4. **Install dependencies** and start the dev server: 39 | 40 | ```bash 41 | npm install 42 | npm run dev 43 | ``` 44 | 45 | 5. Make your changes. 46 | 47 | --- 48 | 49 | ## Before Submitting 50 | 51 | Make sure to: 52 | 53 | - Follow the project’s **code style** and structure. 54 | - Run any **tests or linters** (if available). 55 | - Keep your **commits focused** and descriptive. 56 | - **Pull in the latest changes** from `main` to avoid conflicts. 57 | 58 | --- 59 | 60 | ## Submitting a Pull Request 61 | 62 | 1. Push your changes to your fork: 63 | 64 | ```bash 65 | git push origin feature/my-feature-name 66 | ``` 67 | 68 | 2. Open a **Pull Request** against the `main` branch of the upstream repo. 69 | 70 | 3. Fill out the PR template, describing your changes clearly and linking to any relevant issues. 71 | 72 | --- 73 | 74 | ## Community & Help 75 | 76 | Need help or have a question? Join our [Telegram Builder Group](https://t.me/+a0bJInD5lsYxNDJl) to chat with other contributors. 77 | 78 | You can also reach out on the [Telegram builder group](https://t.me/+a0bJInD5lsYxNDJl) to connect with the community and ask questions. 79 | 80 | --- 81 | 82 | ## Code of Conduct 83 | 84 | Please review our [Code of Conduct](https://github.com/GaiaNet-AI/chatbot-ui/blob/main/.github/CODE_OF_CONDUCT.md) to ensure a welcoming and respectful environment for everyone. 85 | 86 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # ---- Base Node ---- 2 | FROM node:19-alpine AS base 3 | WORKDIR /app 4 | COPY package*.json ./ 5 | 6 | # ---- Dependencies ---- 7 | FROM base AS dependencies 8 | RUN npm ci 9 | 10 | # ---- Build ---- 11 | FROM dependencies AS build 12 | COPY . . 13 | RUN npm run build 14 | 15 | # ---- Production ---- 16 | FROM node:19-alpine AS production 17 | WORKDIR /app 18 | COPY --from=dependencies /app/node_modules ./node_modules 19 | COPY --from=build /app/.next ./.next 20 | COPY --from=build /app/public ./public 21 | COPY --from=build /app/package*.json ./ 22 | COPY --from=build /app/next.config.js ./next.config.js 23 | COPY --from=build /app/next-i18next.config.js ./next-i18next.config.js 24 | 25 | # Expose the port the app will run on 26 | EXPOSE 3000 27 | 28 | # Start the application 29 | CMD ["npm", "start"] 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Second State 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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | include .env 2 | 3 | .PHONY: all 4 | 5 | build: 6 | docker build -t chatbot-ui . 7 | 8 | run: 9 | export $(cat .env | xargs) 10 | docker stop chatbot-ui || true && docker rm chatbot-ui || true 11 | docker run --name chatbot-ui --rm -e OPENAI_API_KEY=${OPENAI_API_KEY} -p 3000:3000 chatbot-ui 12 | 13 | logs: 14 | docker logs -f chatbot-ui 15 | 16 | push: 17 | docker tag chatbot-ui:latest ${DOCKER_USER}/chatbot-ui:${DOCKER_TAG} 18 | docker push ${DOCKER_USER}/chatbot-ui:${DOCKER_TAG} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Chatbot UI 2 | 3 | **Chatbot UI** is a lightweight, customizable frontend for interacting with language models, built with **Next.js**. Every [Gaianet node](https://github.com/GaiaNet-AI/gaianet-node) ships with this UI preconfigured, but it’s also easy to use independently with any LLM API. 4 | 5 | --- 6 | 7 | ## Features 8 | 9 | - **Plug-in Any API:** Easily point the UI to your own model or hosted API via environment configuration. 10 | - **Next.js Framework:** Enjoy optimized routing, SSR, and built-in performance with Next.js. 11 | - **Prompt Customization:** Tweak system prompts and interaction flows to match your use case. 12 | - **i18n Support:** Built-in internationalization for multilingual experiences. 13 | 14 | --- 15 | 16 | ## Quick Start 17 | 18 | ### 1. Clone the Repo 19 | 20 | ```bash 21 | git clone https://github.com/GaiaNet-AI/chatbot-ui.git 22 | cd chatbot-ui 23 | ``` 24 | 25 | ### 2. Install Dependencies 26 | 27 | ```bash 28 | npm install 29 | # or 30 | yarn 31 | ``` 32 | 33 | ### 3. Configure Environment 34 | 35 | Create a `.env.local` file and add your API URL: 36 | 37 | ```bash 38 | NEXT_PUBLIC_API_URL= 39 | ``` 40 | 41 | ### 4. Start Development Server 42 | 43 | ```bash 44 | npm run dev 45 | # or 46 | yarn dev 47 | ``` 48 | 49 | Then open [http://localhost:3000](http://localhost:3000) in your browser. 50 | 51 | --- 52 | 53 | ## Deployment (GitHub Pages) 54 | 55 | ### Option 1: Manual Setup 56 | 57 | 1. **Fork the repo** on GitHub. 58 | 2. Go to **Settings > Pages** in your repo. 59 | 3. Choose **Deploy from a branch**. 60 | 4. Select the `main` or `gh-pages` branch and root directory. 61 | 5. GitHub will auto-build and deploy the site. 62 | 63 | ### Option 2: GitHub Actions (Recommended) 64 | 65 | - A deployment workflow is pre-configured in `.github/workflows/deploy.yml`. 66 | - Push your changes to trigger automated deployment to GitHub Pages. 67 | 68 | --- 69 | 70 | ## Contributing 71 | 72 | We welcome PRs and feature requests! 73 | 74 | - Read the [Contributing Guide](https://github.com/GaiaNet-AI/chatbot-ui/blob/main/CONTRIBUTING.md) 75 | - Follow our [Code of Conduct](https://github.com/GaiaNet-AI/chatbot-ui/blob/main/.github/CODE_OF_CONDUCT.md) 76 | 77 | Found a bug? Submit an issue on the [tracker](https://github.com/GaiaNet-AI/chatbot-ui/issues). 78 | 79 | --- 80 | 81 | ## Need Help? 82 | 83 | Join the [Telegram builder group](https://t.me/+a0bJInD5lsYxNDJl) to connect with the community and ask questions. 84 | 85 | --- 86 | 87 | ## 📄 License 88 | 89 | This project is licensed under the [MIT License](https://github.com/GaiaNet-AI/chatbot-ui/blob/main/LICENSE). 90 | -------------------------------------------------------------------------------- /components/Buttons/SidebarActionButton/SidebarActionButton.tsx: -------------------------------------------------------------------------------- 1 | import { MouseEventHandler, ReactElement } from 'react'; 2 | 3 | interface Props { 4 | handleClick: MouseEventHandler; 5 | children: ReactElement; 6 | } 7 | 8 | const SidebarActionButton = ({ handleClick, children }: Props) => ( 9 | 15 | ); 16 | 17 | export default SidebarActionButton; 18 | -------------------------------------------------------------------------------- /components/Buttons/SidebarActionButton/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './SidebarActionButton'; 2 | -------------------------------------------------------------------------------- /components/Chat/ChatLoader.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable @next/next/no-img-element */ 2 | import {FC} from 'react'; 3 | 4 | interface Props { 5 | } 6 | 7 | export const ChatLoader: FC = () => { 8 | return ( 9 |
13 |
14 |
15 |
16 | bot 21 |
22 | 23 |
24 |
25 |
26 | ); 27 | }; 28 | -------------------------------------------------------------------------------- /components/Chat/ErrorMessageDiv.tsx: -------------------------------------------------------------------------------- 1 | import { IconCircleX } from '@tabler/icons-react'; 2 | import { FC } from 'react'; 3 | 4 | import { ErrorMessage } from '@/types/error'; 5 | 6 | interface Props { 7 | error: ErrorMessage; 8 | } 9 | 10 | export const ErrorMessageDiv: FC = ({ error }) => { 11 | return ( 12 |
13 |
14 | 15 |
16 |
{error.title}
17 | {error.messageLines.map((line, index) => ( 18 |
19 | {' '} 20 | {line}{' '} 21 |
22 | ))} 23 |
24 | {error.code ? Code: {error.code} : ''} 25 |
26 |
27 | ); 28 | }; 29 | -------------------------------------------------------------------------------- /components/Chat/MemoizedChatMessage.tsx: -------------------------------------------------------------------------------- 1 | import { FC, memo } from "react"; 2 | import { ChatMessage, Props } from "./ChatMessage"; 3 | 4 | export const MemoizedChatMessage: FC = memo( 5 | ChatMessage, 6 | (prevProps, nextProps) => ( 7 | prevProps.message.content === nextProps.message.content 8 | ) 9 | ); 10 | -------------------------------------------------------------------------------- /components/Chat/ModelSelect.tsx: -------------------------------------------------------------------------------- 1 | import { IconExternalLink } from '@tabler/icons-react'; 2 | import { useContext } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import {OpenAIModel, OpenAIModels} from '@/types/openai'; 7 | 8 | import HomeContext from '@/pages/api/home/home.context'; 9 | import {promptsList} from "@/components/Chat/PromptsList"; 10 | 11 | export const ModelSelect = () => { 12 | const { t } = useTranslation('chat'); 13 | 14 | const { 15 | state: { selectedConversation, models, defaultModelId }, 16 | handleUpdateConversationAll, 17 | dispatch: homeDispatch, 18 | } = useContext(HomeContext); 19 | 20 | const handleChange = (e: React.ChangeEvent) => { 21 | if(selectedConversation && (defaultModelId || e.target.value)){ 22 | const thisModel = models.find( 23 | (model) => model.id === e.target.value, 24 | ) as OpenAIModel 25 | handleUpdateConversationAll(selectedConversation, [{ 26 | key: 'model', 27 | value: thisModel, 28 | }, { 29 | key: 'prompt', 30 | value: promptsList.find(prompt=> 31 | prompt.id?.toLowerCase() === thisModel.name?.toLowerCase() 32 | )?.content || "", 33 | },{ 34 | key: 'promptState', 35 | value: promptsList.find(prompt=> 36 | prompt.id?.toLowerCase() === thisModel.name?.toLowerCase() 37 | )?.controlState || 0, 38 | }]); 39 | } 40 | }; 41 | 42 | return ( 43 |
44 | 47 |
48 | {/**/} 55 | {/* {models.map((model) => (*/} 56 | {/* */} 61 | {/* {model.id === defaultModelId*/} 62 | {/* ? `Default (${model.id})`*/} 63 | {/* : model.id}*/} 64 | {/* */} 65 | {/* ))}*/} 66 | {/**/} 67 |
68 | {selectedConversation?.model?.id || defaultModelId} 69 |
70 |
71 |
72 | ); 73 | }; 74 | -------------------------------------------------------------------------------- /components/Chat/PluginSelect.tsx: -------------------------------------------------------------------------------- 1 | import { FC, useEffect, useRef } from 'react'; 2 | 3 | import { useTranslation } from 'next-i18next'; 4 | 5 | import { Plugin, PluginList } from '@/types/plugin'; 6 | 7 | interface Props { 8 | plugin: Plugin | null; 9 | onPluginChange: (plugin: Plugin) => void; 10 | onKeyDown: (e: React.KeyboardEvent) => void; 11 | } 12 | 13 | export const PluginSelect: FC = ({ 14 | plugin, 15 | onPluginChange, 16 | onKeyDown, 17 | }) => { 18 | const { t } = useTranslation('chat'); 19 | 20 | const selectRef = useRef(null); 21 | 22 | const handleKeyDown = (e: React.KeyboardEvent) => { 23 | const selectElement = selectRef.current; 24 | const optionCount = selectElement?.options.length || 0; 25 | 26 | if (e.key === '/' && e.metaKey) { 27 | e.preventDefault(); 28 | if (selectElement) { 29 | selectElement.selectedIndex = 30 | (selectElement.selectedIndex + 1) % optionCount; 31 | selectElement.dispatchEvent(new Event('change')); 32 | } 33 | } else if (e.key === '/' && e.shiftKey && e.metaKey) { 34 | e.preventDefault(); 35 | if (selectElement) { 36 | selectElement.selectedIndex = 37 | (selectElement.selectedIndex - 1 + optionCount) % optionCount; 38 | selectElement.dispatchEvent(new Event('change')); 39 | } 40 | } else if (e.key === 'Enter') { 41 | e.preventDefault(); 42 | if (selectElement) { 43 | selectElement.dispatchEvent(new Event('change')); 44 | } 45 | 46 | onPluginChange( 47 | PluginList.find( 48 | (plugin) => 49 | plugin.name === selectElement?.selectedOptions[0].innerText, 50 | ) as Plugin, 51 | ); 52 | } else { 53 | onKeyDown(e); 54 | } 55 | }; 56 | 57 | useEffect(() => { 58 | if (selectRef.current) { 59 | selectRef.current.focus(); 60 | } 61 | }, []); 62 | 63 | return ( 64 |
65 |
66 | 100 |
101 |
102 | ); 103 | }; 104 | -------------------------------------------------------------------------------- /components/Chat/PromptList.tsx: -------------------------------------------------------------------------------- 1 | import { FC, MutableRefObject } from 'react'; 2 | 3 | import { Prompt } from '@/types/prompt'; 4 | 5 | interface Props { 6 | prompts: Prompt[]; 7 | activePromptIndex: number; 8 | onSelect: () => void; 9 | onMouseOver: (index: number) => void; 10 | promptListRef: MutableRefObject; 11 | } 12 | 13 | export const PromptList: FC = ({ 14 | prompts, 15 | activePromptIndex, 16 | onSelect, 17 | onMouseOver, 18 | promptListRef, 19 | }) => { 20 | return ( 21 |
    25 | {prompts.map((prompt, index) => ( 26 |
  • { 34 | e.preventDefault(); 35 | e.stopPropagation(); 36 | onSelect(); 37 | }} 38 | onMouseEnter={() => onMouseOver(index)} 39 | > 40 | {prompt.name} 41 |
  • 42 | ))} 43 |
44 | ); 45 | }; 46 | -------------------------------------------------------------------------------- /components/Chat/PromptsList.ts: -------------------------------------------------------------------------------- 1 | export const promptsList = [{ 2 | id: "llama-2-chat", 3 | description: "", 4 | content: "You are a helpful, respectful and honest assistant. Always answer as short as possible, while being safe.", 5 | controlState: 0 6 | },{ 7 | id: "codellama-instruct", 8 | description: "", 9 | content: "You are a helpful, respectful and honest assistant. Always answer as short as possible, while being safe.", 10 | controlState: 0 11 | },{ 12 | id: "vicuna-chat", 13 | description: "", 14 | content: "You are a helpful, respectful and honest assistant. Always answer as short as possible, while being safe.", 15 | controlState: 0 16 | },{ 17 | id: "chatml", 18 | description: "", 19 | content: "Answer as concisely as possible.", 20 | controlState: 1 21 | },{ 22 | id: "mistral-instruct-v0.1", 23 | description: "", 24 | content: "", 25 | controlState: 2 26 | },{ 27 | id: "belle-llama-2-chat", 28 | description: "", 29 | content: "", 30 | controlState: 2 31 | }] -------------------------------------------------------------------------------- /components/Chat/Regenerate.tsx: -------------------------------------------------------------------------------- 1 | import { IconRefresh } from '@tabler/icons-react'; 2 | import { FC } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | interface Props { 7 | onRegenerate: () => void; 8 | } 9 | 10 | export const Regenerate: FC = ({ onRegenerate }) => { 11 | const { t } = useTranslation('chat'); 12 | return ( 13 |
14 |
15 | {t('Sorry, there was an error.')} 16 |
17 | 24 |
25 | ); 26 | }; 27 | -------------------------------------------------------------------------------- /components/Chat/SystemNodes.tsx: -------------------------------------------------------------------------------- 1 | import {IconChevronDown, IconSearch} from '@tabler/icons-react'; 2 | import Tippy from '@tippyjs/react'; 3 | import { Conversation } from '@/types/chat'; 4 | import { saveConversation } from '@/utils/app/conversation'; 5 | import React, {useCallback, useContext, useEffect, useMemo, useState,} from 'react'; 6 | 7 | import {dappHosts} from '@/hooks/useHost'; 8 | 9 | import HomeContext from '@/pages/api/home/home.context'; 10 | 11 | const SystemNodes: React.FC = () => { 12 | const [tippyInstance, setTippyInstance] = useState(null); 13 | 14 | const { 15 | state: {selectedNode, messageIsStreaming}, 16 | dispatch: homeDispatch, 17 | } = useContext(HomeContext); 18 | 19 | return ( 20 | <> 21 | setTippyInstance(instance)} 28 | className="gaianet-tippy" 29 | > 30 |
31 |
32 |

33 | {selectedNode?.subdomain || '-'} 34 |

35 |

36 | {selectedNode?.name || '-'} 37 |

38 |
39 | 40 |
41 |
42 | 69 | 70 | ); 71 | }; 72 | 73 | export default SystemNodes; 74 | -------------------------------------------------------------------------------- /components/Chat/Temperature.tsx: -------------------------------------------------------------------------------- 1 | import { FC, useContext, useState } from 'react'; 2 | 3 | import { useTranslation } from 'next-i18next'; 4 | 5 | import { DEFAULT_TEMPERATURE } from '@/utils/app/const'; 6 | 7 | import HomeContext from '@/pages/api/home/home.context'; 8 | 9 | interface Props { 10 | label: string; 11 | onChangeTemperature: (temperature: number) => void; 12 | } 13 | 14 | export const TemperatureSlider: FC = ({ 15 | label, 16 | onChangeTemperature, 17 | }) => { 18 | const { 19 | state: { conversations }, 20 | } = useContext(HomeContext); 21 | const lastConversation = conversations[conversations.length - 1]; 22 | const [temperature, setTemperature] = useState( 23 | lastConversation?.temperature ?? DEFAULT_TEMPERATURE, 24 | ); 25 | const { t } = useTranslation('chat'); 26 | const handleChange = (event: React.ChangeEvent) => { 27 | const newValue = parseFloat(event.target.value); 28 | setTemperature(newValue); 29 | onChangeTemperature(newValue); 30 | }; 31 | 32 | return ( 33 |
34 | 37 | 38 | {t( 39 | 'Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.', 40 | )} 41 | 42 | 43 | {temperature.toFixed(1)} 44 | 45 | 54 |
    55 |
  • 56 | {t('Precise')} 57 |
  • 58 |
  • 59 | {t('Neutral')} 60 |
  • 61 |
  • 62 | {t('Creative')} 63 |
  • 64 |
65 |
66 | ); 67 | }; 68 | -------------------------------------------------------------------------------- /components/Chatbar/Chatbar.context.tsx: -------------------------------------------------------------------------------- 1 | import { Dispatch, createContext } from 'react'; 2 | 3 | import { ActionType } from '@/hooks/useCreateReducer'; 4 | 5 | import { Conversation } from '@/types/chat'; 6 | import { SupportedExportFormats } from '@/types/export'; 7 | import { PluginKey } from '@/types/plugin'; 8 | 9 | import { ChatbarInitialState } from './Chatbar.state'; 10 | 11 | export interface ChatbarContextProps { 12 | state: ChatbarInitialState; 13 | dispatch: Dispatch>; 14 | handleDeleteConversation: (conversation: Conversation) => void; 15 | handleClearConversations: () => void; 16 | handleExportData: () => void; 17 | handleImportConversations: (data: SupportedExportFormats) => void; 18 | handlePluginKeyChange: (pluginKey: PluginKey) => void; 19 | handleClearPluginKey: (pluginKey: PluginKey) => void; 20 | handleApiChange: (apiKey: string) => void; 21 | handleApiKeyChange: (apiKey: string) => void; 22 | } 23 | 24 | const ChatbarContext = createContext(undefined!); 25 | 26 | export default ChatbarContext; 27 | -------------------------------------------------------------------------------- /components/Chatbar/Chatbar.state.tsx: -------------------------------------------------------------------------------- 1 | import { Conversation } from '@/types/chat'; 2 | 3 | export interface ChatbarInitialState { 4 | searchTerm: string; 5 | filteredConversations: Conversation[]; 6 | } 7 | 8 | export const initialState: ChatbarInitialState = { 9 | searchTerm: '', 10 | filteredConversations: [], 11 | }; 12 | -------------------------------------------------------------------------------- /components/Chatbar/components/ChatFolders.tsx: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | 3 | import { FolderInterface } from '@/types/folder'; 4 | 5 | import HomeContext from '@/pages/api/home/home.context'; 6 | 7 | import Folder from '@/components/Folder'; 8 | 9 | import { ConversationComponent } from './Conversation'; 10 | 11 | interface Props { 12 | searchTerm: string; 13 | } 14 | 15 | export const ChatFolders = ({ searchTerm }: Props) => { 16 | const { 17 | state: { folders, conversations, selectedConversation }, 18 | handleUpdateConversation, 19 | } = useContext(HomeContext); 20 | 21 | const handleDrop = (e: any, folder: FolderInterface) => { 22 | if (e.dataTransfer) { 23 | const conversation = JSON.parse(e.dataTransfer.getData('conversation')); 24 | handleUpdateConversation(conversation, { 25 | key: 'folderId', 26 | value: folder.id, 27 | }); 28 | } 29 | }; 30 | 31 | const ChatFolders = (currentFolder: FolderInterface) => { 32 | return ( 33 | conversations && 34 | conversations 35 | .filter((conversation) => conversation.folderId) 36 | .map((conversation, index) => { 37 | if (conversation.folderId === currentFolder.id) { 38 | return ( 39 |
40 | 41 |
42 | ); 43 | } 44 | }) 45 | ); 46 | }; 47 | 48 | return ( 49 |
50 | {folders 51 | .filter((folder) => folder.type === 'chat') 52 | .sort((a, b) => a.name.localeCompare(b.name)) 53 | .map((folder, index) => ( 54 | 61 | ))} 62 |
63 | ); 64 | }; 65 | -------------------------------------------------------------------------------- /components/Chatbar/components/ChatbarSettings.tsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable @next/next/no-img-element */ 2 | import { IconInfoCircle, IconSettings } from '@tabler/icons-react'; 3 | import { useContext, useState } from 'react'; 4 | 5 | import { useTranslation } from 'next-i18next'; 6 | 7 | import HomeContext from '@/pages/api/home/home.context'; 8 | 9 | import { ApiTutarialDialog } from '@/components/Settings/ApiTutarialDialog'; 10 | import { NodeInfoDialog } from '@/components/Settings/NodeInfoDialog'; 11 | import { SettingDialog } from '@/components/Settings/SettingDialog'; 12 | 13 | import { Import } from '../../Settings/Import'; 14 | import { QueryUrl } from '../../Settings/QueryUrl'; 15 | import { SidebarButton } from '../../Sidebar/SidebarButton'; 16 | import ChatbarContext from '../Chatbar.context'; 17 | import { ClearConversations } from './ClearConversations'; 18 | 19 | export const ChatbarSettings = () => { 20 | const { t } = useTranslation('sidebar'); 21 | const [isNodeInfoDialogOpen, setIsNodeInfoDialogOpen] = 22 | useState(false); 23 | const [isSettingDialogOpen, setIsSettingDialog] = useState(false); 24 | const [isApitutorialDialogOpen, setIsApitutorialDialogOpen] = 25 | useState(false); 26 | 27 | const { 28 | state: { 29 | conversations, 30 | }, 31 | dispatch: homeDispatch, 32 | } = useContext(HomeContext); 33 | 34 | const { 35 | handleClearConversations, 36 | handleImportConversations, 37 | handleExportData, 38 | handleApiChange, 39 | handleApiKeyChange, 40 | } = useContext(ChatbarContext); 41 | 42 | return ( 43 |
44 | {conversations.length > 0 ? ( 45 | 46 | ) : null} 47 | 48 | 52 | } 53 | hoverIcon={ 54 | 55 | } 56 | onClick={() => setIsApitutorialDialogOpen(true)} 57 | /> 58 | } 61 | onClick={() => setIsNodeInfoDialogOpen(true)} 62 | /> 63 | 64 | { 67 | setIsApitutorialDialogOpen(false); 68 | }} 69 | /> 70 | { 73 | setIsNodeInfoDialogOpen(false); 74 | }} 75 | /> 76 |
77 | ); 78 | }; 79 | -------------------------------------------------------------------------------- /components/Chatbar/components/ClearConversations.tsx: -------------------------------------------------------------------------------- 1 | import { IconCheck, IconTrash, IconX } from '@tabler/icons-react'; 2 | import { FC, useState } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import { SidebarButton } from '@/components/Sidebar/SidebarButton'; 7 | 8 | interface Props { 9 | onClearConversations: () => void; 10 | } 11 | 12 | export const ClearConversations: FC = ({ onClearConversations }) => { 13 | const [isConfirming, setIsConfirming] = useState(false); 14 | 15 | const { t } = useTranslation('sidebar'); 16 | 17 | const handleClearConversations = () => { 18 | onClearConversations(); 19 | setIsConfirming(false); 20 | }; 21 | 22 | return isConfirming ? ( 23 |
24 | 25 | 26 |
27 | {t('Are you sure?')} 28 |
29 | 30 |
31 | { 35 | e.stopPropagation(); 36 | handleClearConversations(); 37 | }} 38 | /> 39 | 40 | { 44 | e.stopPropagation(); 45 | setIsConfirming(false); 46 | }} 47 | /> 48 |
49 |
50 | ) : ( 51 | } 54 | onClick={() => setIsConfirming(true)} 55 | /> 56 | ); 57 | }; 58 | -------------------------------------------------------------------------------- /components/Chatbar/components/Conversations.tsx: -------------------------------------------------------------------------------- 1 | import { Conversation } from '@/types/chat'; 2 | 3 | import { ConversationComponent } from './Conversation'; 4 | 5 | interface Props { 6 | conversations: Conversation[]; 7 | } 8 | 9 | export const Conversations = ({ conversations }: Props) => { 10 | return ( 11 |
12 | {conversations 13 | .filter((conversation) => !conversation.folderId) 14 | .slice() 15 | .reverse() 16 | .map((conversation, index) => ( 17 | 18 | ))} 19 |
20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /components/Folder/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Folder'; 2 | -------------------------------------------------------------------------------- /components/Loading/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const Loading = () => { 4 | return ( 5 | 6 | 27 | 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /components/Markdown/MemoizedReactMarkdown.tsx: -------------------------------------------------------------------------------- 1 | import { FC, memo } from 'react'; 2 | import ReactMarkdown, {Options} from 'react-markdown'; 3 | 4 | const ProcessContent = ({ children }: { children: string }) => { 5 | const parts = []; 6 | let currentIndex = 0; 7 | // First check if there's a lone tag 8 | const endThinkMatch = children.match(/<\/think>/); 9 | if (endThinkMatch && !children.slice(0, endThinkMatch.index).includes('')) { 10 | // If we find a lone , treat all content before it as think content 11 | if(children.slice(0, endThinkMatch.index) && children.slice(0, endThinkMatch.index).trim() !== "") { 12 | if (endThinkMatch.index! > 0) { 13 | parts.push( 14 |
15 | {children.slice(0, endThinkMatch.index)} 16 |
17 | ); 18 | } 19 | } 20 | // Add remaining content after 21 | if (endThinkMatch.index! + 8 < children.length) { 22 | parts.push( 23 | 24 | {children.slice(endThinkMatch.index! + 8)} 25 | 26 | ); 27 | } 28 | } else { 29 | // Regular processing for properly paired think tags 30 | const regex = /([\s\S]*?)<\/think>/g; 31 | let match; 32 | while ((match = regex.exec(children)) !== null) { 33 | // Add content before the think tag 34 | if (match.index > currentIndex) { 35 | parts.push( 36 | 37 | {children.slice(currentIndex, match.index)} 38 | 39 | ); 40 | } 41 | if(match[1].trim() !== "") { 42 | parts.push( 43 |
45 | {match[1]} 46 |
47 | ); 48 | } 49 | 50 | currentIndex = match.index + match[0].length; 51 | } 52 | 53 | // Add any remaining content 54 | if (currentIndex < children.length) { 55 | parts.push( 56 | 57 | {children.slice(currentIndex)} 58 | 59 | ); 60 | } 61 | } 62 | 63 | return
{parts}
; 64 | }; 65 | 66 | export const MemoizedReactMarkdown: FC = memo( 67 | ({ children, ...props }) => ( 68 | 69 | {typeof children === 'string' ? children : ''} 70 | 71 | ), 72 | (prevProps, nextProps) => prevProps.children === nextProps.children 73 | ); 74 | 75 | MemoizedReactMarkdown.displayName = 'MemoizedReactMarkdown'; -------------------------------------------------------------------------------- /components/Mobile/Navbar.tsx: -------------------------------------------------------------------------------- 1 | import { IconPlus } from '@tabler/icons-react'; 2 | import { FC } from 'react'; 3 | 4 | import { Conversation } from '@/types/chat'; 5 | 6 | interface Props { 7 | selectedConversation?: Conversation; 8 | onNewConversation: () => void; 9 | } 10 | 11 | export const Navbar: FC = ({ 12 | selectedConversation, 13 | onNewConversation, 14 | }) => { 15 | return ( 16 | 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /components/Search/Search.tsx: -------------------------------------------------------------------------------- 1 | import { IconX } from '@tabler/icons-react'; 2 | import { FC } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import cn from 'classnames'; 7 | 8 | interface Props { 9 | placeholder: string; 10 | searchTerm: string; 11 | onSearch: (searchTerm: string) => void; 12 | } 13 | const Search: FC> = (props) => { 14 | const { t } = useTranslation('sidebar'); 15 | const { placeholder, searchTerm, onSearch, ...otherProps } = props; 16 | 17 | const handleSearchChange = (e: React.ChangeEvent) => { 18 | onSearch(e.target.value); 19 | }; 20 | 21 | const clearSearch = () => { 22 | onSearch(''); 23 | }; 24 | 25 | return ( 26 |
27 | 35 | 39 | 40 | 47 | 48 | {searchTerm && ( 49 | 54 | )} 55 |
56 | ); 57 | }; 58 | 59 | export default Search; 60 | -------------------------------------------------------------------------------- /components/Search/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Search'; 2 | -------------------------------------------------------------------------------- /components/Settings/Import.tsx: -------------------------------------------------------------------------------- 1 | import { IconFileImport } from '@tabler/icons-react'; 2 | import { FC } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import { SupportedExportFormats } from '@/types/export'; 7 | 8 | import { SidebarButton } from '../Sidebar/SidebarButton'; 9 | 10 | interface Props { 11 | onImport: (data: SupportedExportFormats) => void; 12 | } 13 | 14 | export const Import: FC = ({ onImport }) => { 15 | const { t } = useTranslation('sidebar'); 16 | return ( 17 | <> 18 | { 25 | if (!e.target.files?.length) return; 26 | 27 | const file = e.target.files[0]; 28 | const reader = new FileReader(); 29 | reader.onload = (e) => { 30 | let json = JSON.parse(e.target?.result as string); 31 | onImport(json); 32 | }; 33 | reader.readAsText(file); 34 | }} 35 | /> 36 | 37 | } 40 | onClick={() => { 41 | const importFile = document.querySelector( 42 | '#import-file', 43 | ) as HTMLInputElement; 44 | if (importFile) { 45 | importFile.click(); 46 | } 47 | }} 48 | /> 49 | 50 | ); 51 | }; 52 | -------------------------------------------------------------------------------- /components/Settings/Key.tsx: -------------------------------------------------------------------------------- 1 | import { IconCheck, IconKey, IconX } from '@tabler/icons-react'; 2 | import { FC, KeyboardEvent, useEffect, useRef, useState } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import { SidebarButton } from '../Sidebar/SidebarButton'; 7 | 8 | interface Props { 9 | apiKey: string; 10 | onApiKeyChange: (apiKey: string) => void; 11 | } 12 | 13 | export const Key: FC = ({ apiKey, onApiKeyChange }) => { 14 | const { t } = useTranslation('sidebar'); 15 | const [isChanging, setIsChanging] = useState(false); 16 | const [newKey, setNewKey] = useState(apiKey); 17 | const inputRef = useRef(null); 18 | 19 | const handleEnterDown = (e: KeyboardEvent) => { 20 | if (e.key === 'Enter') { 21 | e.preventDefault(); 22 | handleUpdateKey(newKey); 23 | } 24 | }; 25 | 26 | const handleUpdateKey = (newKey: string) => { 27 | onApiKeyChange(newKey.trim()); 28 | setIsChanging(false); 29 | }; 30 | 31 | useEffect(() => { 32 | if (isChanging) { 33 | inputRef.current?.focus(); 34 | } 35 | }, [isChanging]); 36 | 37 | return isChanging ? ( 38 |
39 | 40 | 41 | setNewKey(e.target.value)} 47 | onKeyDown={handleEnterDown} 48 | placeholder={t('API Key') || 'API Key'} 49 | /> 50 | 51 |
52 | { 56 | e.stopPropagation(); 57 | handleUpdateKey(newKey); 58 | }} 59 | /> 60 | 61 | { 65 | e.stopPropagation(); 66 | setIsChanging(false); 67 | setNewKey(apiKey); 68 | }} 69 | /> 70 |
71 |
72 | ) : ( 73 | } 76 | onClick={() => setIsChanging(true)} 77 | /> 78 | ); 79 | }; 80 | -------------------------------------------------------------------------------- /components/Settings/QueryUrl.tsx: -------------------------------------------------------------------------------- 1 | import { IconCheck, IconLink, IconX } from '@tabler/icons-react'; 2 | import { FC, KeyboardEvent, useEffect, useRef, useState } from 'react'; 3 | 4 | import { useTranslation } from 'next-i18next'; 5 | 6 | import { SidebarButton } from '../Sidebar/SidebarButton'; 7 | 8 | interface Props { 9 | api: string; 10 | onApiChange: (apiKey: string) => void; 11 | } 12 | 13 | export const QueryUrl: FC = ({ api, onApiChange }) => { 14 | const { t } = useTranslation('sidebar'); 15 | const [isChanging, setIsChanging] = useState(false); 16 | // const [newKey, setNewKey] = useState(api); 17 | const inputRef = useRef(null); 18 | 19 | const handleEnterDown = (e: KeyboardEvent) => { 20 | if (e.key === 'Enter') { 21 | e.preventDefault(); 22 | if (inputRef.current?.value) 23 | handleUpdateKey(inputRef.current?.value?.trim()); 24 | } 25 | }; 26 | 27 | const handleUpdateKey = (newKey: string) => { 28 | onApiChange(newKey.trim()); 29 | setIsChanging(false); 30 | }; 31 | 32 | useEffect(() => { 33 | if (isChanging) { 34 | inputRef.current?.focus(); 35 | } 36 | }, [isChanging]); 37 | 38 | return isChanging ? ( 39 |
40 | 41 | 42 | setNewKey(e.target.value)} 48 | onKeyDown={handleEnterDown} 49 | placeholder={t('API Url') || 'API Url'} 50 | /> 51 | 52 |
53 | { 57 | e.stopPropagation(); 58 | if (inputRef.current?.value) 59 | handleUpdateKey(inputRef.current?.value?.trim()); 60 | }} 61 | /> 62 | 63 | { 67 | e.stopPropagation(); 68 | setIsChanging(false); 69 | // setNewKey(api); 70 | }} 71 | /> 72 |
73 |
74 | ) : ( 75 | } 78 | onClick={() => setIsChanging(true)} 79 | /> 80 | ); 81 | }; 82 | -------------------------------------------------------------------------------- /components/Sidebar/SidebarButton.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from 'react'; 2 | import cn from 'classnames'; 3 | 4 | interface Props { 5 | text: string; 6 | icon: JSX.Element; 7 | hoverIcon?: JSX.Element; 8 | onClick: () => void; 9 | } 10 | 11 | export const SidebarButton: FC = ({ text, icon, hoverIcon, onClick }) => { 12 | return ( 13 | 33 | ); 34 | }; 35 | -------------------------------------------------------------------------------- /components/Sidebar/components/OpenCloseButton.tsx: -------------------------------------------------------------------------------- 1 | import { IconArrowBarLeft, IconArrowBarRight } from '@tabler/icons-react'; 2 | 3 | interface Props { 4 | onClick: any; 5 | side: 'left' | 'right'; 6 | } 7 | 8 | export const CloseSidebarButton = ({ onClick, side }: Props) => { 9 | return ( 10 | 24 | ); 25 | }; 26 | 27 | export const OpenSidebarButton = ({onClick, side}: Props) => { 28 | return ( 29 | 43 | ); 44 | }; 45 | -------------------------------------------------------------------------------- /components/Sidebar/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Sidebar'; 2 | -------------------------------------------------------------------------------- /components/Spinner/Spinner.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from 'react'; 2 | 3 | interface Props { 4 | size?: string; 5 | className?: string; 6 | } 7 | 8 | const Spinner = ({ size = '1em', className = '' }: Props) => { 9 | return ( 10 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | ); 32 | }; 33 | 34 | export default Spinner; 35 | -------------------------------------------------------------------------------- /components/Spinner/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './Spinner'; 2 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | chatgpt: 5 | build: . 6 | ports: 7 | - 3000:3000 8 | environment: 9 | - 'OPENAI_API_KEY=' 10 | -------------------------------------------------------------------------------- /hooks/useCreateReducer.ts: -------------------------------------------------------------------------------- 1 | import { useMemo, useReducer } from 'react'; 2 | 3 | // Extracts property names from initial state of reducer to allow typesafe dispatch objects 4 | export type FieldNames = { 5 | [K in keyof T]: T[K] extends string ? K : K; 6 | }[keyof T]; 7 | 8 | // Returns the Action Type for the dispatch object to be used for typing in things like context 9 | export type ActionType = 10 | | { type: 'reset' } 11 | | { type?: 'change'; field: FieldNames; value: any }; 12 | 13 | // Returns a typed dispatch and state 14 | export const useCreateReducer = ({ initialState }: { initialState: T }) => { 15 | type Action = 16 | | { type: 'reset' } 17 | | { type?: 'change'; field: FieldNames; value: any }; 18 | 19 | const reducer = (state: T, action: Action) => { 20 | if (!action.type) return { ...state, [action.field]: action.value }; 21 | 22 | if (action.type === 'reset') return initialState; 23 | 24 | throw new Error(); 25 | }; 26 | 27 | const [state, dispatch] = useReducer(reducer, initialState); 28 | 29 | return useMemo(() => ({ state, dispatch }), [state, dispatch]); 30 | }; 31 | -------------------------------------------------------------------------------- /hooks/useFetch.ts: -------------------------------------------------------------------------------- 1 | export type RequestModel = { 2 | params?: object; 3 | headers?: object; 4 | signal?: AbortSignal; 5 | }; 6 | 7 | export type RequestWithBodyModel = RequestModel & { 8 | body?: object | FormData; 9 | }; 10 | 11 | export const useFetch = () => { 12 | const handleFetch = async ( 13 | url: string, 14 | request: any, 15 | signal?: AbortSignal, 16 | ) => { 17 | const requestUrl = request?.params ? `${url}${request.params}` : url; 18 | 19 | const requestBody = request?.body 20 | ? request.body instanceof FormData 21 | ? { ...request, body: request.body } 22 | : { ...request, body: JSON.stringify(request.body) } 23 | : request; 24 | 25 | const headers = { 26 | ...(request?.headers 27 | ? request.headers 28 | : request?.body && request.body instanceof FormData 29 | ? {} 30 | : { 'Content-type': 'application/json' }), 31 | }; 32 | 33 | return fetch(requestUrl, { ...requestBody, headers, signal }) 34 | .then((response) => { 35 | if (!response.ok) throw response; 36 | 37 | const contentType = response.headers.get('content-type'); 38 | const contentDisposition = response.headers.get('content-disposition'); 39 | 40 | const headers = response.headers; 41 | 42 | const result = 43 | contentType && 44 | (contentType?.indexOf('application/json') !== -1 || 45 | contentType?.indexOf('text/plain') !== -1) 46 | ? response.json() 47 | : contentDisposition?.indexOf('attachment') !== -1 48 | ? response.blob() 49 | : response; 50 | 51 | return result; 52 | }) 53 | .catch(async (err) => { 54 | const contentType = err.headers.get('content-type'); 55 | 56 | const errResult = 57 | contentType && contentType?.indexOf('application/problem+json') !== -1 58 | ? await err.json() 59 | : err; 60 | 61 | throw errResult; 62 | }); 63 | }; 64 | 65 | return { 66 | get: async (url: string, request?: RequestModel): Promise => { 67 | return handleFetch(url, { ...request, method: 'get' }); 68 | }, 69 | post: async ( 70 | url: string, 71 | request?: RequestWithBodyModel, 72 | ): Promise => { 73 | return handleFetch(url, { ...request, method: 'post' }); 74 | }, 75 | put: async (url: string, request?: RequestWithBodyModel): Promise => { 76 | return handleFetch(url, { ...request, method: 'put' }); 77 | }, 78 | patch: async ( 79 | url: string, 80 | request?: RequestWithBodyModel, 81 | ): Promise => { 82 | return handleFetch(url, { ...request, method: 'patch' }); 83 | }, 84 | delete: async (url: string, request?: RequestModel): Promise => { 85 | return handleFetch(url, { ...request, method: 'delete' }); 86 | }, 87 | }; 88 | }; 89 | -------------------------------------------------------------------------------- /hooks/useHost.ts: -------------------------------------------------------------------------------- 1 | export const dappHosts = [ 2 | { 3 | host: 'dapp.gaianet-test.link', 4 | apiUrl: 'https://api.gaianet-test.link/', 5 | }, 6 | { 7 | host: 'gaianet-test.link', 8 | apiUrl: 'https://api.gaianet-test.link/', 9 | }, 10 | { 11 | host: 'www.gaianet-test.link', 12 | apiUrl: 'https://api.gaianet-test.link/', 13 | }, 14 | { 15 | host: 'www.gaianet.ai', 16 | apiUrl: 'https://api.gaianet.ai/', 17 | }, 18 | { 19 | host: 'gaianet.ai', 20 | apiUrl: 'https://api.gaianet.ai/', 21 | }, 22 | { 23 | host: 'localhost:3000', 24 | apiUrl: 'https://api.gaianet-test.link/', 25 | }, 26 | ]; 27 | 28 | export const useChannelIsPortal = () => { 29 | if (typeof window === 'undefined') return false; 30 | const host = window.location.host; 31 | if (dappHosts.find((item) => item?.host === host)) return true; 32 | }; 33 | -------------------------------------------------------------------------------- /next-i18next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | i18n: { 3 | defaultLocale: 'en', 4 | locales: [ 5 | "bn", 6 | "de", 7 | "en", 8 | "es", 9 | "fr", 10 | "he", 11 | "id", 12 | "it", 13 | "ja", 14 | "ko", 15 | "pl", 16 | "pt", 17 | "ru", 18 | "ro", 19 | "sv", 20 | "te", 21 | "vi", 22 | "zh", 23 | "ar", 24 | "tr", 25 | "ca", 26 | "fi", 27 | ], 28 | }, 29 | localePath: 30 | typeof window === 'undefined' 31 | ? require('path').resolve('./public/locales') 32 | : '/public/locales', 33 | }; 34 | -------------------------------------------------------------------------------- /next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | output: 'export', 4 | assetPrefix: process.env.ASSET_PREFIX ? 'https://gaianet-ai.github.io/chatbot-ui' : "/", 5 | reactStrictMode: true, 6 | webpack(config, {isServer, dev}) { 7 | config.experiments = { 8 | asyncWebAssembly: true, 9 | layers: true 10 | }; 11 | 12 | return config; 13 | } 14 | }; 15 | 16 | module.exports = nextConfig; 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ai-chatbot-starter", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "build:local": "cross-env ASSET_PREFIX=true yarn build", 9 | "export": "next export", 10 | "start": "next start", 11 | "lint": "next lint", 12 | "format": "prettier --write .", 13 | "test": "vitest", 14 | "coverage": "vitest run --coverage" 15 | }, 16 | "dependencies": { 17 | "@dqbd/tiktoken": "^1.0.2", 18 | "@tabler/icons-react": "^2.9.0", 19 | "@tippyjs/react": "^4.2.6", 20 | "classnames": "^2.5.1", 21 | "eventsource-parser": "^0.1.0", 22 | "i18next": "^22.4.13", 23 | "next": "13.2.4", 24 | "next-i18next": "^13.2.2", 25 | "openai": "^3.2.1", 26 | "react": "18.2.0", 27 | "react-dom": "18.2.0", 28 | "react-hot-toast": "^2.4.0", 29 | "react-i18next": "^12.2.0", 30 | "react-markdown": "^8.0.5", 31 | "react-query": "^3.39.3", 32 | "react-syntax-highlighter": "^15.5.0", 33 | "rehype-katex": "^7.0.0", 34 | "remark-gfm": "^3.0.1", 35 | "uuid": "^9.0.0" 36 | }, 37 | "devDependencies": { 38 | "@mozilla/readability": "^0.4.4", 39 | "@tailwindcss/typography": "^0.5.9", 40 | "@trivago/prettier-plugin-sort-imports": "^4.1.1", 41 | "@types/jsdom": "^21.1.1", 42 | "@types/node": "18.15.0", 43 | "@types/react": "18.0.28", 44 | "@types/react-dom": "18.0.11", 45 | "@types/react-syntax-highlighter": "^15.5.6", 46 | "@types/uuid": "^9.0.1", 47 | "@vitest/coverage-c8": "^0.29.7", 48 | "autoprefixer": "^10.4.14", 49 | "cross-env": "^7.0.3", 50 | "endent": "^2.1.0", 51 | "eslint": "8.36.0", 52 | "eslint-config-next": "13.2.4", 53 | "gpt-3-encoder": "^1.1.4", 54 | "jsdom": "^21.1.1", 55 | "postcss": "^8.4.21", 56 | "prettier": "^2.8.7", 57 | "prettier-plugin-tailwindcss": "^0.2.5", 58 | "tailwindcss": "^3.2.7", 59 | "typescript": "4.9.5", 60 | "vitest": "^0.29.7" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- 1 | import {Toaster} from 'react-hot-toast'; 2 | import {QueryClient, QueryClientProvider} from 'react-query'; 3 | import {appWithTranslation} from 'next-i18next'; 4 | import 'tippy.js/dist/tippy.css'; 5 | 6 | import '@/styles/globals.css'; 7 | 8 | function App({Component, pageProps}) { 9 | const queryClient = new QueryClient(); 10 | 11 | return ( 12 |
13 | 14 | 15 | 16 | 17 |
18 | ); 19 | } 20 | 21 | export default appWithTranslation(App); 22 | -------------------------------------------------------------------------------- /pages/_document.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @next/next/next-script-for-ga */ 2 | import { Head, Html, Main, NextScript } from 'next/document'; 3 | 4 | import i18nextConfig from '../next-i18next.config'; 5 | 6 | export default function Document(props) { 7 | const currentLocale = 8 | props.__NEXT_DATA__.locale ?? i18nextConfig.i18n.defaultLocale; 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | {/* Google tag (gtag.js) */} 16 | 20 | 31 | 32 | 33 |
34 | 35 | 36 | 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /pages/api/home/home.context.tsx: -------------------------------------------------------------------------------- 1 | import { Dispatch, createContext } from 'react'; 2 | 3 | import { ActionType } from '@/hooks/useCreateReducer'; 4 | 5 | import { Conversation } from '@/types/chat'; 6 | import { KeyValuePair } from '@/types/data'; 7 | import { FolderType } from '@/types/folder'; 8 | 9 | import { HomeInitialState } from './home.state'; 10 | import {OpenAIModel} from "@/types/openai"; 11 | 12 | export interface HomeContextProps { 13 | state: HomeInitialState; 14 | dispatch: Dispatch>; 15 | handleNewConversation: () => void; 16 | handleCreateFolder: (name: string, type: FolderType) => void; 17 | handleDeleteFolder: (folderId: string) => void; 18 | handleUpdateFolder: (folderId: string, name: string) => void; 19 | handleSelectConversation: (conversation: Conversation) => void; 20 | handleUpdateConversation: ( 21 | conversation: Conversation, 22 | data: KeyValuePair, 23 | ) => void; 24 | handleUpdateConversationAll: ( 25 | conversation: Conversation, 26 | data: KeyValuePair[], 27 | ) => void; 28 | } 29 | 30 | const HomeContext = createContext(undefined!); 31 | 32 | export default HomeContext; 33 | -------------------------------------------------------------------------------- /pages/api/home/home.state.tsx: -------------------------------------------------------------------------------- 1 | import { Conversation, Message, SelectedNode } from '@/types/chat'; 2 | import { ErrorMessage } from '@/types/error'; 3 | import { FolderInterface } from '@/types/folder'; 4 | import { OpenAIModel, OpenAIModelID } from '@/types/openai'; 5 | import { PluginKey } from '@/types/plugin'; 6 | import { Prompt } from '@/types/prompt'; 7 | 8 | export interface HomeInitialState { 9 | api: string; 10 | apiKey: string; 11 | pluginKeys: PluginKey[]; 12 | loading: boolean; 13 | lightMode: 'light' | 'dark'; 14 | isStream: boolean; 15 | messageIsStreaming: boolean; 16 | modelError: ErrorMessage | null; 17 | models: OpenAIModel[]; 18 | folders: FolderInterface[]; 19 | conversations: Conversation[]; 20 | selectedConversation: Conversation | undefined; 21 | currentMessage: Message | undefined; 22 | prompts: Prompt[]; 23 | temperature: number; 24 | showChatbar: boolean; 25 | showPromptbar: boolean; 26 | currentFolder: FolderInterface | undefined; 27 | messageError: boolean; 28 | searchTerm: string; 29 | defaultModelId: OpenAIModelID | undefined; 30 | selectedNode: SelectedNode | undefined; 31 | selectedNodeSystemPrompt: string; 32 | controller: AbortController | null; 33 | } 34 | 35 | export const initialState: HomeInitialState = { 36 | api: process.env.NEXT_PUBLIC_API_URL || '', 37 | apiKey: '', 38 | loading: false, 39 | pluginKeys: [], 40 | lightMode: 'dark', 41 | isStream: true, 42 | messageIsStreaming: false, 43 | modelError: null, 44 | models: [], 45 | folders: [], 46 | conversations: [], 47 | selectedConversation: undefined, 48 | currentMessage: undefined, 49 | prompts: [], 50 | temperature: 1, 51 | showPromptbar: true, 52 | showChatbar: true, 53 | currentFolder: undefined, 54 | messageError: false, 55 | searchTerm: '', 56 | defaultModelId: undefined, 57 | selectedNode: undefined, 58 | selectedNodeSystemPrompt: '', 59 | controller: null 60 | }; 61 | -------------------------------------------------------------------------------- /pages/api/home/index.ts: -------------------------------------------------------------------------------- 1 | export { default } from './home'; 2 | -------------------------------------------------------------------------------- /pages/api/models.ts: -------------------------------------------------------------------------------- 1 | import { 2 | OPENAI_API_HOST, 3 | OPENAI_API_TYPE, 4 | OPENAI_API_VERSION, 5 | OPENAI_ORGANIZATION, 6 | } from '@/utils/app/const'; 7 | 8 | import { OpenAIModel, OpenAIModelID, OpenAIModels } from '@/types/openai'; 9 | 10 | export const config = { 11 | runtime: 'edge', 12 | }; 13 | 14 | export const baseURL = process.env.NEXT_PUBLIC_API_URL!; 15 | 16 | const handler = async (req: Request): Promise => { 17 | try { 18 | const { key } = (await req.json()) as { 19 | key: string; 20 | }; 21 | 22 | let url = `${baseURL}/v1/models`; 23 | if (OPENAI_API_TYPE === 'azure') { 24 | url = `${OPENAI_API_HOST}/openai/deployments?api-version=${OPENAI_API_VERSION}`; 25 | } 26 | 27 | const response = await fetch(url, { 28 | headers: { 29 | 'Content-Type': 'application/json', 30 | ...(OPENAI_API_TYPE === 'openai' && { 31 | Authorization: `Bearer ${key ? key : process.env.OPENAI_API_KEY}`, 32 | }), 33 | ...(OPENAI_API_TYPE === 'azure' && { 34 | 'api-key': `${key ? key : process.env.OPENAI_API_KEY}`, 35 | }), 36 | ...(OPENAI_API_TYPE === 'openai' && 37 | OPENAI_ORGANIZATION && { 38 | 'OpenAI-Organization': OPENAI_ORGANIZATION, 39 | }), 40 | }, 41 | }); 42 | 43 | if (response.status === 401) { 44 | return new Response(response.body, { 45 | status: 500, 46 | headers: response.headers, 47 | }); 48 | } else if (response.status !== 200) { 49 | console.error( 50 | `OpenAI API returned an error ${ 51 | response.status 52 | }: ${await response.text()}`, 53 | ); 54 | throw new Error('OpenAI API returned an error'); 55 | } 56 | 57 | const json = await response.json(); 58 | 59 | const models: OpenAIModel[] = json.data 60 | .map((model: any) => { 61 | const model_name = OPENAI_API_TYPE === 'azure' ? model.model : model.id; 62 | for (const [key, value] of Object.entries(OpenAIModelID)) { 63 | if (value === model_name) { 64 | return { 65 | id: model.id, 66 | name: OpenAIModels[value].name, 67 | }; 68 | } 69 | } 70 | }) 71 | .filter(Boolean); 72 | 73 | return new Response(JSON.stringify(models), { status: 200 }); 74 | } catch (error) { 75 | console.error(error); 76 | return new Response('Error', { status: 500 }); 77 | } 78 | }; 79 | 80 | export default handler; 81 | -------------------------------------------------------------------------------- /pages/index.tsx: -------------------------------------------------------------------------------- 1 | export {default} from './api/home'; -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | trailingComma: 'all', 3 | singleQuote: true, 4 | plugins: [ 5 | 'prettier-plugin-tailwindcss', 6 | '@trivago/prettier-plugin-sort-imports', 7 | ], 8 | importOrder: [ 9 | 'react', // React 10 | '^react-.*$', // React-related imports 11 | '^next', // Next-related imports 12 | '^next-.*$', // Next-related imports 13 | '^next/.*$', // Next-related imports 14 | '^.*/hooks/.*$', // Hooks 15 | '^.*/services/.*$', // Services 16 | '^.*/utils/.*$', // Utils 17 | '^.*/types/.*$', // Types 18 | '^.*/pages/.*$', // Components 19 | '^.*/components/.*$', // Components 20 | '^[./]', // Other imports 21 | '.*', // Any uncaught imports 22 | ], 23 | importOrderSeparation: true, 24 | importOrderSortSpecifiers: true, 25 | }; 26 | -------------------------------------------------------------------------------- /public/GaiaNet-black.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /public/GaiaNet-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /public/GitHubPages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/GitHubPages.png -------------------------------------------------------------------------------- /public/NextjsAction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/NextjsAction.png -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/favicon.png -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/IBMPlexMono-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/IBMPlexMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/IBMPlexMono-Regular.ttf -------------------------------------------------------------------------------- /public/fonts/SourceCodePro-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SourceCodePro-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/SourceCodePro-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SourceCodePro-Regular.ttf -------------------------------------------------------------------------------- /public/fonts/SpaceGrotesk-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SpaceGrotesk-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/SpaceGrotesk-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SpaceGrotesk-Regular.ttf -------------------------------------------------------------------------------- /public/fonts/SpaceMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SpaceMono-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/SpaceMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/fonts/SpaceMono-Regular.ttf -------------------------------------------------------------------------------- /public/gaianet-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/gaianet-opacity.png -------------------------------------------------------------------------------- /public/icons/APITutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/icons/APITutorial.png -------------------------------------------------------------------------------- /public/icons/api-tutorial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/icons/api-tutorial.png -------------------------------------------------------------------------------- /public/icons/github-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/icons/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/icons/huggingface-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/icons/huggingface.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /public/icons/icon-bot.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/icons/icon-care-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/icons/icon-care-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/icons/icon-message.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /public/icons/icon-send.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /public/icons/icon-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /public/locales/ar/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": " API Key (مطلوب (مفتاح واجهة برمجة تطبيقات ", 3 | "Please set your API key in the bottom left of the sidebar.": "يرجى تعيين مفتاح واجهة برمجة تطبيقات أوبن أيه أي الخاص بك في الجزء السفلي الأيسر من الشريط الجانبي", 4 | "Stop Generating": "إيقاف التوليد", 5 | "Prompt limit is {{maxLength}} characters": "حرفًا {{maxLength}} حد المطالبة هو", 6 | "System Prompt": "مطالبة النظام", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "أنت شات جبت نموذج لغة كبير تم تدريبه بواسطة أوبن أيه أي. اتبع تعليمات المستخدم بعناية. الرد باستخدام الماركداون", 8 | "Enter a prompt": "أدخل المطالبة", 9 | "Regenerate response": "إعادة توليد الرد", 10 | "Sorry, there was an error.": "عذرًا، حدث خطأ", 11 | "Model": "النموذج", 12 | "Conversation": "المحادثة", 13 | "OR": "أو", 14 | "Loading...": "...جاري التحميل", 15 | "Type a message...": "...اكتب رسالة", 16 | "Error fetching models.": "خطأ في جلب النماذج", 17 | "AI": "الذكاء الاصطناعي", 18 | "You": "أنت", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "تأكد من تعيين مفتاح واجهة برمجة تطبيقات الخاص بك في الجزء السفلي الأيسر من الشريط", 22 | "If you completed this step, may be experiencing issues.": "من مشاكل إذا اكتملت هذه الخطوة، فقد يعاني", 23 | 24 | "click if using a .env.local file": ".env.local انقر إذا كنت تستخدم ملف", 25 | 26 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "حرفًا {{maxLength}} حد الرسالة هو {{valueLength}} لقد أدخلت ", 27 | 28 | "Please enter a message": "يرجى إدخال رسالة", 29 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI هي مجموعة متقدمة للدردشة تستخدم", 30 | "Are you sure you want to clear all messages?": "هل أنت متأكد أنك تريد مسح كافة الرسائل؟", 31 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "القيم الأعلى مثل 0.8 ستجعل الإخراج أكثر عشوائية، في حين أن القيم الأقل مثل 0.2 ستجعله أكثر تركيزًا وتحديدًا." 32 | } 33 | -------------------------------------------------------------------------------- /public/locales/ar/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ar/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "نسخ الكود", 3 | "Copied!": "تم النسخ!", 4 | "Enter file name": "أدخل اسم الملف" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ar/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "مطلب جديد", 3 | "New folder": "مجلد جديد", 4 | "No prompts.": "لا يوجد مطالبات.", 5 | "Search prompts...": "...البحث عن مطالبات", 6 | "Name": "الاسم", 7 | "Description": "الوصف", 8 | "A description for your prompt.": "وصف لمطلبك", 9 | "Prompt": "مطلب", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "محتوى المطلب. استخدم {{}} للإشارة إلى متغير. مثال: {{الاسم}} هي {{صفة}} {{اسم}}", 11 | "Save": "حفظ" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ar/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "الوضع الداكن", 3 | "Light mode": "الوضع الفاتح" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/ar/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "مجلد جديد", 3 | "New chat": "محادثة جديدة", 4 | "No conversations.": "لا يوجد محادثات", 5 | "Search conversations...": "...البحث عن المحادثات", 6 | "API Key": " (أوبن أيه أي) API Key (مفتاح واجهة برمجة تطبيقات)", 7 | "Import data": "استيراد المحادثات", 8 | "Are you sure?": "هل أنت متأكد؟", 9 | "Clear conversations": "مسح المحادثات", 10 | "Export data": "تصدير المحادثات", 11 | "Dark mode": "الوضع الداكن", 12 | "Light mode": "الوضع الفاتح" 13 | } 14 | -------------------------------------------------------------------------------- /public/locales/bn/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API key বাধ্যতামূলক", 3 | "Please set your API key in the bottom left of the sidebar.": "দয়া করে আপনার API key বামে সাইডবারের নিচের দিকে সেট করুন।", 4 | "Stop Generating": "বার্তা জেনারেট করা বন্ধ করুন", 5 | "Prompt limit is {{maxLength}} characters": "নির্দেশনা (বার্তা) সীমা সর্বোচ্চ {{maxLength}} অক্ষর", 6 | "System Prompt": "সিস্টেম নির্দেশনা (বার্তা)", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "তুমি ChatGPT, দ্বারা প্রশিক্ষিত একটি বড় ভাষা মডেল। সাবধানে ব্যবহারকারীর নির্দেশাবলী অনুসরণ করুন. মার্কডাউন ব্যবহার করে উত্তর দিন।", 8 | "Enter a prompt": "একটি নির্দেশনা (বার্তা) দিন", 9 | "Regenerate response": "বার্তা আবার জেনারেট করুন", 10 | "Sorry, there was an error.": "দুঃখিত, কোনো একটি সমস্যা হয়েছে।", 11 | "Model": "মডেল", 12 | "Conversation": "আলাপচারিতা", 13 | "OR": "অথবা", 14 | "Loading...": "লোড হচ্ছে...", 15 | "Type a message...": "কোনো মেসেজ লিখুন...", 16 | "Error fetching models.": "মডেল পেতে সমস্যা হচ্ছে।", 17 | "AI": "AI", 18 | "You": "তুমি", 19 | "Cancel": "বাতিল করুন", 20 | "Save & Submit": "সংরক্ষণ করুন এবং জমা দিন", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "নিশ্চিত করুন যে আপনার API key সাইডবারের নীচে বাম দিকে সেট করা আছে।", 22 | "If you completed this step, may be experiencing issues.": "আপনি এই ধাপটি সম্পন্ন করে থাকলে, হতে পারে যে কোনো সমস্যার সম্মুখীন হয়েছে।", 23 | "click if using a .env.local file": "একটি .env.local ফাইল ব্যবহার করলে এখানে ক্লিক করুন", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "বার্তার সর্বোচ্চ সীমা হল {{maxLength}} অক্ষর৷ আপনি {{valueLength}} অক্ষর লিখেছেন।", 25 | "Please enter a message": "দয়া করে একটি মেসেজ লিখুন", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI হল-এর চ্যাট মডেলগুলির জন্য একটি উন্নত চ্যাটবট কিট যার লক্ষ্য হল ChatGPT-এর ইন্টারফেস এবং কার্যকারিতা অনুকরণ করা।", 27 | "Are you sure you want to clear all messages?": "সমস্ত বার্তা মুছে ফেলতে আপনি কি নিশ্চিত?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "০.৮ এর বেশি মান দিলে আউটপুট বেশি ইউনিক হবে, যেহেতু ০.২ এর মতো নিম্নমানের মান দিলে তা আরও ফোকাস এবং ধারাবাহিকতা বজায় থাকবে এবং নিশ্চয়তামূলক হবে।" 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/bn/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/bn/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "কোড কপি করুন", 3 | "Copied!": "কপি করা হয়েছে!", 4 | "Enter file name": "ফাইল নাম লিখুন" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/bn/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "নতুন prompt", 3 | "New folder": "নতুন ফোল্ডার", 4 | "No prompts.": "কোনো prompts নেই।", 5 | "Search prompts...": "prompts অনুসন্ধান হচ্ছে...", 6 | "Name": "নাম", 7 | "Description": "বর্ণনা", 8 | "A description for your prompt.": "আপনার Prompt জন্য একটি বিবরণ লিখুন.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "সংরক্ষণ করুন" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/bn/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "ডার্ক মোড", 3 | "Light mode": "লাইট মোড" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/bn/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "নতুন ফোল্ডার", 3 | "New chat": "নতুন আড্ডা", 4 | "No conversations.": "কোনো আলাপচারিতা নেই।", 5 | "Search conversations...": "আলাপচারিতা খুঁজুন...", 6 | "API Key": "API Key", 7 | "Import data": "আলাপচারিতা ইমপোর্ট", 8 | "Are you sure?": "আপনি কি নিশ্চিত?", 9 | "Clear conversations": "কথোপকথন পরিষ্কার করুন", 10 | "Export data": "আলাপচারিতা এক্সপোর্ট" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/ca/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Cal la clau d'API d'OpenAI", 3 | "Please set your API key in the bottom left of the sidebar.": "Si us plau, introdueix la teva clau d'API d'a la cantonada inferior esquerra de la barra lateral.", 4 | "Stop Generating": "Parar de generar", 5 | "Prompt limit is {{maxLength}} characters": "El límit del missatge és de {{maxLength}} caràcters", 6 | "System Prompt": "Missatge del sistema", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Ets ChatGPT, un model de llenguatge gran entrenat per. Segueix les instruccions de l'usuari amb cura. Respon utilitzant markdown.", 8 | "Enter a prompt": "Introdueix un missatge", 9 | "Regenerate response": "Regenerar resposta", 10 | "Sorry, there was an error.": "Ho sentim, ha ocorregut un error.", 11 | "Model": "Model", 12 | "Conversation": "Conversa", 13 | "OR": "O", 14 | "Loading...": "Carregant...", 15 | "Type a message...": "Escriu un missatge...", 16 | "Error fetching models.": "Error en obtenir els models.", 17 | "AI": "IA", 18 | "You": "Tu", 19 | "Cancel": "Cancel·lar", 20 | "Save & Submit": "Guardar i enviar", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Assegura't que has introduït la clau d'API d'a la cantonada inferior esquerra de la barra lateral.", 22 | "If you completed this step, may be experiencing issues.": "Si has completat aquest pas, podria estar experimentant problemes.", 23 | "click if using a .env.local file": "fes clic si estàs utilitzant un fitxer .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "El límit del missatge és de {{maxLength}} caràcters. Has introduït {{valueLength}} caràcters.", 25 | "Please enter a message": "Si us plau, introdueix un missatge", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI és un kit avançat de chatbot per als models de xat d'que busca imitar la interfície i funcionalitat de ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Estàs segur que vols esborrar tots els missatges?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Valors més alts com 0,8 faran que la sortida sigui més aleatòria, mentre que valors més baixos com 0,2 la faran més enfocada i determinista." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/ca/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ca/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copiar codi", 3 | "Copied!": "Copiat!", 4 | "Enter file name": "Introdueix el nom de l'arxiu" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ca/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Nou prompt", 3 | "New folder": "Nova carpeta", 4 | "No prompts.": "No hi ha prompts.", 5 | "Search prompts...": "Cerca prompts...", 6 | "Name": "Nom", 7 | "Description": "Descripció", 8 | "A description for your prompt.": "Descripció del teu prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Contingut del missatge. Utilitza {{}} per indicar una variable. Ex: {{nom}} és un {{adjectiu}} {{substantiu}}", 11 | "Save": "Guardar" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ca/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nova carpeta", 3 | "New chat": "Nova conversa", 4 | "No conversations.": "No hi ha converses.", 5 | "Search conversations...": "Cerca converses...", 6 | "API Key": "Clau d'API d'OpenAI", 7 | "Import data": "Importar converses", 8 | "Are you sure?": "Estàs segur?", 9 | "Clear conversations": "Esborrar converses", 10 | "Export data": "Exportar converses", 11 | "Dark mode": "Mode fosc", 12 | "Light mode": "Mode clar" 13 | } 14 | -------------------------------------------------------------------------------- /public/locales/de/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API-Schlüssel erforderlich", 3 | "Please set your API key in the bottom left of the sidebar.": "Bitte trage deinen API-Schlüssel in der linken unteren Ecke der Seitenleiste ein.", 4 | "Stop Generating": "Generieren stoppen", 5 | "Prompt limit is {{maxLength}} characters": "Das Eingabelimit liegt bei {{maxLength}} Zeichen", 6 | "System Prompt": "Systemaufforderung", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Du bist ChatGPT, ein großes Sprachmodell, das von trainiert wurde. Befolge die Anweisungen des Benutzers sorgfältig. Antworte in Markdown-Format.", 8 | "Enter a prompt": "Gib eine Anweisung ein", 9 | "Regenerate response": "Antwort erneut generieren", 10 | "Sorry, there was an error.": "Entschuldigung, es ist ein Fehler aufgetreten.", 11 | "Model": "Modell", 12 | "Conversation": "Konversation", 13 | "OR": "ODER", 14 | "Loading...": "Laden...", 15 | "Type a message...": "Schreibe eine Nachricht...", 16 | "Error fetching models.": "Fehler beim Abrufen der Sprachmodelle.", 17 | "AI": "KI", 18 | "You": "Du", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Stelle sicher, dass dein API-Schlüssel in der unteren linken Ecke der Seitenleiste eingetragen ist.", 22 | "If you completed this step, may be experiencing issues.": "Wenn dies der Fall ist, könnte möglicherweise momentan Probleme haben.", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Das Nachrichtenlimit beträgt {{maxLength}} Zeichen. Du hast bereits {{valueLength}} Zeichen eingegeben.", 25 | "Please enter a message": "Bitte gib eine Nachricht ein", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI ist ein fortschrittliches Chatbot-Toolkit für's Chat-Modelle, das darauf abzielt, die Benutzeroberfläche und Funktionalität von ChatGPT nachzuahmen.", 27 | "Are you sure you want to clear all messages?": "Bist du sicher, dass du alle Nachrichten löschen möchtest?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Höhere Werte wie 0,8 machen die Ausgabe zufälliger, während niedrigere Werte wie 0,2 sie fokussierter und deterministischer machen werden." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/de/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/de/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Code kopieren", 3 | "Copied!": "Kopiert!", 4 | "Enter file name": "Dateinamen eingeben" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/de/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/de/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Dark Mode", 3 | "Light mode": "Light Mode" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/de/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Neuer Ordner", 3 | "New chat": "Neue Konversation", 4 | "No conversations.": "Keine Konversationen.", 5 | "Search conversations...": "Konversationen suchen...", 6 | "API Key": "API-Schlüssel", 7 | "Import data": "Konversationen importieren", 8 | "Are you sure?": "Bist du sicher?", 9 | "Clear conversations": "Konversationen löschen", 10 | "Export data": "Konversationen exportieren" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/en/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/es/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Se requiere la clave de API de", 3 | "Please set your API key in the bottom left of the sidebar.": "Por favor, ingrese su clave de API de en la esquina inferior izquierda de la barra lateral.", 4 | "Stop Generating": "Dejar de generar", 5 | "Prompt limit is {{maxLength}} characters": "El límite del mensaje es de {{maxLength}} caracteres", 6 | "System Prompt": "Mensaje del sistema", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Eres ChatGPT, un modelo de lenguaje grande entrenado por. Sigue las instrucciones del usuario cuidadosamente. Responde usando markdown.", 8 | "Enter a prompt": "Ingrese un mensaje", 9 | "Regenerate response": "Regenerar respuesta", 10 | "Sorry, there was an error.": "Lo sentimos, ha ocurrido un error.", 11 | "Model": "Modelo", 12 | "Conversation": "Conversación", 13 | "OR": "O", 14 | "Loading...": "Cargando...", 15 | "Type a message...": "Escriba un mensaje...", 16 | "Error fetching models.": "Error al obtener los modelos.", 17 | "AI": "IA", 18 | "You": "Tú", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Asegúrate de que hayas ingresado la clave de API de en la esquina inferior izquierda de la barra lateral.", 22 | "If you completed this step, may be experiencing issues.": "Si completaste este paso, podría estar experimentando problemas.", 23 | "click if using a .env.local file": "haz clic si estás utilizando un archivo .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "El límite del mensaje es de {{maxLength}} caracteres. Has ingresado {{valueLength}} caracteres.", 25 | "Please enter a message": "Por favor, ingrese un mensaje", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI es un kit avanzado de chatbot para los modelos de chat de que busca imitar la interfaz y funcionalidad de ChatGPT.", 27 | "Are you sure you want to clear all messages?": "¿Está seguro de que desea borrar todos los mensajes?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Valores más altos como 0,8 harán que la salida sea más aleatoria, mientras que valores más bajos como 0,2 la harán más enfocada y determinista." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/es/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/es/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copiar código", 3 | "Copied!": "¡Copiado!", 4 | "Enter file name": "Ingrese el nombre del archivo" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/es/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Nuevo prompt", 3 | "New folder": "Nueva carpeta", 4 | "No prompts.": "No hay prompts.", 5 | "Search prompts...": "Buscar prompts...", 6 | "Name": "Nombre", 7 | "Description": "Descripción", 8 | "A description for your prompt.": "Descripción de su prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Contenido del prompt. Utilice {{}} para indicar una variable. Ej: {{nombre}} es un {{adjetivo}} {{nombre}}", 11 | "Save": "Guardar" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/es/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Modo oscuro", 3 | "Light mode": "Modo claro" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/es/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nueva carpeta", 3 | "New chat": "Nueva conversación", 4 | "No conversations.": "No hay conversaciones.", 5 | "Search conversations...": "Buscar conversaciones...", 6 | "API Key": "Llave de API de", 7 | "Import data": "Importar conversaciones", 8 | "Are you sure?": "¿Estás seguro?", 9 | "Clear conversations": "Borrar conversaciones", 10 | "Export data": "Exportar conversaciones" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/fi/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API-avain tarvitaan", 3 | "Please set your API key in the bottom left of the sidebar.": "Ole hyvä ja aseta API-avaimesi sivupalkin vasemmassa alareunassa.", 4 | "Stop Generating": "Lopeta generointi", 5 | "Prompt limit is {{maxLength}} characters": "Promptin maksimipituus on {{maxLength}} merkkiä", 6 | "System Prompt": "System prompt", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Sinä olet ChatGPT,:n opettama laaja kielimalli. Seuraa käyttäjän ohjeita tarkasti. Vastaa käyttäen markdownia.", 8 | "Enter a prompt": "Syötä prompti", 9 | "Regenerate response": "Luo vastaus uudelleen", 10 | "Sorry, there was an error.": "Valitettavasti tapahtui virhe.", 11 | "Model": "Malli", 12 | "Conversation": "Keskustelu", 13 | "OR": "TAI", 14 | "Loading...": "Ladataan...", 15 | "Type a message...": "Kirjoita viesti...", 16 | "Type a message or type \"/\" to select a prompt...": "Kirjoita viesti tai \"/\" valitaksesi promptin...", 17 | "Error fetching models.": "Virhe malleja haettaessa.", 18 | "AI": "AI", 19 | "You": "Sinä", 20 | "Cancel": "Peruuta", 21 | "Save & Submit": "Tallenna & Lähetä", 22 | "Make sure your API key is set in the bottom left of the sidebar.": "Varmista että API-avaimesi on asetettu sivupalkin vasemmassa alareunassa.", 23 | "If you completed this step, may be experiencing issues.": "Jos olet suorittanut tämän kohdan,:lla saattaa olla tällä hetkellä ongelmia.", 24 | "click if using a .env.local file": "klikkaa jos käytät .env.local-tiedostoa", 25 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Viestin maksimipituus on {{maxLength}} merkkiä. Olet käyttänyt {{valueLength}} merkkiä.", 26 | "Please enter a message": "Ole hyvä ja syötä viesti", 27 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI on:n keskustelumalleille tarkoitettu käyttöliittymä joka pyrkii jäljittelemään ChatGPT:n käyttöliittymää ja toiminnallisuuksia.", 28 | "Are you sure you want to clear all messages?": "Haluatko varmasti poistaa kaikki viestit?", 29 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Suuremmat arvot kuten 0.8 tekevät vastauksista satunnaisempia, kun taas pienemmät arvot kuten 0.2 tekevät niistä keskittyneempiä ja johdonmukaisempia.", 30 | "Precise": "Tarkka", 31 | "Neutral": "Neutraali", 32 | "Creative": "Luova", 33 | "View Account Usage": "Näytä tilin käyttötilastot", 34 | "Search...": "Hae..." 35 | } 36 | -------------------------------------------------------------------------------- /public/locales/fi/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/fi/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Kopioi koodi", 3 | "Copied!": "Kopioitu!", 4 | "Enter file name": "Syötä tiedostonimi" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/fi/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Uusi prompt", 3 | "New folder": "Uusi kansio", 4 | "No prompts.": "Ei prompteja.", 5 | "Search prompts...": "Hae prompteista...", 6 | "Name": "Nimi", 7 | "Description": "Kuvaus", 8 | "A description for your prompt.": "Promptisi kuvaus.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Promptin sisältö. Käytä {{}} muuttujien merkitsemiseen. Esim: {{nimi}} on {{adjektiivi}} {{substantiivi}}", 11 | "Save": "Tallenna" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/fi/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Settings": "Asetukset", 3 | "Theme": "Teema", 4 | "Dark mode": "Tumma teema", 5 | "Light mode": "Vaalea teema", 6 | "Save": "Tallenna" 7 | } 8 | -------------------------------------------------------------------------------- /public/locales/fi/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Uusi kansio", 3 | "New chat": "Uusi keskustelu", 4 | "No conversations.": "Ei keskusteluja.", 5 | "Search conversations...": "Hae keskusteluista...", 6 | "API Key": "API-avain", 7 | "Import data": "Tuo keskusteluita", 8 | "Are you sure?": "Oletko varma?", 9 | "Clear conversations": "Tyhjennä keskustelut", 10 | "Export data": "Vie keskustelut", 11 | "Settings": "Asetukset", 12 | "Plugin Keys": "Plugin-avaimet" 13 | } 14 | -------------------------------------------------------------------------------- /public/locales/fr/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Clé API requise", 3 | "Please set your API key in the bottom left of the sidebar.": "Veuillez saisir votre clé API dans le coin inférieur gauche de la barre latérale.", 4 | "Stop Generating": "Interrompre la génération", 5 | "Prompt limit is {{maxLength}} characters": "La limite du prompt est de {{maxLength}} caractères", 6 | "System Prompt": "Prompt du système", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Vous êtes ChatGPT, un grand modèle linguistique entraîné par. Suivez attentivement les instructions de l'utilisateur. Répondez en utilisant Markdown.", 8 | "Enter a prompt": "Entrez un prompt", 9 | "Regenerate response": "Régénérer la réponse", 10 | "Sorry, there was an error.": "Désolé, une erreur est survenue.", 11 | "Model": "Modèle", 12 | "Conversation": "Conversation", 13 | "OR": "OU", 14 | "Loading...": "Chargement...", 15 | "Type a message...": "Tapez un message...", 16 | "Error fetching models.": "Erreur lors de la récupération des modèles.", 17 | "AI": "IA", 18 | "You": "Vous", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Assurez-vous que votre clé API est définie dans le coin inférieur gauche de la barre latérale.", 22 | "If you completed this step, may be experiencing issues.": "Si vous avez effectué cette étape, peut rencontrer des problèmes.", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "La limite de message est de {{maxLength}} caractères. Vous avez saisi {{valueLength}} caractères.", 25 | "Please enter a message": "Veuillez entrer un message", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI est un kit de chatbot avancé pour les modèles de chat d'visant à imiter l'interface et les fonctionnalités de ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Êtes-vous sûr de vouloir effacer tous les messages ?" 28 | } 29 | -------------------------------------------------------------------------------- /public/locales/fr/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/fr/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copier le code", 3 | "Copied!": "Copié !", 4 | "Enter file name": "Entrez le nom du fichier" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/fr/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/fr/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Mode sombre", 3 | "Light mode": "Mode clair" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/fr/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nouveau dossier", 3 | "New chat": "Nouvelle discussion", 4 | "No conversations.": "Aucune conversation.", 5 | "Search conversations...": "Rechercher des conversations...", 6 | "API Key": "Clé API", 7 | "Import data": "Importer des conversations", 8 | "Are you sure?": "Êtes-vous sûr ?", 9 | "Clear conversations": "Effacer les conversations", 10 | "Export data": "Exporter les conversations" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/he/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "מפתח API", 3 | "Please set your API key in the bottom left of the sidebar.": "עליך להזין את המפתח האישי שלך בצידו השמאלי התחתון של תפריט הניווט.", 4 | "Stop Generating": "עצור תהליך הפקת התשובה", 5 | "Prompt limit is {{maxLength}} characters": "אורך התשובה מוגבל ל {{maxLength}} תווים", 6 | "System Prompt": "הגדרת בסיס לכל תשובה של המערכת", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "You are Hebrew speaking ChatGPT, a large language model trained by which responds in Hebrew to any question or User comment. Follow the user's instructions carefully. Respond in Hebrew using markdown.", 8 | "Enter a prompt": "הקלד הודעה", 9 | "Regenerate response": "הפק תשובה מחדש", 10 | "Sorry, there was an error.": "התנצלותנו הכנה, המערכת מדווחת על תקלה", 11 | "Model": "מודל", 12 | "Conversation": "שיחה", 13 | "OR": "או", 14 | "Loading...": "טוען...", 15 | "Type a message...": "הקלד הודעתך...", 16 | "Error fetching models.": "תקלה באיחזור רשימת המודלים", 17 | "AI": "המערכת", 18 | "You": "אתה", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "עליך לוודא שמפתח האישי שלך מוזן בתפריט מצד שמאל", 22 | "If you completed this step, may be experiencing issues.": "אם טרם השלמת חלק זה יש סבירות גבוהה להתרחשות תקלה", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "מגבלת תווים היא {{maxLength}}. אתה הקלדת עד עכשיו {{valueLength}} תווים.", 25 | "Please enter a message": "הקלד את הודעתך", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "מערכת הצאטבוט היא ערכה מתקדמת לניהול שיחה המכוונת לחקות את המראה והפונקציונאלית של ChatGPT", 27 | "Are you sure you want to clear all messages?": "האם אתה בטוח שברצונך למחוק את כל ההודעות?" 28 | } 29 | -------------------------------------------------------------------------------- /public/locales/he/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/he/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "העתק קוד", 3 | "Copied!": "נשמר בזכרון", 4 | "Enter file name": "הקלד שם לקובץ" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/he/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "פקודת מכונה חדשה", 3 | "New folder": "תיקיה חדשה", 4 | "No prompts.": "לא נמצאו פקודות מכונות", 5 | "Search prompts...": "חיפוש פקודות...", 6 | "Name": "שם", 7 | "Description": "תיאור", 8 | "A description for your prompt.": "תיאור שורת הפקודה למכונה", 9 | "Prompt": "פקודה", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "תיאור הפקודה. השתמש {{}} להגדרת משתנים. לדוגמא {{שם משתנה}} הוא {{תואר}} {{שם עצם}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/he/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "מצב כהה", 3 | "Light mode": "מצב בהיר" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/he/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "תיקיה חדשה", 3 | "New chat": "שיחה חדשה", 4 | "No conversations.": "אין שיחות חדשות", 5 | "Search conversations...": "חיפוש שיחות...", 6 | "API Key": "מפתח אישי ל", 7 | "Import data": "ייבוא שיחות", 8 | "Are you sure?": "אתה בטוח?", 9 | "Clear conversations": "ניקוי שיחות", 10 | "Export data": "ייצוא שיחות" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/id/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Memerlukan Kunci API", 3 | "Please set your API key in the bottom left of the sidebar.": "Silakan atur kunci API Anda di bagian kiri bawah bilah sisi.", 4 | "Stop Generating": "Berhenti Menghasilkan", 5 | "Prompt limit is {{maxLength}} characters": "Batas karakter untuk prompt adalah {{maxLength}} karakter", 6 | "System Prompt": "Prompt Sistem", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Anda adalah ChatGPT, model bahasa besar yang dilatih oleh. Ikuti instruksi pengguna dengan hati-hati. Balas menggunakan markdown.", 8 | "Enter a prompt": "Masukkan sebuah prompt", 9 | "Regenerate response": "Hasilkan kembali respons", 10 | "Sorry, there was an error.": "Maaf, terjadi kesalahan.", 11 | "Model": "Model", 12 | "Conversation": "Percakapan", 13 | "OR": "ATAU", 14 | "Loading...": "Memuat...", 15 | "Type a message...": "Ketik sebuah pesan...", 16 | "Error fetching models.": "Kesalahan dalam mengambil model.", 17 | "AI": "AI", 18 | "You": "Anda", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Pastikan kunci API Anda diatur di bagian kiri bawah bilah sisi.", 22 | "If you completed this step, may be experiencing issues.": "Jika Anda telah menyelesaikan langkah ini, mungkin mengalami masalah.", 23 | "click if using a .env.local file": "klik jika menggunakan file .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Batas karakter untuk pesan adalah {{maxLength}} karakter. Anda telah memasukkan {{valueLength}} karakter.", 25 | "Please enter a message": "Silakan masukkan sebuah pesan", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI adalah kit chatbot canggih untuk model obrolan yang bertujuan meniru antarmuka dan fungsionalitas ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Apakah Anda yakin ingin menghapus semua pesan?" 28 | } 29 | -------------------------------------------------------------------------------- /public/locales/id/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/id/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Salin kode", 3 | "Copied!": "Kode disalin!", 4 | "Enter file name": "Masukkan nama file" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/id/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/id/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Mode gelap", 3 | "Light mode": "Mode terang" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/id/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Folder baru", 3 | "New chat": "Percakapan baru", 4 | "No conversations.": "Tidak ada percakapan.", 5 | "Search conversations...": "Cari percakapan...", 6 | "API Key": "Kunci API", 7 | "Import data": "Impor percakapan", 8 | "Are you sure?": "Apakah Anda yakin?", 9 | "Clear conversations": "Hapus percakapan", 10 | "Export data": "Ekspor percakapan" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/it/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "E' richiesta la chiave API", 3 | "Please set your API key in the bottom left of the sidebar.": "Per favore, inserisci la tua Chiave API in basso a sinistra nella barra laterale", 4 | "Stop Generating": "Interrompi la generazione", 5 | "Prompt limit is {{maxLength}} characters": "Il limite del messaggio è di {{maxLength}} caratteri", 6 | "System Prompt": "Prompt del sistema", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Sei ChatGPT, un grande modello di linguaggio addestrato da. Segui attentamente le istruzioni dell'utente. Rispondi usando il markdown.", 8 | "Enter a prompt": "Inserisci un prompt", 9 | "Regenerate response": "Rigenera risposta", 10 | "Sorry, there was an error.": "Scusa, si è verificato un errore.", 11 | "Model": "Modello", 12 | "Conversation": "Conversazione", 13 | "OR": "O", 14 | "Loading...": "Caricamento...", 15 | "Type a message...": "Digita un messaggio...", 16 | "Error fetching models.": "Si è verificato un errore nel recupero dei modelli.", 17 | "AI": "IA", 18 | "You": "Tu", 19 | "Cancel": "Annulla", 20 | "Save & Submit": "Salva e invia", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Assicurati che la tua chiave API sia inserita in basso a sinistra nella barra laterale", 22 | "If you completed this step, may be experiencing issues.": "Se hai completato questo passaggio, potrebbe avere problemi.", 23 | "click if using a .env.local file": "Fai click se stai utilizzando un file .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Il limite del messaggio è di {{maxLength}} caratteri. Hai inserito {{valueLength}} caratteri.", 25 | "Please enter a message": "Per favore, scrivi un messaggio", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI è un kit avanzato di chatbot per i modelli di chat di che mira a imitare l'interfaccia e le funzionalità di ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Sei sicuro di voler cancellare tutti i messaggi?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Valori più alti come 0,8 renderanno l'output più casuale, mentre valori più bassi come 0,2 lo renderanno più focalizzato e deterministico." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/it/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/it/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copia codice", 3 | "Copied!": "Copiato!", 4 | "Enter file name": "Inserisci il nome del file" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/it/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Nuovo prompt", 3 | "New folder": "Nuova cartella", 4 | "No prompts.": "Nessun prompt.", 5 | "Search prompts...": "Cerca prompts...", 6 | "Name": "Nome", 7 | "Description": "Descrizione", 8 | "A description for your prompt.": "Descrizione del tuo prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Contenuto del prompt. Utilizza {{}} per indicare una variabile. Per esempio: {{nome}} è un {{aggettivo}} {{sostantivo}}", 11 | "Save": "Salva" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/it/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Modalità scura", 3 | "Light mode": "Modalità chiara" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/it/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nuova cartella", 3 | "New chat": "Nuova conversazione", 4 | "No conversations.": "Nessuna conversazione.", 5 | "Search conversations...": "Cerca conversazioni...", 6 | "API Key": "Chiave API", 7 | "Import data": "Importa dati", 8 | "Are you sure?": "Sei sicuro?", 9 | "Clear conversations": "Elimina conversazioni", 10 | "Export data": "Esporta dati" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/ja/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "OpenAIのAPIキーが必要です", 3 | "Please set your API key in the bottom left of the sidebar.": "左下のサイドバーでOpenAIのAPIキーを設定してください", 4 | "Stop Generating": "回答をストップ", 5 | "Prompt limit is {{maxLength}} characters": "プロンプトの文字数は{{maxLength}}文字までです", 6 | "System Prompt": "システムのプロンプト", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "あなたはOpenAIによってトレーニングされた大規模言語モデルのChatGPTです。ユーザーの指示には注意深く従ってください。マークダウンを使用して応答してください。", 8 | "Enter a prompt": "プロンプトを入力してください", 9 | "Regenerate response": "もう一度回答する", 10 | "Sorry, there was an error.": "すみません、エラーが発生しました。", 11 | "Model": "モデル", 12 | "Conversation": "会話", 13 | "OR": "または", 14 | "Loading...": "読み込み中...", 15 | "Type a message...": "メッセージを入力...", 16 | "Error fetching models.": "モデルの取得中にエラーが発生しました。", 17 | "AI": "AI", 18 | "You": "あなた", 19 | "Cancel": "キャンセル", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "OpenAIのAPIキーがサイドバーの左下に設定されていることを確認してください。", 22 | "If you completed this step, may be experiencing issues.": "このステップを完了した場合、OpenAIに問題が発生している可能性があります。", 23 | "click if using a .env.local file": "もし.env.localファイルを使用している場合はこちらをクリックしてください", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "メッセージの文字数は{{maxLength}}文字までです。あなたは{{valueLength}}文字を入力しました。", 25 | "Please enter a message": "メッセージを入力してください", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UIは、ChatGPTと同様のインターフェイスと機能を実現するための、チャットボットキットです。", 27 | "Are you sure you want to clear all messages?": "すべてのメッセージを削除してもよろしいですか?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "0.8のような高い値は出力をよりランダムにし、0.2のような低い値はより焦点を絞り、決定論的にします。" 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/ja/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ja/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "コードをコピー", 3 | "Copied!": "コピーしました!", 4 | "Enter file name": "ファイル名を入力" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ja/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "新しいプロンプト", 3 | "New folder": "新しいフォルダ", 4 | "No prompts.": "プロンプトはありません", 5 | "Search prompts...": "プロンプトの検索...", 6 | "Name": "名前", 7 | "Description": "説明", 8 | "A description for your prompt.": "プロンプトの説明", 9 | "Prompt": "プロンプト", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "プロンプトの内容。変数を表すには {{}} を使ってください。 例: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "保存" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ja/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Settings": "設定", 3 | "Theme": "テーマ", 4 | "Save": "保存", 5 | "Dark mode": "ダークモード", 6 | "Light mode": "ライトモード" 7 | } 8 | -------------------------------------------------------------------------------- /public/locales/ja/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "新規フォルダ", 3 | "New chat": "新規チャット", 4 | "No conversations.": "会話履歴はありません。", 5 | "Search conversations...": "会話を検索...", 6 | "API Key": "APIキー", 7 | "Import data": "会話履歴をインポート", 8 | "Are you sure?": "よろしいですか?", 9 | "Clear conversations": " 会話をクリア", 10 | "Export data": "会話履歴をエクスポート", 11 | "Dark mode": "ダークモード", 12 | "Light mode": "ライトモード", 13 | "Settings": "設定" 14 | } 15 | -------------------------------------------------------------------------------- /public/locales/ko/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API 키가 필요합니다", 3 | "Please set your API key in the bottom left of the sidebar.": "사이드바 왼쪽 하단에 API 키를 설정하세요.", 4 | "Stop Generating": "생성 중지", 5 | "Prompt limit is {{maxLength}} characters": "프롬프트 제한은 {{maxLength}}자입니다", 6 | "System Prompt": "시스템 프롬트", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "당신은에서 훈련된 대규모 언어 모델 ChatGPT입니다. 사용자의 지시를 주의해서 따르세요. 마크다운을 사용하여 응답하세요.", 8 | "Enter a prompt": "프롬프트를 입력하세요", 9 | "Regenerate response": "응답 재생성", 10 | "Sorry, there was an error.": "죄송합니다, 오류가 발생했습니다.", 11 | "Model": "모델", 12 | "Conversation": "대화", 13 | "OR": "또는", 14 | "Loading...": "로드 중...", 15 | "Type a message...": "메시지를 입력하세요...", 16 | "Error fetching models.": "모델을 가져오는 중 오류가 발생했습니다.", 17 | "AI": "인공지능", 18 | "You": "당신", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "API 키가 사이드바 왼쪽 하단에 설정되어 있는지 확인하세요.", 22 | "If you completed this step, may be experiencing issues.": "이 단계를 완료한 경우에 문제가 있을 수도 있습니다.", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "메시지 제한은 {{maxLength}}자입니다. {{valueLength}}자를 입력했습니다.", 25 | "Please enter a message": "메시지를 입력하세요", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI는 ChatGPT의 인터페이스와 기능을 모방하는 것을 목표로 둔의 채팅 모델들을 위한 고급 챗봇 키트입니다.", 27 | "Are you sure you want to clear all messages?": "모든 메시지를 지우시겠습니까?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "0.8과 같은 높은 값은 출력을 더 무작위로 만들고, 0.2와 같은 낮은 값은 더 집중적이고 결정론적으로 만들어줍니다." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/ko/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ko/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "코드 복사", 3 | "Copied!": "복사 완료!", 4 | "Enter file name": "파일 이름을 입력하세요" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ko/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ko/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "다크 모드", 3 | "Light mode": "라이트 모드" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/ko/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "새 폴더", 3 | "New chat": "새 채팅", 4 | "No conversations.": "대화가 없습니다.", 5 | "Search conversations...": "대화 검색...", 6 | "API Key": "API 키", 7 | "Import data": "대화 가져오기", 8 | "Are you sure?": "확실합니까?", 9 | "Clear conversations": "대화 지우기", 10 | "Export data": "대화 내보내기" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/pl/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Klucz do API jest wymagany", 3 | "Please set your API key in the bottom left of the sidebar.": "Proszę wprowadzić swój klucz do API na pasku bocznym w lewym dolnym rogu", 4 | "Stop Generating": "Zatrzymaj generowanie", 5 | "Prompt limit is {{maxLength}} characters": "Limit prompta wynosi {{maxLength}} znaków", 6 | "System Prompt": "Prompt systemowy", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Jesteś ChatGPT, duży model językowy wytrenowany przez. Postępuj zgodnie z instrukcjami użytkownika. Odpowiedz za pomocą formatu markdown.", 8 | "Enter a prompt": "Wprowadź prompt", 9 | "Regenerate response": "Wygeneruj odpowiedź", 10 | "Sorry, there was an error.": "Przepraszam, wystąpił błąd.", 11 | "Model": "Model", 12 | "Conversation": "Rozmowa", 13 | "OR": "LUB", 14 | "Loading...": "Ładowanie...", 15 | "Type a message...": "Napisz wiadomość...", 16 | "Error fetching models.": "Błąd podczas pobierania modelu", 17 | "AI": "SI", 18 | "You": "Ty", 19 | "Cancel": "Anuluj", 20 | "Save & Submit": "Zapisz i wyślij", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Upewnij się, że wprowadziłeś swój klucz do API na pasku bocznym w lewym dolnym rogu", 22 | "If you completed this step, may be experiencing issues.": "Jeśli wykonałeś ten krok to oznacza, że mogą występować problemy po stronie.", 23 | "click if using a .env.local file": "kliknij jeśli używasz pliku .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Limit wiadomości wynosi {{maxLength}} znaków. Wprowadziłeś {{valueLength}} znaków.", 25 | "Please enter a message": "Proszę wpisać swoją wiadomość", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI to zaawansowane narzędzie chatbotów dla modeli czatów od, którego celem jest naśladowanie interfejsu i funkcjonalności ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Czy na pewno chcesz usunąć wszystkie wiadomości?" 28 | } 29 | -------------------------------------------------------------------------------- /public/locales/pl/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/pl/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Skopiuj kod", 3 | "Copied!": "Skopiowany", 4 | "Enter file name": "Wprowadź nazwę pliku" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/pl/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Nowy prompt", 3 | "New folder": "Nowy folder", 4 | "No prompts.": "Brak promptów.", 5 | "Search prompts...": "Szukaj promptów...", 6 | "Name": "Nazwa", 7 | "Description": "Opis", 8 | "A description for your prompt.": "Opis Twojego prompta.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Zawartość prompta. Użyj {{}} żeby oznaczyć zmienną. Np.: {{nazwa}} jest {{przymiotnik}} {{rzeczownik}}", 11 | "Save": "Zapisz" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/pl/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Tryb ciemny", 3 | "Light mode": "Tryb jasny" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/pl/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nowy folder", 3 | "New chat": "Nowy chat", 4 | "No conversations.": "Brak rozmów.", 5 | "Search conversations...": "Szukaj rozmów...", 6 | "API Key": "Klucz do API", 7 | "Import data": "Import rozmów", 8 | "Are you sure?": "Czy jesteś pewien?", 9 | "Clear conversations": "Usuń rozmowy", 10 | "Export data": "Eksport rozmów" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/pt/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "A API Key da é necessária", 3 | "Please set your API key in the bottom left of the sidebar.": "Por favor, insira sua API Key da no canto inferior esquerdo da barra lateral.", 4 | "Stop Generating": "Parar de gerar", 5 | "Prompt limit is {{maxLength}} characters": "O limite da mensagem é de {{maxLength}} caracteres", 6 | "System Prompt": "Mensagem do sistema", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Você é o ChatGPT, um grande modelo de linguagem treinado pela. Siga as instruções do usuário cuidadosamente. Responda usando markdown.", 8 | "Enter a prompt": "Insira uma mensagem", 9 | "Regenerate response": "Gerar resposta novamente", 10 | "Sorry, there was an error.": "Desculpe, ocorreu um erro.", 11 | "Model": "Modelo", 12 | "Conversation": "Conversação", 13 | "OR": "Ou", 14 | "Loading...": "Carregando...", 15 | "Type a message...": "Escreva uma mensagem...", 16 | "Error fetching models.": "Erro ao buscar os modelos.", 17 | "AI": "IA", 18 | "You": "Você", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Certifique-se de que sua API Key da esteja definida na parte inferior esquerda da barra lateral.", 22 | "If you completed this step, may be experiencing issues.": "Se você concluiu esta etapa, o pode estar com problemas.", 23 | "click if using a .env.local file": "clique se estiver usando um arquivo .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "O limite de mensagens é de {{maxLength}} caracteres. Você inseriu {{valueLength}} caracteres", 25 | "Please enter a message": "Por favor, insira uma mensagem", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI é um kit de chatbot avançado para os modelos de chat do com o objetivo de imitar a interface e a funcionalidade do ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Tem certeza de que deseja limpar todas as mensagens?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Valores mais altos como 0,8 tornarão a saída mais aleatória, enquanto valores mais baixos como 0,2 a tornarão mais focada e determinística." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/pt/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/pt/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copiar código", 3 | "Copied!": "Copiado!", 4 | "Enter file name": "Insira o nome do arquivo" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/pt/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/pt/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Modo escuro", 3 | "Light mode": "Modo claro" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/pt/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Nova pasta", 3 | "New chat": "Novo chat", 4 | "No conversations.": "Não há conversas.", 5 | "Search conversations...": "Buscar conversas...", 6 | "API Key": "API Key da", 7 | "Import data": "Importar conversas", 8 | "Are you sure?": "Tem certeza?", 9 | "Clear conversations": "Apagar conversas", 10 | "Export data": "Exportar conversas" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/ro/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Este necesară cheia API", 3 | "Please set your API key in the bottom left of the sidebar.": "Introduceți cheia API în partea stângă jos a barei laterale", 4 | "Stop Generating": "Nu mai generați", 5 | "Prompt limit is {{maxLength}} characters": "Limita mesajelor este de {{maxLength}} caractere", 6 | "System Prompt": "Solicitări de sistem", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Sunteți ChatGPT, un model de limbă mare antrenat de. Urmați cu atenție instrucțiunile de utilizare. Vă rugăm să răspundeți folosind markdown.", 8 | "Enter a prompt": "Introdu o cerere", 9 | "Regenerate response": "Regenerați răspunsul", 10 | "Sorry, there was an error.": "Scuze, a aparut o eroare.", 11 | "Model": "Model", 12 | "Conversation": "Conversaţie", 13 | "OR": "SAU", 14 | "Loading...": "Se încarcă...", 15 | "Type a message...": "Scrie un mesaj...", 16 | "Error fetching models.": "A apărut o eroare la preluarea șabloanelor.", 17 | "AI": "IA", 18 | "You": "Tu", 19 | "Cancel": "Anulare", 20 | "Save & Submit": "Salvați și trimiteți", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Asigurați-vă că cheia dvs. API este introdusă în partea stângă jos a barei laterale", 22 | "If you completed this step, may be experiencing issues.": "Dacă ați parcurs acest pas, poate întâmpina probleme.", 23 | "click if using a .env.local file": "Faceți clic dacă utilizați un fișier .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Limita mesajelor este de {{maxLength}} caractere. Ați introdus {{valueLength}} caractere.", 25 | "Please enter a message": "Vă rugăm să scrieți un mesaj", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI este un kit de chatbot avansat pentru șabloanele de chat, care își propune să imite interfața și funcționalitatea ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Sigur doriți să ștergeți toate mesajele?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Valori mai mari, cum ar fi 0,8, vor face ieșirea mai aleatorie, în timp ce valori mai mici, cum ar fi 0,2, o vor face mai concentrată și deterministă." 29 | 30 | } 31 | -------------------------------------------------------------------------------- /public/locales/ro/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ro/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Copiați codul", 3 | "Copied!": "Copiat!", 4 | "Enter file name": "Introduceți numele fișierului" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ro/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Noua solicitare", 3 | "New folder": "Dosar nou", 4 | "No prompts.": "Fără solicitări.", 5 | "Search prompts...": "Cereri de căutare...", 6 | "Name": "Nume", 7 | "Description": "Descriere", 8 | "A description for your prompt.": "Descrierea solicitării prompt.", 9 | "Prompt": "Îndemnuri", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Conținut prompt. Utilizați {{}} pentru a indica o variabilă. De exemplu: {{nume}} este un {{adjectiv}} {{substantiv}}", 11 | "Save": "Salvați" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ro/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Modul întunecat", 3 | "Light mode": "Modul de golire" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/ro/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Folder nou", 3 | "New chat": "Conversație nouă", 4 | "No conversations.": "Nicio conversație.", 5 | "Search conversations...": "Căutați conversații...", 6 | "API Key": "Cheia API", 7 | "Import data": "Importați conversații", 8 | "Are you sure?": "Esti sigur?", 9 | "Clear conversations": "Ștergeți conversațiile", 10 | "Export data": "Exportați conversații" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/ru/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Необходим ключ", 3 | "Please set your API key in the bottom left of the sidebar.": "Пожалуйста введите API-ключ в левом нижнем углу", 4 | "Stop Generating": "Прекратить", 5 | "Prompt limit is {{maxLength}} characters": "Лимит сообщения на символы: {{maxLength}} символов", 6 | "System Prompt": "Системное сообщение", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Вы ChatGPT, большая языковая модель, созданная компанией. Следуйте инструкциям пользователя. Отвечайте на сообщения, используя Markdown", 8 | "Enter a prompt": "Введите сообщение", 9 | "Regenerate response": "Перегенерировать сообщение", 10 | "Sorry, there was an error.": "Просим прощения, произошла ошибка", 11 | "Model": "Модель", 12 | "Conversation": "Чат", 13 | "OR": "ИЛИ", 14 | "Loading...": "Пожалуйста подождите...", 15 | "Type a message...": "Введите сообщение...", 16 | "Error fetching models.": "Ошибка при получении списка моделей", 17 | "AI": "Бот", 18 | "You": "Вы", 19 | "Cancel": "Отмена", 20 | "Save & Submit": "Отредактировать", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Убедитесь, что вы ввели API-ключ.", 22 | "If you completed this step, may be experiencing issues.": "Если вы выполнили этот шаг, то возможно может испытывать проблемы", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Лимит сообщения: {{maxLength}} символов. Вы ввели {{valueLength}} символов.", 25 | "Please enter a message": "Пожалуйста введите сообщение", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI - продвинутый интерфейс чатбота для чат-моделей, имитирующий интерфейс ChatGPT", 27 | "Are you sure you want to clear all messages?": "Вы уверены, что хотите удалить все сообщения?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Более высокие значения, такие как 0,8, сделают вывод более случайным, в то время как более низкие значения, например, 0,2, сделают его более фокусированным и детерминированным." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/ru/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/ru/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Скопировать", 3 | "Copied!": "Скопировано!", 4 | "Enter file name": "Введите имя файла для загрузки" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/ru/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/ru/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Темный режим", 3 | "Light mode": "Светлый режим" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/ru/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Новая папка", 3 | "New chat": "Новый чат", 4 | "No conversations.": "Нет чатов.", 5 | "Search conversations...": "Поиск чатов...", 6 | "API Key": "API-ключ", 7 | "Import data": "Импортировать чаты", 8 | "Are you sure?": "Вы уверены?", 9 | "Clear conversations": "Удалить чаты", 10 | "Export data": "Экспортировать чаты" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/si/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API යතුර අවශ්‍යයි", 3 | "Please set your API key in the bottom left of the sidebar.": "කරුණාකර ඔබේ API යතුර පැති තීරුවේ පහළ වම්පසින් සකසන්න.", 4 | "Stop Generating": "උත්පාදනය නවත්වන්න", 5 | "Prompt limit is {{maxLength}} characters": "වචන සීමාව අනුලකුණු {{maxLength}} කි", 6 | "System Prompt": "පද්ධති ඉඟිය", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "ඔබ ChatGPT, විසින් පුහුණු කරන ලද විශාල භාෂා ආකෘතියකි. පරිශීලක උපදෙස් ප්රවේශමෙන් අනුගමනය කරන්න. මාර්ක්ඩවුන් භාවිතයෙන් ප්‍රතිචාර දක්වන්න.", 8 | "Enter a prompt": "ප්‍රේරකයක් ඇතුළු කරන්න", 9 | "Regenerate response": "ප්‍රතිචාරය පුනර්ජනනය කරන්න", 10 | "Sorry, there was an error.": "සමාවන්න, දෝෂයක් ඇති විය.", 11 | "Model": "ආකෘතිය", 12 | "Conversation": "සංවාදය", 13 | "OR": "හෝ", 14 | "Loading...": "පූරණය වෙමින්...", 15 | "Type a message...": "පණිවිඩයක් ටයිප් කරන්න...", 16 | "Error fetching models.": "ආකෘති ලබා ගැනීමේ දෝෂයකි.", 17 | "AI": "AI", 18 | "You": "ඔබ", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "ඔබේ API යතුර පැති තීරුවේ පහළ වම්පස සකසා ඇති බවට වග බලා ගන්න.", 22 | "If you completed this step, may be experiencing issues.": "ඔබ මෙම පියවර සම්පූර්ණ කළේ නම්, හි ගැටලුවක් විය හැකිය.", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "පණිවිඩ සීමාව අකුරු {{maxLength}} කි. ඔබ අක්ෂර {{valueLength}} ඇතුළත් කර ඇත.।", 25 | "Please enter a message": "කරුණාකර පණිවිඩයක් ඇතුළු කරන්න", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI යනු ChatGPT හි අතුරු මුහුණත සහ ක්‍රියාකාරීත්වය අනුකරණය කිරීම අරමුණු කරගත් හි චැට් මාදිලි සඳහා වන උසස් චැට්බෝට් කට්ටලයකි.", 27 | "Are you sure you want to clear all messages?": "ඔබට සියලු පණිවිඩ හිස් කිරීමට අවශ්‍ය බව විශ්වාසද?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "0.8 ආකෘතිය ඉහළට පිරිමිතුරු වර්ණයෙන් තිබේ විය යුතුය, නමුත් 0.2 ආකෘතිය අවම වශයෙන් එය විශේෂිත හා නිර්ණායක වනු ඇත." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/si/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/si/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "කේතය පිටපත් කරන්න", 3 | "Copied!": "පිටපත් කළා!", 4 | "Enter file name": "ගොනු නාමය ඇතුළත් කරන්න" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/si/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/si/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "අඳුරු මාදිලිය", 3 | "Light mode": "ආලෝක මාදිලිය" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/si/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "නව ෆෝල්ඩරය", 3 | "New chat": "නව සංවාදයක්", 4 | "No conversations.": "සංවාද නැත.", 5 | "Search conversations...": "සංවාද සොයන්න...", 6 | "API Key": "API යතුර", 7 | "Import data": "සංවාද ආයාත කරන්න", 8 | "Are you sure?": "ඔබට විශ්වාස ද?", 9 | "Clear conversations": "සංවාද මකන්න", 10 | "Export data": "සංවාද නිර්යාත කරන්න" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/sv/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API-nyckel krävs", 3 | "Please set your API key in the bottom left of the sidebar.": "Vänligen ange din API-nyckel längst ner till vänster i sidofältet.", 4 | "Stop Generating": "Sluta generera", 5 | "Prompt limit is {{maxLength}} characters": "Din prompt kan inte ha fler än {{maxLength}} tecken", 6 | "System Prompt": "System prompt", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Du är ChatGPT, en stor språkmodell tränad av. Följ användarens instruktioner noggrant. Svara genom att använda markdown.", 8 | "Enter a prompt": "Ange en prompt", 9 | "Regenerate response": "Återskapa svar", 10 | "Sorry, there was an error.": "Ursäkta, det uppstod ett fel.", 11 | "Model": "Modell", 12 | "Conversation": "Konversation", 13 | "OR": "ELLER", 14 | "Loading...": "Laddar...", 15 | "Type a message...": "Skriv ett meddelande...", 16 | "Error fetching models.": "Det gick inte att hämta modeller.", 17 | "AI": "AI", 18 | "You": "Du", 19 | "Cancel": "Avbryt", 20 | "Save & Submit": "Spara & Skicka", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Se till att du har angett din API-nyckel längst ner till vänster i sidofältet.", 22 | "If you completed this step, may be experiencing issues.": "Om du slutförde det här steget kan ha problem.", 23 | "click if using a .env.local file": "klicka om du använder en .env.local-fil", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Meddelandegränsen är {{maxLength}} tecken. Du har angett {{valueLength}} tecken.", 25 | "Please enter a message": "Vänligen ange ett meddelande", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI är ett avancerat chatbot-kit för:s chattmodeller som syftar till att efterlikna ChatGPT:s gränssnitt och funktionalitet.", 27 | "Are you sure you want to clear all messages?": "Är du säker på att du vill rensa alla meddelanden?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Högre värden som 0,8 kommer att göra utdata mer slumpmässig, medan lägre värden som 0,2 kommer att göra den mer fokuserad och deterministisk." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/sv/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/sv/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Kopiera kod", 3 | "Copied!": "Kopierad!", 4 | "Enter file name": "Ange filnamn" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/sv/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Ny prompt", 3 | "New folder": "Ny mapp", 4 | "No prompts.": "Inga prompts.", 5 | "Search prompts...": "Sök prompts...", 6 | "Name": "Namn", 7 | "Description": "Beskrivning", 8 | "A description for your prompt.": "En beskrivning för din prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt-innehåll. Använd {{}} för att beteckna en variabel. Ex: {{namn}} är ett {{adjektiv}} {{substantiv}}", 11 | "Save": "Spara" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/sv/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Mörkt läge", 3 | "Light mode": "Ljust läge" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/sv/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Ny mapp", 3 | "New chat": "Ny chatt", 4 | "No conversations.": "Inga konversationer.", 5 | "Search conversations...": "Sök konversationer...", 6 | "API Key": "API-nyckel", 7 | "Import data": "Importera konversationer", 8 | "Are you sure?": "Är du säker?", 9 | "Clear conversations": "Radera konversationer", 10 | "Export data": "Exportera konversationer" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/te/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "ఒపెన్ ఎయి ఐ API కీ అవసరం", 3 | "Please set your API key in the bottom left of the sidebar.": "దయచేసి మీ API కీని సైడ్ బార్ యొక్క దిగువ ఎడమ భాగంలో సెట్ చేయండి.", 4 | "Stop Generating": "జెనరేట్ చేస్తున్న ప్రక్రియ నిలిపేయి", 5 | "Prompt limit is {{maxLength}} characters": "ప్రాంప్ట్(సంకేతం) పరిమితి {{maxLength}} అక్షరాలు మాత్రమే", 6 | "System Prompt": "సిస్టమ్ ప్రాంప్ట్", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "మీరు ChatGPT, ఒక పెద్ద భాషా మోడల్ ఓపెన్‌ఏఐ ద్వారా ట్రైన్ చేయబడింది. యూజర్ ఇన్స్ట్రక్షన్స్ కనుగొనండి. మార్క్‌డౌన్ ఉపయోగించి సమాధానం ఇవ్వండి.", 8 | "Enter a prompt": "ఒక ప్రాంప్ట్(సంకేతం) నమోదు చేయండి", 9 | "Regenerate response": "పునరుత్పాదించు సమాధానం", 10 | "Sorry, there was an error.": "క్షమించండి, ఒక పొరపాటు జరిగింది.", 11 | "Model": "మోడల్", 12 | "Conversation": "సంవాదం", 13 | "OR": "లేదా", 14 | "Loading...": "లోడ్ అవుతోంది...", 15 | "Type a message...": "సందేశం టైప్ చేయండి...", 16 | "Error fetching models.": "మోడల్స్ పొందడం లోపం జరిగింది.", 17 | "AI": "AI", 18 | "You": "నీవు", 19 | "Cancel": "Cancel", 20 | "Save & Submit": "Save & Submit", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "మీరు ఖాళీలో ఎడమ ఎరుగులో మీ API కీను సెట్ చేస్తున్నారని ఖచ్చితం చేయండి.", 22 | "If you completed this step, may be experiencing issues.": "మీరు ఈ హంతం పూర్తి చేసినా, సమస్యలు ఉన్నట్లు ఉంటాయి.", 23 | "click if using a .env.local file": "click if using a .env.local file", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "సందేశం పరిమితి {{maxLength}} అక్షరాలు. మీరు {{valueLength}} అక్షరాలు నమోదు చేసారు.", 25 | "Please enter a message": "దయచేసి ఒక సందేశం నమోదు చేయండి", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI ఒక అభ్యంతర సంవిధానం మరియు కార్యాచరణ లక్ష్యం తీసుకున్న ఛాట్ మోడల్లలో మార్పులు చేయడానికి ప్రయత్నిస్తుంది, ChatGPT ఇంటర్ఫేస్ మరియు కార్యాచరణను అనుకరించడానికి.", 27 | "Are you sure you want to clear all messages?": "మీరు అన్ని సందేశాలను తొలగించాలా?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "0.8 పైకి ఉన్న పెరిగిన విలువలు ఎక్కువగా విస్తరించినట్లుగా ఉంటాయి, మరియు 0.2 పైకి ఉన్న తక్కువ విలువలు కేంద్రీకృతం మరియు నిర్ణయాత్మకంగా మార్చవచ్చు." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/te/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/te/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "కోడ్‌ను కాపీ చేయండి", 3 | "Copied!": "కాపీ చేయబడింది!", 4 | "Enter file name": "ఫైల్ పేరు నమోదు చేయండి" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/te/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "New prompt", 3 | "New folder": "New folder", 4 | "No prompts.": "No prompts.", 5 | "Search prompts...": "Search prompts...", 6 | "Name": "Name", 7 | "Description": "Description", 8 | "A description for your prompt.": "A description for your prompt.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}", 11 | "Save": "Save" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/te/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "డార్క్ మోడ్", 3 | "Light mode": "లైట్ మోడ్" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/te/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "కొత్త ఫోల్డర్", 3 | "New chat": "కొత్త చాట్", 4 | "No conversations.": "సంభాషణలు లేవు.", 5 | "Search conversations...": "సంభాషణలు వెతకండి...", 6 | "API Key": "ఒపెన్ ఎయి ఐ API కీ ", 7 | "Import data": "సంభాషణలు దిగుమతి చేయండి", 8 | "Are you sure?": "మీరు ఖచ్చితంగా ఉన్నారా?", 9 | "Clear conversations": "సంభాషణలు తొలగించు", 10 | "Export data": "సంభాషణలు ఎగుమతి చేయండి" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/tr/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "API Anahtarı Gerekli", 3 | "Please set your API key in the bottom left of the sidebar.": "Lütfen API anahtarınızı yan çubuğun sol altınan'dan ayarlayın.", 4 | "Stop Generating": "Durdur", 5 | "Prompt limit is {{maxLength}} characters": "Prompt sınırı {{maxLength}} karakterdir", 6 | "System Prompt": "Sistem Prompt", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Sen ChatGPT'sin, tarafından eğitilmiş büyük bir dil modelisin. Kullanıcının talimatlarını dikkatlice takip et. Yanıtını markdown kullanarak ver.", 8 | "Enter a prompt": "Bir prompt girin", 9 | "Regenerate response": "Yanıtı Yeniden Oluştur", 10 | "Sorry, there was an error.": "Üzgünüm, bir hata oluştu.", 11 | "Model": "Model", 12 | "Conversation": "Sohbet", 13 | "OR": "VEYA", 14 | "Loading...": "Yükleniyor...", 15 | "Type a message...": "Bir mesaj yazın...", 16 | "Error fetching models.": "Modeller getirilirken hata oluştu.", 17 | "AI": "Yapay Zeka", 18 | "You": "Sen", 19 | "Cancel": "İptal", 20 | "Save & Submit": "Kaydet ve Gönder", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "API anahtarınızın yan çubuğun sol altında ayarlandığından emin ol.", 22 | "If you completed this step, may be experiencing issues.": "Bu adımı tamamladıysanız, sorun yaşıyor olabilir.", 23 | "click if using a .env.local file": "Eğer .env.local dosyası kullanıyorsanız tıklayın", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Mesaj sınırı {{maxLength}} karakterdir. {{valueLength}} karakter girdiniz.", 25 | "Please enter a message": "Lütfen bir mesaj girin", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI, ChatGPT'nin arayüz ve işlevselliğini taklit etmeyi amaçlayan'in sohbet modelleri için gelişmiş bir sohbetbot kitidir.", 27 | "Are you sure you want to clear all messages?": "Tüm mesajları temizlemek istediğinize emin misiniz?" 28 | } 29 | -------------------------------------------------------------------------------- /public/locales/tr/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/tr/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Kodu kopyala", 3 | "Copied!": "Kopyalandi!", 4 | "Enter file name": "Dosya ismi gir" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/tr/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Yeni prompt", 3 | "New folder": "Yeni klasör", 4 | "No prompts.": "Prompt yok.", 5 | "Search prompts...": "Prompt'ları ara...", 6 | "Name": "İsim", 7 | "Description": "Açıklama", 8 | "A description for your prompt.": "Prompt'unuz için bir açıklama.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Prompt içeriği. Değişken belirtmek için {{}} kullanın. Örn: {{ad}} bir {{sıfat}} {{isim}}", 11 | "Save": "Kaydet" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/tr/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Yeni klasör", 3 | "New chat": "Yeni sohbet", 4 | "No conversations.": "Hiçbir konuşma yok.", 5 | "Search conversations...": "Sohbetleri ara...", 6 | "API Key": "API Anahtarı", 7 | "Import data": "Veri içe aktar", 8 | "Are you sure?": "Emin misiniz?", 9 | "Clear conversations": "Konuşmaları temizle", 10 | "Export data": "Veri dışa aktar", 11 | "Dark mode": "Karanlık mod", 12 | "Light mode": "Aydınlık mod", 13 | "Plugin Keys": "Plugin Anahtarları" 14 | } 15 | -------------------------------------------------------------------------------- /public/locales/vi/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "Yêu cầu nhập API Key từ tài khoản", 3 | "Please set your API key in the bottom left of the sidebar.": "Vui lòng nhập API Key từ tài khoản của bạn vào ô dưới cùng của thanh bên trái.", 4 | "Stop Generating": "Dừng tạo", 5 | "Prompt limit is {{maxLength}} characters": "Giới hạn Prompt là {{maxLength}} ký tự", 6 | "System Prompt": "Prompt hệ thống", 7 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "Bạn là ChatGPT, một mô hình ngôn ngữ lớn được đào tạo bởi. Hãy tuân theo hướng dẫn của người dùng một cách cẩn thận. Phản hồi bằng cách sử dụng định dạng markdown.", 8 | "Enter a prompt": "Nhập một Prompt", 9 | "Regenerate response": "Tạo lại phản hồi", 10 | "Sorry, there was an error.": "Xin lỗi, đã xảy ra lỗi.", 11 | "Model": "Mô hình", 12 | "Conversation": "Cuộc trò chuyện", 13 | "OR": "HOẶC", 14 | "Loading...": "Đang tải...", 15 | "Type a message...": "Nhập một tin nhắn...", 16 | "Error fetching models.": "Lỗi khi truy xuất mô hình.", 17 | "AI": "AI", 18 | "You": "Bạn", 19 | "Cancel": "Hủy", 20 | "Save & Submit": "Lưu & Gửi", 21 | "Make sure your API key is set in the bottom left of the sidebar.": "Hãy đảm bảo rằng khóa API từ tài khoản của bạn đã được nhập vào ô dưới cùng của thanh bên trái.", 22 | "If you completed this step, may be experiencing issues.": "Nếu bạn đã hoàn thành bước này, có thể đang gặp sự cố.", 23 | "click if using a .env.local file": "Bấm vào đây nếu dùng tệp .env.local", 24 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "Giới hạn tin nhắn là {{maxLength}} ký tự. Bạn đã nhập {{valueLength}} ký tự.", 25 | "Please enter a message": "Vui lòng nhập một tin nhắn", 26 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI là một bộ công cụ chatbot tiên tiến cho các mô hình chat của nhằm mô phỏng giao diện và chức năng của ChatGPT.", 27 | "Are you sure you want to clear all messages?": "Bạn có chắc chắn muốn xóa tất cả tin nhắn không?", 28 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "Các giá trị cao hơn như 0,8 sẽ làm cho đầu ra ngẫu nhiên hơn, trong khi các giá trị thấp hơn như 0,2 sẽ làm cho đầu ra tập trung và xác định hơn." 29 | } 30 | -------------------------------------------------------------------------------- /public/locales/vi/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/vi/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "Sao chép mã", 3 | "Copied!": "Đã sao chép!", 4 | "Enter file name": "Nhập tên file" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/vi/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "Prompt mới", 3 | "New folder": "Thư mục mới", 4 | "No prompts.": "Không có Prompt nào.", 5 | "Search prompts...": "Tìm kiếm các Prompt...", 6 | "Name": "Tên", 7 | "Description": "Mô tả", 8 | "A description for your prompt.": "Một mô tả cho Prompt của bạn.", 9 | "Prompt": "Prompt", 10 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "Nội dung Prompt. Sử dụng {{}} để biểu thị một biến. Ví dụ: {{name}} là một {{adjective}} {{noun}}", 11 | "Save": "Lưu" 12 | } 13 | -------------------------------------------------------------------------------- /public/locales/vi/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Dark mode": "Chế độ tối", 3 | "Light mode": "Chế độ sáng" 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/vi/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "Thư mục mới", 3 | "New chat": "Tạo hội thoại mới", 4 | "No conversations.": "Không có hội thoại nào.", 5 | "Search conversations...": "Tìm kiếm các cuộc hội thoại...", 6 | "API Key": "API Key", 7 | "Import data": "Nhập dữ liệu hội thoại", 8 | "Are you sure?": "Bạn chắc chắn chứ?", 9 | "Clear conversations": "Xoá các đoạn hội thoại", 10 | "Export data": "Xuất dữ liệu hội thoại" 11 | } 12 | -------------------------------------------------------------------------------- /public/locales/zh/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "API Key Required": "需要 API 密钥", 3 | "Please set your API key in the bottom left of the sidebar.": "请在侧边栏左下角设置您的 API 密钥。", 4 | "If you don't have an API key, you can get one here: ": "如果你没有 API 密钥,你可以在此获取:", 5 | "Stop Generating": "停止生成", 6 | "Prompt limit is {{maxLength}} characters": "提示字数限制为 {{maxLength}} 个字符", 7 | "New Conversation": "新的聊天", 8 | "System Prompt": "系统提示", 9 | "You are ChatGPT, a large language model trained by. Follow the user's instructions carefully. Respond using markdown.": "你是 ChatGPT,一个由 训练的大型语言模型。请仔细遵循用户的指示。使用 Markdown 格式进行回应。", 10 | "Enter a prompt": "输入一个提示", 11 | "Regenerate response": "重新生成回应", 12 | "Sorry, there was an error.": "抱歉,出现了错误。", 13 | "Model": "模型", 14 | "Conversation": "对话", 15 | "OR": "或", 16 | "Loading...": "加载中...", 17 | "Type a message or type \"/\" to select a prompt...": "输入一条消息或键入 \"/\" 以选择提示...", 18 | "Error fetching models.": "获取模型时出错。", 19 | "AI": "AI", 20 | "You": "你", 21 | "Cancel": "取消", 22 | "Save & Submit": "保存并提交", 23 | "Make sure your API key is set in the bottom left of the sidebar.": "请确保您的 API 密钥已在侧边栏左下角设置。", 24 | "If you completed this step, may be experiencing issues.": "如果您已完成此步骤,可能遇到了问题。", 25 | "click if using a .env.local file": "click if using a .env.local file", 26 | "Message limit is {{maxLength}} characters. You have entered {{valueLength}} characters.": "消息字数限制为 {{maxLength}} 个字符。您已输入 {{valueLength}} 个字符。", 27 | "Please enter a message": "请输入一条消息", 28 | "Chatbot UI is an advanced chatbot kit for's chat models aiming to mimic ChatGPT's interface and functionality.": "Chatbot UI 是一个高级聊天机器人工具包,旨在模仿 聊天模型的 ChatGPT 界面和功能。", 29 | "Power by ": "技术支持 ", 30 | "Are you sure you want to clear all messages?": "你确定要清除所有的消息吗?", 31 | "Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.": "较高的数值(例如0.8)会使输出更随机,而较低的数值(例如0.2)会使输出更加聚焦和确定性更强。", 32 | "View Account Usage": "查阅账户用量", 33 | "Temperature": "生成温度", 34 | "Precise": "保守", 35 | "Neutral": "中立", 36 | "Creative": "随性" 37 | } 38 | -------------------------------------------------------------------------------- /public/locales/zh/common.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /public/locales/zh/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "Copy code": "复制代码", 3 | "Copied!": "已复制!", 4 | "Enter file name": "输入文件名" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/zh/promptbar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New prompt": "新建提示", 3 | "New folder": "新建文件夹", 4 | "No prompts.": "无提示词", 5 | "Search prompts...": "搜索提示...", 6 | "Name": "名称", 7 | "A name for your prompt.": "提示词名称", 8 | "Description": "描述", 9 | "A description for your prompt.": "提示词描述", 10 | "Prompt": "提示词", 11 | "Prompt content. Use {{}} to denote a variable. Ex: {{name}} is a {{adjective}} {{noun}}": "提示内容。使用 {{}} 表示一个变量。例如:{{name}} 是一个 {{adjective}} {{noun}}", 12 | "Save": "保存" 13 | } 14 | -------------------------------------------------------------------------------- /public/locales/zh/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Settings": "设置", 3 | "Theme": "主题", 4 | "Dark mode": "深色模式", 5 | "Light mode": "浅色模式", 6 | "Save": "保存" 7 | } 8 | -------------------------------------------------------------------------------- /public/locales/zh/sidebar.json: -------------------------------------------------------------------------------- 1 | { 2 | "New folder": "新建文件夹", 3 | "New chat": "新建聊天", 4 | "New Conversation": "新的聊天", 5 | "No conversations.": "无对话", 6 | "Search conversations...": "搜索对话...", 7 | "API Key": "API 密钥", 8 | "Chat API Url": "聊天 API 链接", 9 | "API Url": "API 链接", 10 | "Import data": "导入对话", 11 | "Are you sure?": "确定吗?", 12 | "Clear conversations": "清空对话", 13 | "Settings": "设置", 14 | "Export data": "导出对话", 15 | "Plugin Keys": "插件密钥" 16 | } 17 | -------------------------------------------------------------------------------- /public/logo-big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/logo-big.png -------------------------------------------------------------------------------- /public/logo-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/logo-opacity.png -------------------------------------------------------------------------------- /public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/screenshot.png -------------------------------------------------------------------------------- /public/screenshots/screenshot-0402023.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/public/screenshots/screenshot-0402023.jpg -------------------------------------------------------------------------------- /services/errorService.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | import { useTranslation } from 'next-i18next'; 4 | 5 | import { ErrorMessage } from '@/types/error'; 6 | 7 | const useErrorService = () => { 8 | const { t } = useTranslation('chat'); 9 | 10 | return { 11 | getModelsError: useMemo( 12 | () => (error: any) => { 13 | return !error 14 | ? null 15 | : ({ 16 | title: t('Error fetching models.'), 17 | code: error.status || 'unknown', 18 | messageLines: error.statusText 19 | ? [error.statusText] 20 | : [ 21 | t( 22 | 'Make sure your OpenAI API key is set in the bottom left of the sidebar.', 23 | ), 24 | t( 25 | 'If you completed this step, OpenAI may be experiencing issues.', 26 | ), 27 | ], 28 | } as ErrorMessage); 29 | }, 30 | [t], 31 | ), 32 | }; 33 | }; 34 | 35 | export default useErrorService; 36 | -------------------------------------------------------------------------------- /services/useApiService.ts: -------------------------------------------------------------------------------- 1 | import { baseURL } from '@/pages/api/models'; 2 | 3 | export interface GetModelsRequestProps { 4 | url: string; 5 | key: string; 6 | } 7 | 8 | export interface modelObject { 9 | id: String; 10 | name?: String; 11 | created: Number; 12 | object: String; 13 | owned_by: String; 14 | } 15 | 16 | const useApiService = () => { 17 | // const getModels = useCallback( 18 | // ( 19 | // params: GetManagementRoutineInstanceDetailedParams, 20 | // signal?: AbortSignal 21 | // ) => { 22 | // return fetchService.get( 23 | // `/v1/ManagementRoutines/${params.managementRoutineId}/instances/${params.instanceId 24 | // }?sensorGroupIds=${params.sensorGroupId ?? ''}`, 25 | // { 26 | // signal, 27 | // } 28 | // ); 29 | // }, 30 | // [fetchService] 31 | // ); 32 | 33 | const getModels = async (params: GetModelsRequestProps) => { 34 | let url = `${baseURL}/v1/models`; 35 | const response = await fetch(url, { 36 | headers: { 37 | 'Content-Type': 'application/json', 38 | Authorization: `Bearer ${ 39 | params.key ? params.key : process.env.NEXT_PUBLIC_OPENAI_API_KEY 40 | }`, 41 | }, 42 | }); 43 | const res = await response.json(); 44 | const data: modelObject[] = res.data; 45 | // test data 46 | // const data:modelObject[] = [{ 47 | // id: "Llama-2-7B:llama-2-chat", "created": 1699511491, "object": "model", "owned_by": "Not specified" 48 | // }, { 49 | // id: "Llama-2-13B:llama-2-chat", "created": 1699511491, "object": "model", "owned_by": "Not specified" 50 | // }] 51 | if (data && data.length > 0) { 52 | return { 53 | name: data[0]['id'], 54 | subdomain: params.url, 55 | }; 56 | } else { 57 | return {}; 58 | } 59 | }; 60 | 61 | return { 62 | getModels, 63 | }; 64 | }; 65 | 66 | export default useApiService; 67 | -------------------------------------------------------------------------------- /styles/MonaspaceNeon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/styles/MonaspaceNeon.ttf -------------------------------------------------------------------------------- /styles/Styrene A-Medium-Web.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/styles/Styrene A-Medium-Web.ttf -------------------------------------------------------------------------------- /styles/Styrene A-Regular-Web.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GaiaNet-AI/chatbot-ui/06babbd36d287527975ec7d7141d273c09bdb87f/styles/Styrene A-Regular-Web.ttf -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './app/**/*.{js,ts,jsx,tsx}', 5 | './pages/**/*.{js,ts,jsx,tsx}', 6 | './components/**/*.{js,ts,jsx,tsx}', 7 | ], 8 | darkMode: 'class', 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 13 | 'gradient-conic': 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 14 | }, 15 | colors: { 16 | //rebranding 17 | pearl: '#F5F5EF', 18 | onyx: '#121314', 19 | stone: '#666666', 20 | pebble: '#A4A3A3', 21 | fontPrimary: '#121314', 22 | fontSecondary: '#666666', 23 | fontTertiary: '#A4A3A3', 24 | fontLight: '#F5F5EF', 25 | fontWrong: '#DC3545', 26 | fontSuccess: '#28A745', 27 | fillPrimary: '#121314', 28 | fill: '#121314', 29 | fillSecondary: '#666666', 30 | fillTertiary: '#A4A3A3', 31 | fillLine: 'rgba(164,163,163,0.5)', 32 | fillBackground: 'rgba(164,163,163,0.1)', 33 | fillSuccess: '#28A745', 34 | fillDanger: '#DC3545', 35 | fillLight: '#F5F5EF', 36 | }, 37 | }, 38 | }, 39 | variants: { 40 | extend: { 41 | visibility: ['group-hover'], 42 | }, 43 | }, 44 | plugins: [require('@tailwindcss/typography')], 45 | }; 46 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "types": ["vitest/globals"], 18 | "paths": { 19 | "@/*": ["./*"] 20 | } 21 | }, 22 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 23 | "exclude": ["node_modules"] 24 | } 25 | -------------------------------------------------------------------------------- /types/chat.ts: -------------------------------------------------------------------------------- 1 | import {OpenAIModel} from './openai'; 2 | 3 | export interface image_url { 4 | url: string; 5 | } 6 | 7 | export interface Content { 8 | type: Type; 9 | text?: string; 10 | image_url?: image_url; 11 | } 12 | 13 | export interface Message { 14 | role: Role; 15 | content: string | Content[]; 16 | } 17 | 18 | export type Type = 'text' | 'image_url'; 19 | 20 | export type Role = 'assistant' | 'user'; 21 | 22 | export interface ChatBody { 23 | node: SelectedNode; 24 | messages: Message[]; 25 | key: string; 26 | prompt: string; 27 | temperature: number; 28 | } 29 | 30 | export interface SelectedNode { 31 | name: string; 32 | subdomain: string; 33 | } 34 | 35 | export interface Conversation { 36 | id: string; 37 | name: string; 38 | messages: Message[]; 39 | model?: OpenAIModel; 40 | prompt: string; 41 | promptState: number; 42 | temperature: number; 43 | folderId: string | null; 44 | node: SelectedNode; 45 | } 46 | -------------------------------------------------------------------------------- /types/data.ts: -------------------------------------------------------------------------------- 1 | export interface KeyValuePair { 2 | key: string; 3 | value: any; 4 | } 5 | -------------------------------------------------------------------------------- /types/env.ts: -------------------------------------------------------------------------------- 1 | export interface ProcessEnv { 2 | OPENAI_API_KEY: string; 3 | OPENAI_API_HOST?: string; 4 | OPENAI_API_TYPE?: 'openai' | 'azure'; 5 | OPENAI_API_VERSION?: string; 6 | OPENAI_ORGANIZATION?: string; 7 | } 8 | -------------------------------------------------------------------------------- /types/error.ts: -------------------------------------------------------------------------------- 1 | export interface ErrorMessage { 2 | code: String | null; 3 | title: String; 4 | messageLines: String[]; 5 | } 6 | -------------------------------------------------------------------------------- /types/export.ts: -------------------------------------------------------------------------------- 1 | import { Conversation, Message } from './chat'; 2 | import { FolderInterface } from './folder'; 3 | import { OpenAIModel } from './openai'; 4 | import { Prompt } from './prompt'; 5 | 6 | export type SupportedExportFormats = 7 | | ExportFormatV1 8 | | ExportFormatV2 9 | | ExportFormatV3 10 | | ExportFormatV4; 11 | export type LatestExportFormat = ExportFormatV4; 12 | 13 | //////////////////////////////////////////////////////////////////////////////////////////// 14 | interface ConversationV1 { 15 | id: number; 16 | name: string; 17 | messages: Message[]; 18 | } 19 | 20 | export type ExportFormatV1 = ConversationV1[]; 21 | 22 | //////////////////////////////////////////////////////////////////////////////////////////// 23 | interface ChatFolder { 24 | id: number; 25 | name: string; 26 | } 27 | 28 | export interface ExportFormatV2 { 29 | history: Conversation[] | null; 30 | folders: ChatFolder[] | null; 31 | } 32 | 33 | //////////////////////////////////////////////////////////////////////////////////////////// 34 | export interface ExportFormatV3 { 35 | version: 3; 36 | history: Conversation[]; 37 | folders: FolderInterface[]; 38 | } 39 | 40 | export interface ExportFormatV4 { 41 | version: 4; 42 | history: Conversation[]; 43 | folders: FolderInterface[]; 44 | prompts: Prompt[]; 45 | } 46 | -------------------------------------------------------------------------------- /types/folder.ts: -------------------------------------------------------------------------------- 1 | export interface FolderInterface { 2 | id: string; 3 | name: string; 4 | type: FolderType; 5 | } 6 | 7 | export type FolderType = 'chat' | 'prompt'; 8 | -------------------------------------------------------------------------------- /types/google.ts: -------------------------------------------------------------------------------- 1 | import { ChatBody, Message } from './chat'; 2 | 3 | export interface GoogleBody extends ChatBody { 4 | googleAPIKey: string; 5 | googleCSEId: string; 6 | } 7 | 8 | export interface GoogleResponse { 9 | message: Message; 10 | } 11 | 12 | export interface GoogleSource { 13 | title: string; 14 | link: string; 15 | displayLink: string; 16 | snippet: string; 17 | image: string; 18 | text: string; 19 | } 20 | -------------------------------------------------------------------------------- /types/index.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /types/openai.ts: -------------------------------------------------------------------------------- 1 | import { OPENAI_API_TYPE } from '../utils/app/const'; 2 | 3 | export interface OpenAIModel { 4 | id: string; 5 | name: string; 6 | maxLength: number; // maximum length of a message 7 | tokenLimit: number; 8 | } 9 | 10 | export enum OpenAIModelID { 11 | GPT_3_5 = 'gpt-3.5-turbo', 12 | LLAMA_2_CHAT = 'llama-2-chat', 13 | GPT_3_5_AZ = 'gpt-35-turbo', 14 | GPT_4 = 'gpt-4', 15 | GPT_4_32K = 'gpt-4-32k', 16 | } 17 | 18 | // in case the `DEFAULT_MODEL` environment variable is not set or set to an unsupported model 19 | export const fallbackModelID = OpenAIModelID.LLAMA_2_CHAT; 20 | 21 | export const OpenAIModels: Record = { 22 | [OpenAIModelID.GPT_3_5]: { 23 | id: OpenAIModelID.GPT_3_5, 24 | name: 'GPT-3.5', 25 | maxLength: 12000, 26 | tokenLimit: 4000, 27 | }, 28 | [OpenAIModelID.LLAMA_2_CHAT]: { 29 | id: OpenAIModelID.LLAMA_2_CHAT, 30 | name: 'LLAMA_2_CHAT', 31 | maxLength: 12000, 32 | tokenLimit: 4000, 33 | }, 34 | [OpenAIModelID.GPT_3_5_AZ]: { 35 | id: OpenAIModelID.GPT_3_5_AZ, 36 | name: 'GPT-3.5', 37 | maxLength: 12000, 38 | tokenLimit: 4000, 39 | }, 40 | [OpenAIModelID.GPT_4]: { 41 | id: OpenAIModelID.GPT_4, 42 | name: 'GPT-4', 43 | maxLength: 24000, 44 | tokenLimit: 8000, 45 | }, 46 | [OpenAIModelID.GPT_4_32K]: { 47 | id: OpenAIModelID.GPT_4_32K, 48 | name: 'GPT-4-32K', 49 | maxLength: 96000, 50 | tokenLimit: 32000, 51 | }, 52 | }; 53 | -------------------------------------------------------------------------------- /types/plugin.ts: -------------------------------------------------------------------------------- 1 | import { KeyValuePair } from './data'; 2 | 3 | export interface Plugin { 4 | id: PluginID; 5 | name: PluginName; 6 | requiredKeys: KeyValuePair[]; 7 | } 8 | 9 | export interface PluginKey { 10 | pluginId: PluginID; 11 | requiredKeys: KeyValuePair[]; 12 | } 13 | 14 | export enum PluginID { 15 | GOOGLE_SEARCH = 'google-search', 16 | } 17 | 18 | export enum PluginName { 19 | GOOGLE_SEARCH = 'Google Search', 20 | } 21 | 22 | export const Plugins: Record = { 23 | [PluginID.GOOGLE_SEARCH]: { 24 | id: PluginID.GOOGLE_SEARCH, 25 | name: PluginName.GOOGLE_SEARCH, 26 | requiredKeys: [ 27 | { 28 | key: 'GOOGLE_API_KEY', 29 | value: '', 30 | }, 31 | { 32 | key: 'GOOGLE_CSE_ID', 33 | value: '', 34 | }, 35 | ], 36 | }, 37 | }; 38 | 39 | export const PluginList = Object.values(Plugins); 40 | -------------------------------------------------------------------------------- /types/prompt.ts: -------------------------------------------------------------------------------- 1 | import { OpenAIModel } from './openai'; 2 | 3 | export interface Prompt { 4 | id: string; 5 | name: string; 6 | description: string; 7 | content: string; 8 | model?: OpenAIModel; 9 | folderId?: string | null; 10 | controlState?: number;//0 means it can be empty, 1 means it cannot be empty, and 2 means there is no prompt. 11 | } 12 | -------------------------------------------------------------------------------- /types/settings.ts: -------------------------------------------------------------------------------- 1 | export interface Settings { 2 | theme: 'light' | 'dark'; 3 | isStream: Boolean; 4 | } 5 | -------------------------------------------------------------------------------- /types/storage.ts: -------------------------------------------------------------------------------- 1 | import { Conversation } from './chat'; 2 | import { FolderInterface } from './folder'; 3 | import { PluginKey } from './plugin'; 4 | import { Prompt } from './prompt'; 5 | 6 | // keep track of local storage schema 7 | export interface LocalStorage { 8 | apiKey: string; 9 | conversationHistory: Conversation[]; 10 | selectedConversation: Conversation; 11 | theme: 'light' | 'dark'; 12 | // added folders (3/23/23) 13 | folders: FolderInterface[]; 14 | // added prompts (3/26/23) 15 | prompts: Prompt[]; 16 | // added showChatbar and showPromptbar (3/26/23) 17 | showChatbar: boolean; 18 | showPromptbar: boolean; 19 | // added plugin keys (4/3/23) 20 | pluginKeys: PluginKey[]; 21 | } 22 | -------------------------------------------------------------------------------- /utils/app/api.ts: -------------------------------------------------------------------------------- 1 | import { Plugin, PluginID } from '@/types/plugin'; 2 | 3 | export const getEndpoint = (plugin: Plugin | null) => { 4 | if (!plugin) { 5 | return 'api/chat'; 6 | } 7 | 8 | if (plugin.id === PluginID.GOOGLE_SEARCH) { 9 | return 'api/google'; 10 | } 11 | 12 | return 'api/chat'; 13 | }; 14 | -------------------------------------------------------------------------------- /utils/app/clean.ts: -------------------------------------------------------------------------------- 1 | import { Conversation } from '@/types/chat'; 2 | import { OpenAIModelID, OpenAIModels } from '@/types/openai'; 3 | 4 | import { DEFAULT_TEMPERATURE } from './const'; 5 | 6 | export const cleanSelectedConversation = (conversation: Conversation) => { 7 | // added model for each conversation (3/20/23) 8 | // added system prompt for each conversation (3/21/23) 9 | // added folders (3/23/23) 10 | // added prompts (3/26/23) 11 | // added messages (4/16/23) 12 | 13 | let updatedConversation = conversation; 14 | 15 | // check for model on each conversation 16 | if (!updatedConversation.model) { 17 | updatedConversation = { 18 | ...updatedConversation, 19 | model: updatedConversation.model || OpenAIModels[OpenAIModelID.GPT_3_5], 20 | }; 21 | } 22 | 23 | if (!updatedConversation.temperature) { 24 | updatedConversation = { 25 | ...updatedConversation, 26 | temperature: updatedConversation.temperature || DEFAULT_TEMPERATURE, 27 | }; 28 | } 29 | 30 | if (!updatedConversation.folderId) { 31 | updatedConversation = { 32 | ...updatedConversation, 33 | folderId: updatedConversation.folderId || null, 34 | }; 35 | } 36 | 37 | if (!updatedConversation.messages) { 38 | updatedConversation = { 39 | ...updatedConversation, 40 | messages: updatedConversation.messages || [], 41 | }; 42 | } 43 | 44 | return updatedConversation; 45 | }; 46 | 47 | export const cleanConversationHistory = (history: any[]): Conversation[] => { 48 | // added model for each conversation (3/20/23) 49 | // added system prompt for each conversation (3/21/23) 50 | // added folders (3/23/23) 51 | // added prompts (3/26/23) 52 | // added messages (4/16/23) 53 | 54 | if (!Array.isArray(history)) { 55 | console.warn('history is not an array. Returning an empty array.'); 56 | return []; 57 | } 58 | 59 | return history.reduce((acc: any[], conversation) => { 60 | try { 61 | if (!conversation.model) { 62 | conversation.model = OpenAIModels[OpenAIModelID.GPT_3_5]; 63 | } 64 | 65 | if (!conversation.temperature) { 66 | conversation.temperature = DEFAULT_TEMPERATURE; 67 | } 68 | 69 | if (!conversation.folderId) { 70 | conversation.folderId = null; 71 | } 72 | 73 | if (!conversation.messages) { 74 | conversation.messages = []; 75 | } 76 | 77 | acc.push(conversation); 78 | return acc; 79 | } catch (error) { 80 | console.warn( 81 | `error while cleaning conversations' history. Removing culprit`, 82 | error, 83 | ); 84 | } 85 | return acc; 86 | }, []); 87 | }; 88 | -------------------------------------------------------------------------------- /utils/app/codeblock.ts: -------------------------------------------------------------------------------- 1 | interface languageMap { 2 | [key: string]: string | undefined; 3 | } 4 | 5 | export const programmingLanguages: languageMap = { 6 | javascript: '.js', 7 | python: '.py', 8 | java: '.java', 9 | c: '.c', 10 | cpp: '.cpp', 11 | 'c++': '.cpp', 12 | 'c#': '.cs', 13 | ruby: '.rb', 14 | php: '.php', 15 | swift: '.swift', 16 | 'objective-c': '.m', 17 | kotlin: '.kt', 18 | typescript: '.ts', 19 | go: '.go', 20 | perl: '.pl', 21 | rust: '.rs', 22 | scala: '.scala', 23 | haskell: '.hs', 24 | lua: '.lua', 25 | shell: '.sh', 26 | sql: '.sql', 27 | html: '.html', 28 | css: '.css', 29 | // add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component 30 | }; 31 | 32 | export const generateRandomString = (length: number, lowercase = false) => { 33 | const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789'; // excluding similar looking characters like Z, 2, I, 1, O, 0 34 | let result = ''; 35 | for (let i = 0; i < length; i++) { 36 | result += chars.charAt(Math.floor(Math.random() * chars.length)); 37 | } 38 | return lowercase ? result.toLowerCase() : result; 39 | }; 40 | -------------------------------------------------------------------------------- /utils/app/const.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SYSTEM_PROMPT = 2 | process.env.NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT || 3 | "You are a helpful, respectful and honest assistant. Always answer as short as possible, while being safe."; 4 | 5 | export const OPENAI_API_HOST = 6 | process.env.OPENAI_API_HOST || 'https://api.openai.com'; 7 | 8 | export const DEFAULT_TEMPERATURE = 9 | parseFloat(process.env.NEXT_PUBLIC_DEFAULT_TEMPERATURE || "1"); 10 | 11 | export const OPENAI_API_TYPE = 12 | process.env.OPENAI_API_TYPE || 'openai'; 13 | 14 | export const OPENAI_API_VERSION = 15 | process.env.OPENAI_API_VERSION || '2023-03-15-preview'; 16 | 17 | export const OPENAI_ORGANIZATION = 18 | process.env.OPENAI_ORGANIZATION || ''; 19 | 20 | export const AZURE_DEPLOYMENT_ID = 21 | process.env.AZURE_DEPLOYMENT_ID || ''; 22 | -------------------------------------------------------------------------------- /utils/app/conversation.ts: -------------------------------------------------------------------------------- 1 | import { Conversation } from '@/types/chat'; 2 | 3 | export const updateConversation = ( 4 | updatedConversation: Conversation, 5 | allConversations: Conversation[], 6 | subdomain: string | null | undefined 7 | ) => { 8 | const updatedConversations = allConversations.map((c) => { 9 | if (c.id === updatedConversation.id) { 10 | return updatedConversation; 11 | } 12 | 13 | return c; 14 | }); 15 | 16 | saveConversation(updatedConversation); 17 | saveConversations(updatedConversations, subdomain); 18 | 19 | return { 20 | single: updatedConversation, 21 | all: updatedConversations, 22 | }; 23 | }; 24 | 25 | export const saveConversation = (conversation: Conversation) => { 26 | localStorage.setItem('selectedConversation', JSON.stringify(conversation)); 27 | }; 28 | 29 | export const saveConversations = (conversations: Conversation[], subdomain: string | null | undefined) => { 30 | localStorage.setItem(`conversationHistory`, JSON.stringify(conversations)); 31 | }; 32 | -------------------------------------------------------------------------------- /utils/app/folders.ts: -------------------------------------------------------------------------------- 1 | import { FolderInterface } from '@/types/folder'; 2 | 3 | export const saveFolders = (folders: FolderInterface[]) => { 4 | localStorage.setItem('folders', JSON.stringify(folders)); 5 | }; 6 | -------------------------------------------------------------------------------- /utils/app/prompts.ts: -------------------------------------------------------------------------------- 1 | import { Prompt } from '@/types/prompt'; 2 | 3 | export const updatePrompt = (updatedPrompt: Prompt, allPrompts: Prompt[]) => { 4 | const updatedPrompts = allPrompts.map((c) => { 5 | if (c.id === updatedPrompt.id) { 6 | return updatedPrompt; 7 | } 8 | 9 | return c; 10 | }); 11 | 12 | savePrompts(updatedPrompts); 13 | 14 | return { 15 | single: updatedPrompt, 16 | all: updatedPrompts, 17 | }; 18 | }; 19 | 20 | export const savePrompts = (prompts: Prompt[]) => { 21 | localStorage.setItem('prompts', JSON.stringify(prompts)); 22 | }; 23 | -------------------------------------------------------------------------------- /utils/app/settings.ts: -------------------------------------------------------------------------------- 1 | import { Settings } from '@/types/settings'; 2 | 3 | const STORAGE_KEY = 'settings'; 4 | 5 | export const getSettings = (): Settings => { 6 | let settings: Settings = { 7 | theme: 'dark', 8 | isStream: true 9 | }; 10 | const settingsJson = localStorage.getItem(STORAGE_KEY); 11 | if (settingsJson) { 12 | try { 13 | let savedSettings = JSON.parse(settingsJson) as Settings; 14 | settings = Object.assign(settings, savedSettings); 15 | } catch (e) { 16 | console.error(e); 17 | } 18 | } 19 | return settings; 20 | }; 21 | 22 | export const saveSettings = (settings: Settings) => { 23 | localStorage.setItem(STORAGE_KEY, JSON.stringify(settings)); 24 | }; 25 | -------------------------------------------------------------------------------- /utils/data/throttle.ts: -------------------------------------------------------------------------------- 1 | export function throttle any>( 2 | func: T, 3 | limit: number, 4 | ): T { 5 | let lastFunc: ReturnType; 6 | let lastRan: number; 7 | 8 | return ((...args) => { 9 | if (!lastRan) { 10 | func(...args); 11 | lastRan = Date.now(); 12 | } else { 13 | clearTimeout(lastFunc); 14 | lastFunc = setTimeout(() => { 15 | if (Date.now() - lastRan >= limit) { 16 | func(...args); 17 | lastRan = Date.now(); 18 | } 19 | }, limit - (Date.now() - lastRan)); 20 | } 21 | }) as T; 22 | } 23 | -------------------------------------------------------------------------------- /utils/server/google.ts: -------------------------------------------------------------------------------- 1 | export const cleanSourceText = (text: string) => { 2 | return text 3 | .trim() 4 | .replace(/(\n){4,}/g, '\n\n\n') 5 | .replace(/\n\n/g, ' ') 6 | .replace(/ {3,}/g, ' ') 7 | .replace(/\t/g, '') 8 | .replace(/\n+(\s*\n)*/g, '\n'); 9 | }; 10 | -------------------------------------------------------------------------------- /utils/server/index.ts: -------------------------------------------------------------------------------- 1 | import { Message, SelectedNode } from '@/types/chat'; 2 | import { OpenAIModel } from '@/types/openai'; 3 | 4 | import { baseURL } from '@/pages/api/models'; 5 | 6 | export class OpenAIError extends Error { 7 | type: string; 8 | param: string; 9 | code: string; 10 | 11 | constructor(message: string, type: string, param: string, code: string) { 12 | super(message); 13 | this.name = 'OpenAIError'; 14 | this.type = type; 15 | this.param = param; 16 | this.code = code; 17 | } 18 | } 19 | 20 | export const ChatStream = async ( 21 | node: SelectedNode, 22 | systemPrompt: string, 23 | temperature: number, 24 | api: string, 25 | key: string, 26 | messages: Message[], 27 | abortController: AbortController | null, 28 | ) => { 29 | let finalMessage; 30 | let queryUrl = `${baseURL}/v1/chat/completions`; 31 | if (systemPrompt) { 32 | finalMessage = [ 33 | { 34 | role: 'system', 35 | content: systemPrompt, 36 | }, 37 | ...messages, 38 | ]; 39 | } else { 40 | finalMessage = messages; 41 | } 42 | const res = await fetch(queryUrl, { 43 | headers: { 44 | accept: '*/*', 45 | 'Content-Type': 'application/json', 46 | Authorization: `Bearer ${ 47 | key ? key : process.env.NEXT_PUBLIC_OPENAI_API_KEY 48 | }`, 49 | }, 50 | method: 'POST', 51 | body: JSON.stringify({ 52 | model: node.name, 53 | messages: finalMessage, 54 | stream: true, 55 | stream_options: { 56 | include_usage: true, 57 | }, 58 | }), 59 | signal: abortController ? abortController.signal : null, 60 | }); 61 | return res.body; 62 | }; 63 | 64 | export const ChatWithoutStream = async ( 65 | node: SelectedNode, 66 | systemPrompt: string, 67 | temperature: number, 68 | api: string, 69 | key: string, 70 | messages: Message[], 71 | ) => { 72 | let queryUrl = `${baseURL}/v1/chat/completions`; 73 | const res = await fetch(queryUrl, { 74 | headers: { 75 | accept: '*/*', 76 | 'Content-Type': 'application/json', 77 | Authorization: `Bearer ${ 78 | key ? key : process.env.NEXT_PUBLIC_OPENAI_API_KEY 79 | }`, 80 | }, 81 | method: 'POST', 82 | body: JSON.stringify({ 83 | model: node.name, 84 | messages: [ 85 | { 86 | role: 'system', 87 | content: systemPrompt, 88 | }, 89 | ...messages, 90 | ], 91 | stream: false, 92 | }), 93 | }); 94 | 95 | return await res.json(); 96 | }; 97 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | resolve: { 6 | alias: { 7 | '@': path.resolve(__dirname, './'), 8 | }, 9 | }, 10 | }); 11 | --------------------------------------------------------------------------------