Skip to content

A very simple chatbot created using Next.js and Next UI components powered by google's generative AI

License

Notifications You must be signed in to change notification settings

real-zephex/Ai-Thingy

Repository files navigation

Ai-Thingy

Welcome to Ai-Thingy, an interactive AI chat application powered by Next.js and Google's Generative AI! Ai-Thingy allows you to engage in conversations with an AI assistant named Andrew, equipped with comprehensive knowledge across various subjects and a polite demeanor.

Features

  • Conversational AI: Engage in natural language conversations with Andrew, who responds courteously and provides insightful information on a wide range of topics.
  • Expertise Showcase: Andrew demonstrates expertise in coding, particularly in Python, JavaScript, and TypeScript. Receive detailed explanations and insights into programming languages, frameworks, and best practices.
  • Framework Preference: Learn about Andrew's special interest in Next.js, a versatile framework for building React applications. Discover its features, benefits, and real-world applications.
  • Media Engagement: Explore Andrew's interests in Kdramas, Animes, Mangas, and Manhwas. Receive recommendations, insights, and discussions on trending series and character developments.

Technologies Used

  • Next.js: Utilized for building a server-rendered React application with efficient performance and SEO optimizations.
  • React: Employed for creating interactive user interfaces and components for seamless user interactions.
  • Google's Generative AI: Powers the AI chat functionality, enabling natural language processing and response generation.
  • @nextui-org/react: Provides UI components for building a visually appealing and responsive user interface.
  • React-icons: Used for adding icons to enhance the visual presentation of the application.

Getting Started

To get started with Ai-Thingy, follow these steps:

  1. Clone the Repository: Clone the Ai-Thingy repository from GitHub.
  2. The AI configuration file has not been included to prevent misuse of my API key, go to Google AI studio and create your own bot.
  3. Copy the code provided there and create new file under /components folder named aiConfig.ts and paste the previously copied code there. Make sure to edit the ai function in the file to following
export async function runAi(message: string, history: any[] = []) {

	const chatSessionConfig = {
		generationConfig,
		safetySettings,
		history: history.length > 0 ? [...history] : undefined, // Conditionally spread history
	};

	const chatSession = model.startChat(chatSessionConfig);
	const result = await chatSession.sendMessage(message);
	return result.response.text();
}
  1. Install Dependencies: Run npm install to install all required dependencies.
  2. Start the Development Server: Run npm run dev to start the Next.js development server.
  3. Explore Ai-Thingy: Open your browser and navigate to http://localhost:3000 to explore and interact with Ai-Thingy.

Contribution

Contributions to Ai-Thingy are welcome! If you encounter any bugs, have feature requests, or want to contribute enhancements, feel free to submit issues or pull requests on the GitHub repository.

License

Ai-Thingy is licensed under the MIT License.


Feel free to explore Ai-Thingy and engage in enlightening conversations with Andrew, your friendly AI assistant! If you have any questions or feedback, don't hesitate to reach out. Enjoy chatting with Ai-Thingy! 🤖✨

About

A very simple chatbot created using Next.js and Next UI components powered by google's generative AI

Resources

License

Stars

Watchers

Forks