Skip to content

Commit

Permalink
update: README.md description
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTeida committed Feb 1, 2024
1 parent 56f9b42 commit ab75108
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 13 deletions.
47 changes: 42 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,50 @@
# NeuraChatAi
# NeuraChat - AI Chat

Description soon
## Introduction

NeuraChatAi is an AI-powered chat application that offers customizable chat experiences. With NeuraChat, you can harness the power of OpenAI's language models to create intelligent conversations tailored to your needs.

## Features:
- **Working AI Chat:** Real-time conversations powered by advanced language models.
- **OpenAI Integration:** Utilize GPT-3.5 and GPT-4 for enhanced chat capabilities.
- **Responsive Design:** Enjoy smooth interactions across devices.
- **Customizable Models:** Choose from a selection of models with unique performance.
- **Dynamic Settings:** Adjust temperature, frequency penalty, max tokens, and top-p for tailored responses.
- **Actions Counter:** Track API request usage for the current model.
- **Light/Dark Mode:** Enjoy adaptive color themes for a personalized experience.
- **Snackbar Alerts:** Receive informative messages and alerts.
- **Auto-scroll:** Automatically move to the latest message for smooth chatting.
- **Tip Suggestions:** Access conversation starters with ease.

## Technologies

* React
* React Router
* OpenAI API 4.24.7
* Sass
* Joy UI
* React Router
* Lodash
* Material Icons
* Day.js
* JS
* Sass
* JS

## Installation

To run NeuraChat locally, follow these steps:

1. Clone this repository.
2. Navigate to the project directory.
3. Install dependencies using `npm install` or `yarn install`.
4. Start the development server with `npm run dev` or `yarn dev`. You can use `npm run host` or `yarn host` to take a look on your phone.
5. Open your browser and visit `http://localhost:5173` (port may be different) to view the application.

## Usage

Once the application is running, you can:

- Customize AI settings in the sidebar.
- Engage in conversations in the chat interface.
- Receive AI-generated responses based on your inputs.
- Explore tip suggestions for conversation starters.

Feel free to reach out if you have any questions, feedback, or suggestions. Happy chatting with NeuraChatAi!
12 changes: 6 additions & 6 deletions src/components/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ function Chat() {
}, [messages])

const handleSend = () => {
DecreaseAvailableActions()
setMessages((prevMessages) => [
...prevMessages,
{isHuman: true, content: input, timestamp: dayjs().calendar().toString(),}
]);
setInput("")
DecreaseAvailableActions()
SendMessage(input, (errorMessage) => {
setMessageSnackbar(errorMessage);
}, IncreaseAvailableActions).then(async (response) => {
}).then(async (response) => {
IncreaseAvailableActions()
setOutput(response)
}).catch((error) => {
Expand All @@ -76,8 +76,7 @@ function Chat() {
})
}

const handleTip = async (tip) => {
DecreaseAvailableActions()
const handleTip = (tip) => {
setMessages(prevMessages => [
...prevMessages,
{
Expand All @@ -87,9 +86,10 @@ function Chat() {
}
]);
setInput("")
await SendMessage(tip, (errorMessage) => {
DecreaseAvailableActions()
SendMessage(tip, (errorMessage) => {
setMessageSnackbar(errorMessage);
}, DecreaseAvailableActions).then(async (response) => {
}).then(async (response) => {
IncreaseAvailableActions()
setOutput(response)
}).catch((error) => {
Expand Down
4 changes: 2 additions & 2 deletions src/contexts/ActionsContext.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ const ActionsProvider = ({children}) => {
if (availableActions < 3) {
setTimeout(() => {
setAvailableActions((prevActions) => prevActions + 1)
}, 20000)
}, 8000)
}
}

const IncreaseImmediatelyAvailableActions = () => {
if (availableActions < 3) {
if (availableActions <= 3) {
setAvailableActions((prevActions) => prevActions + 1);
}
}
Expand Down

0 comments on commit ab75108

Please sign in to comment.