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.
Checklist
General
Server
Client
No client changes
Motivation and Context
Up until now, Pyris and Artemis have been unnecessarily coupled, in that Pyris' responses were always of the type
IrisMessage
, and Artemis would always deserialize them as such. However, this is an inflexible approach, as it only allows for one single AI-generated variable to be returned per call to Pyris, always the one named "response". This is inflexible. Guidance templates can have an arbitrary number of generations, and it is desirable behavior that you are also able to receive all of these generated values back from Pyris. Therefore I have adapted both Pyris and Artemis to communicate in more general types, while maintaining the current use-case of only having one response.Note: This change depends on Pyris sending the updated response type as well! This will not work with the current deployment of Pyris.
See corresponding Pyris PR: ls1intum/Pyris#34
Description
IrisMessageResponseDTO
. Instead of anIrisMessage
it now contains aJsonNode content
which represents an arbitrary content response from Pyris, for instance a list of JSON objects (which is very possible to generate with a guidance template).IrisChatSessionService
andIrisHestiaSessionService
to reconstruct this arbitrary JSON into anIrisMessage
for the existing use-case. The method for Hestia is identical, but @Hialus has said this is dead code anyway and will be changed in the future in one of his PRs. For now it is just there for compilation.Steps for Testing
Prerequisites:
Development
: Add V2 Messages Endpoint Pyris#34Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Test Coverage
Screenshots