-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: add mechanism to register messageParser #5
feat: add mechanism to register messageParser #5
Conversation
4ec2ac7
to
841a273
Compare
4647cb6
to
23e550f
Compare
@ruanyl @joshuali925 would you mind reviewing this PR? |
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
1851778
to
02523c3
Compare
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.
looks good thanks, just some questions
|
||
### 📈 Features/Enhancements | ||
|
||
- Add support for registerMessageParser ([#5](https://github.com/opensearch-project/dashboards-assistant/pull/5)) |
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.
why do we need to manually maintain changelog? can it be generated automatically with
https://github.com/tj/git-extras/blob/HEAD/Commands.md#git-changelog
or
https://github.com/orhun/git-cliff
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.
I thought it was a requirement set by the org. But I think this project is private so there wouldn't be an initial source to compare it to so I'd probably skip this changelog
How come this branch needs to be feature/agent-framework? |
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
* Make sure the tempResult is an array. | ||
*/ | ||
if (!Array.isArray(tempResult)) { | ||
tempResult = []; |
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.
So here we just ignore the parse results if it's not an array? If we consider this is invalid data, shall we throw error here?
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 only accept those response with correct format. I just do not want to do some error handling like wrapping a single message into an array. We should comply with the type restriction.
I understand your concern that this parser registration should be a generic solution for plugins to register their customized logic but the concept: |
Signed-off-by: SuZhou-Joe <[email protected]>
Description
This PR mainly setup a mechanism for other plugin to register their customized parser logic based on the interaction body Agent framework gives back.
Issues Resolved
List any issues this PR will resolve, e.g. Closes [...].
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.