Master Chief AI, an AI-Powered Text Processor, is a web application built with Next.js that allows users to interact with an AI assistant. This application provides functionalities for language detection, text translation, and summarization, all in one seamless interface. Users can type messages, and the AI will respond with translations or summaries based on the input.
- Note: You may need to turn on experimental feature flag in your Chrome browser to access these native AI APIs.
- Language Detection: Automatically detects the language of the input text.
- Text Translation: Translates text from one language to another.
- Text Summarization: Generates concise summaries of longer texts.
- User-Friendly Interface: A clean and intuitive UI for easy interaction with the AI assistant.
Here are some screenshots of the application:
Landing Page: The initial interface where users can start interacting with the AI.
Chat Interface: The area where users can type messages and receive responses from the AI.
To get started with the AI-Powered Text Processor, follow these steps:
Make sure you have the following installed on your machine:
-
Clone the repository:
git clone https://github.com/yourusername/hng12-stage3-ai-powered-text-processor.git cd hng12-stage3-ai-powered-text-processor
-
Install the dependencies:
npm install
-
Set up environment variables:
Create a
.env.local
file in the root of the project and add the following variables:NEXT_PUBLIC_LANGUAGE_DETECTOR_TOKEN=your_language_detector_token NEXT_PUBLIC_TRANSLATOR_TOKEN=your_translator_token NEXT_PUBLIC_SUMMARIZATION_TOKEN=your_summarization_token NEXT_PUBLIC_HTTP_HEADER=origin-trial NEXT_PUBLIC_LOCAL_STORAGE_KEY=chatMessages
Replace
your_language_detector_token
,your_translator_token
, andyour_summarization_token
with the appropriate tokens for the respective APIs.
To run the development server, use the following command:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open your browser and navigate to http://localhost:3000 to see the application in action.
- Start a conversation with Master Chief by typing a message in the input field.
- The AI will detect the language of your message and respond accordingly.
- You can request translations or summaries by clicking the respective buttons.
To learn more about Next.js and its features, check out the following resources:
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.