-
Notifications
You must be signed in to change notification settings - Fork 26
Audio chat #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio chat #292
Conversation
c546092 to
641cb96
Compare
ecdbccb to
922f04a
Compare
| if (class_exists('OCP\\TaskProcessing\\TaskTypes\\AudioToAudioChat') | ||
| && $taskTypeId === \OCP\TaskProcessing\TaskTypes\AudioToAudioChat::ID) { | ||
| $message->setContent(trim($task->getOutput()['output_transcript'] ?? '')); | ||
| $message->setAttachments('[{"type":"Audio","fileId":' . $task->getOutput()['output'] . '}]'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output file is deleted by the task processing cleanup job after a while. Do we want to make sure that it lives longer than that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we might wanna avoid cleaning up the chat-related data.
But then we should correctly cleanup when a chat session is deleted.
1f6e0aa to
fd6004f
Compare
16bfe1f to
495ce20
Compare
9b3da26 to
403400b
Compare
c575a42 to
3bde1cf
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sweet, works seamlessly!
- not changed in this PR but audio output in chrome family looks a bit odd. It's not a problem in firefox. To unify the look,
border-radius: 100px;can be used for all the audio elements.
- It would be nice to update the title of the chat after the transcript of the first audio comes in.
| try { | ||
| $task = $this->taskProcessingManager->getTask($ocpTaskId); | ||
| $this->taskProcessingManager->deleteTask($task); | ||
| } catch (\OCP\TaskProcessing\Exception\Exception) { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not silent the exception and let the user know that the task deletion was unsuccessful. It most likely will be a DB failure which would throw in the next call $this->sessionMapper->deleteSession anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't care that much if the task has not been deleted. It can be caused by either:
- the task is not found: all good nothing to delete
- the task couldn't be deleted for some reason: all good it will be cleaned up later by the task processing cleanup bg job
I think the user does not need to know there are tasks behind the scene.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense.
Would you mind adding these two points as comments there too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
@kyteinsky Thank you for the review! I think I addressed everything. |
Signed-off-by: Julien Veyssier <[email protected]>
…s in the backend, schedule proper audioChat task Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
…f the server task type exists Signed-off-by: Julien Veyssier <[email protected]>
…t /task-types endpoint Signed-off-by: Julien Veyssier <[email protected]>
… the logic to schedule audio tasks for agency Signed-off-by: Julien Veyssier <[email protected]>
…al settings task type availability values Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
…an use in the history instead of the transcripts Signed-off-by: Julien Veyssier <[email protected]>
… prevent deleting a message from another session Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
…t ContextAgentAudioInteraction in the assistant task type list, change the audio html tag border radius Signed-off-by: Julien Veyssier <[email protected]>
…sageById Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
…sing phpDoc, rename autoplay_audio_chat and audio_chat_available initial states Signed-off-by: Julien Veyssier <[email protected]>
Signed-off-by: Julien Veyssier <[email protected]>
… do it when we get its transcript Signed-off-by: Julien Veyssier <[email protected]>
f76d909 to
1bec314
Compare
…essage failed Signed-off-by: Julien Veyssier <[email protected]>
marcelklehr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Prevent cleaning up chat attachments (Or just copy them to user directory so we can manage them ourselves)
- lint:fix
Signed-off-by: Julien Veyssier <[email protected]>
1bec314 to
cf6648a
Compare
kyteinsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀




Add the ability to record/submit audio input in the chat UI, run an "Audio Chat" task and to display the audio output and its transcription.
audio_idoptional output of the AudioToAudioChat tasks and use it to build the history instead of only using the transcriptsaudio_expires_atoptional output of the AudioToAudioChat tasksChattyLLMController::deleteMessage)ChattyLLMController::checkMessageGenerationTaskthat was failing if the message generation task finished successfully but there was no message created yetRequirements to test this