Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Contains breaking changes so definitely leaving it as a draft until we figure out versioning, but also, it isn't done. Biggest breaking change is switching the front-end API utils to take a 'messages' array instead of 'system prompt' and 'user prompt'. This allows statefulness, preserving history, etc for actual chat use. In principle putting all the history into the system prompt (or the user prompt!) might work, but OAI probably 'expects' responses to use the messages array as recommended.
If needed we can give those different function names since the signature has changed, but probably marking it as a breaking change should be fine. Broadly, putting into this PR stuff that seems needed for functionality in flight and/or that people already seem to be making odd, hacky, or duplicative workarounds for on the frontend.
TODO: