Forem

aldrin312
aldrin312

Posted on

The 3rd sprint.

On this 3rd sprint I have been designated an issue where I have to untangle the chat completion part of the ai chat that is coupled in the chat base #819. This issue was found when I was working on another issue where I needed to append ":online" at the end of the models from open ai in order to allow them to search the web for their response But while working into this, their wasn't an easy way to do the chat completion and have that added in the chat. Currently in the project, how the chat completion works is that its tied to the onprompt of the chatbase function. It would be great if its tied to the chat object itself where chat completion could simply be called like chat.completion(). Doing it like this would simplify the code heavily and would make it easier get an AI response and put that response in the chat log.

My progress so far is good, where I have taken out the main feature of the chat completion. Where I can get a response and have that response posted in the chat log. Only thing that's missing is the extra features like the established commands and created chat functions. I should have enough time to finish at least this part by the end of this sprint.

After this, I mostly likely would want to create a hook for this. So its much more reusable and let it be more available for other classes and files. Though I'm not sure how to make hooks with react. Never really created one. So I need to do some research of making hooks. Their should be enough resource out their for react. React Hooks, this should be a good start to look into. Thiers other resources online that would also be good to look at. Considering this, learning how to make hooks should be a good learning experience.

Other than the chat completion issue, I also was requested to review a couple of pull requests. One of which is the update on the dependency, this was generally easy to understand. Just checked all of the new version of the dependency and tested it if anything breaks. I mostly looked at the UI, since some of the new dependency updates was about the UI. One thing I found though was that on the I reviewed, one of the dependency (openai) had a new update on the day I reviewed it. On the PR the openai depenecy was updated from 4.77.0 to 4.83.0 but openai has a new version 4.84.0. So I suggested a change to update to the most latest one.

Another PR I had to look into is the addition of hooks and a provider. I'm not sure what to look in this PR. I'm not familiar with this part of the project. I not sure if I can add any input on this. For now all I can do is see if I can find anything to give an input on. Though it is adding a new hook, possibly I can learn something from looking into this.

While I was testing the PR found a particular bug. Where a submenu of the message box moves when hovering over the message box or on the submenu.

Image description

I think the culprit is that the submenu menu position is aligned with the menu icon buttons that pops up when hovering over the message box. The icon buttons pop up so it tries to align with them.

For the most part this sprint their shouldn't be too much of an issue.

Top comments (0)