-
Notifications
You must be signed in to change notification settings - Fork 138
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
add new fields in the memory and refactor transport actions #1619
add new fields in the memory and refactor transport actions #1619
Conversation
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.
Thanks! lgtm, just a few comments
@@ -86,14 +88,20 @@ protected void doExecute(Task task, CreateInteractionRequest request, ActionList | |||
String rsp = request.getResponse(); | |||
String ogn = request.getOrigin(); | |||
String prompt = request.getPromptTemplate(); | |||
String additionalInfo = request.getAdditionalInfo(); | |||
Map<String, String> additionalInfo = request.getAdditionalInfo(); | |||
String parintid = request.getParent_interaction_id(); |
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.
nit: parentId
plugin/src/main/java/org/opensearch/ml/memory/MLMemoryManager.java
Outdated
Show resolved
Hide resolved
@@ -171,7 +171,7 @@ public SearchResponse processResponse(SearchRequest request, SearchResponse resp | |||
PromptUtil.getPromptTemplate(systemPrompt, userInstructions), | |||
answer, | |||
GenerativeQAProcessorConstants.RESPONSE_PROCESSOR_TYPE, | |||
jsonArrayToString(searchResults) | |||
Collections.singletonMap("metadata", jsonArrayToString(searchResults)) |
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.
can use the key "search_results"
?
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.
Ok let's make it consistent with the previous tests. Will update in the next PR.
c4729fd
to
776cc2b
Compare
Signed-off-by: Xun Zhang <[email protected]>
776cc2b
to
33ffd83
Compare
affd351
into
opensearch-project:feature/agent_framework_dev
Description
Add the new fields in the Memory and refactor the transport actions to support more ML applications.
Issues Resolved
[List any issues this PR will resolve]
Check List
All APIs are working after this change with BWC. The APIs also takes inputs for the new fields.
Some UTs still failing.
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.