Skip to content
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

Conversation

Zhangxunmt
Copy link
Collaborator

@Zhangxunmt Zhangxunmt commented Nov 12, 2023

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.

Copy link
Collaborator

@HenryL27 HenryL27 left a 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();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: parentId

@@ -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))
Copy link
Collaborator

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"?

Copy link
Collaborator Author

@Zhangxunmt Zhangxunmt Nov 12, 2023

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.

@Zhangxunmt Zhangxunmt merged commit affd351 into opensearch-project:feature/agent_framework_dev Nov 13, 2023
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants