-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ai): Make response parsing extensible (#14196)
Turns the response parsing method into a more flexible algorithm that can work with multiple response content matchers. Each response content matcher has a start and end regexp to define a match, as well as a `contentFactory` function that turns the matched content into a `ChatResponseContent` object. Additionally, the parsing method has a fallback content factory that will be applied to all unmatched parts, e.g. markdown by default. Both, the response content matchers and the fallback content factory and the list of matchers are extensible via DI. Contributed on behalf of STMicroelectronics.
- Loading branch information
Showing
6 changed files
with
414 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.