Knguyen-dev / SDEV-265-Group-4

Shared repo for sdev 265 group
0 stars 1 forks source link

AI Backend Fine-tuning and Extra Features #11

Closed Frankbbg closed 1 year ago

Frankbbg commented 1 year ago

This enhancement/update will feature implementation of full chat history management. With the new features, the front end developers will be able to:

  1. Clear all messages
  2. Delete specific messages
  3. Edit any message

Prompt fine-tuning: Current prompt engineering work isn't catch-all, meaning it won't work for every case. I will need to perform rigorous bounds testing to find out how far you'd have to take the AI to get it to veer off course. Once tested, I will develop new prompts and rules for the AI to follow that will account for these cases.

Frankbbg commented 1 year ago

Completed part 1 of this issue with a few history management functions completed. Collaborated with @Knguyen-dev and @NukeTheDev to overhaul the current completion system so it's easier on everyone else to use. The new system for running calling the complete() method now eliminates the need to make 2 calls. Only one call to sendStoryPrompt() is needed to get AI output. Everything operates the same way as it did previously, but the new system makes it a little bit easier on the developer using the system. This also made my class more focused, because it required me to add instance variables for the temperature, top_p, presence and frequency penalties.

Frankbbg commented 1 year ago

Completed the final part of this issue. Added remove functions to the ModelBase class. Changed overloads from typing to dispatch which is a more robust way of making function overloads. The upside is I can make more than 2 overloads, but the downside is that the docstrings won't dynamically update for everyone else. Updated app.py to include a test run for anyone on the team who wanted to test out and see for themselves how the AI will work on the app. Very primitive, but gets the point across well. This will be the final update before the first merge.