CarterN2000 / Project-3

1 stars 0 forks source link

Glow - Integrating Open AI and having seamless conversation #17

Open CarterN2000 opened 10 months ago

CarterN2000 commented 10 months ago

Assuming you are in an already created chat, you are going to greatly enjoy talking to the AI chatbot. The design is simple and sleek, and you get fast responses to all your messages. I think making the chatbox function smoothly was one of the most difficult tasks in this project, so I am proud that at the end of the day, it now works! Here is a code snippet from our component.

https://github.com/CarterN2000/Project-3/blob/33f1eb7af1c01dc73952f99516b7edcc178779e2/frontend/src/components/Chat/index.jsx#L2-L137

connorgunter commented 10 months ago
bsong1124 commented 10 months ago

There is no grow section for client so im posting everything here. Glow: At first glance, code looks very clean and easy to read. The flow is also easy to understand because the file names are quite clear. The logo looks very nice and color scheme matches well with the topic of the project.

Grow: I see commented out code/console logs on multiple files. I also see a couple files with no working code inside. The delete button doesnt seem to work as intended. While on chat 7 and deleting chat 1 will still delete chat 7 no matter which chat's delete button i press. New chat only adds to the list AFTER i send a prompt(a little confusing) AND after refreshing the page.

zachkurfirst commented 10 months ago

export default function NewChat(props){

// 2- DEFINE LOCAL STATES AND VARIABLES
const [chatPrompt, setChatPrompt] = useState({
    role: "user",
    content: " "
})

// 3- DEFINE HANDLE REQUEST -> TO UPDATE LOCAL STATES
async function handleRequest(e){
    setChatPrompt({...chatPrompt, [e.target.name]: e.target.value})
}

// 4- DEFINE HANDLE SUBMIT -> TO TAKE REQUEST TO BE/SERVICE MODULE
async function handleSubmit(e) {
    e.preventDefault();
    try{
        //const newPrompt = await createPrompt(chatPrompt)
        console.log("handle submit is working and passing data to service module")
    }catch (error){
        console.log(error)
    }