TonyChat is a open-source multifunctional Chatbot, which you can use for your personal and business purpose safely. It supports customized chatbot deploy, easy fine tuning your models, safety and privacy. The platform is designed to make it easy for anyone to find, share, and use prompts to develop AI applications.
Frontend: React, TypeScript, Tailwind CSS Backend: Node.js, Express.js AI Integration: OpenAI API
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Before starting development, you must create a new .env.local
file at project root, and place your api key into it:
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
- Modular Architecture: The Chatbot component is designed to be modular, allowing users to easily switch between running the chatbot locally or on a server.
- Agent Management: The component allows users to specify a unique identifier for the chatbot agent (
agentId
) and provides an interface for initializing and communicating with the agent. - Conversation Management: The component manages the conversation state, including the conversation ID and messages.
- Message Handling: The component handles user input and sends it to the chatbot agent, either locally or on the server. It also displays the chatbot's response in the conversation window.
- Local Mode: The component provides an option to run the chatbot locally, allowing users to test and develop their chatbot agents without relying on a server.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.