This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
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.
I've spent some time checking out the official library from OpenAI. The assistants api (which is still in beta) looks like a perfect match for our use-case, as it uses threadIds which persist in order to keep the context.
Please also note that this merge would change the data saved inside the database (no more messageId), so I don't know if it's even possible to upgrade from a older version (and even if, you'd break your old threads).
This is not a "real" merge request - I just played around and got the bot in a working state (which is not well tested and also not well coded). I just thought it might be useful to have the code in case we ever decide to use the assistants api.
Initially I wanted to take a look at the gpt-4-vision-preview (see #247), however this model is not supported with the assistants api:
I think it would be really cool to have the vision-feature within this bot, so I don't know how I feel about the assistants api.