This repository was archived by the owner on Sep 18, 2024. It is now read-only.
feature: send message to assistants and assistants respond to message #32
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.
Description of the pull request
Thread Runs
where we allowassistants
to read through athread
, and respond with a message based on the context provided by thethread
.POST thread/:id/message
endpoint to add the human message, followed by a call toPOST thread/:id/run
where the body is theassistant_id
created by the user, in which aThread Run
happens.POST thread/:id/run
gets a response from the assistant, and saves it into redis.How I came up with this
Related issues
Closes #8 #9, and half of #17 where we can select the model wanted for the assistant
Other changes
gpt4adapter
to take in aninstruction
as part ofsystem
role which is initialised uponassistant
creation.Role
information forMessage
s as LLM should know whatRole
this message belongs to without having to query fromuserId
.dayjs
for more robust date related functionalities.Testings done
threadRun.test.ts
that...Thread
and anAssistant
.assistant
role.Assistant
follows the initialinstruction
given when the human user creates theassistant
.Checklist