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

make memory optional in conversational agent #3626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jngz-es
Copy link
Collaborator

@jngz-es jngz-es commented Mar 5, 2025

Description

Related Issues

#3614

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@jngz-es jngz-es temporarily deployed to ml-commons-cicd-env March 5, 2025 05:17 — with GitHub Actions Inactive
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 05:17 — with GitHub Actions Failure
@jngz-es jngz-es temporarily deployed to ml-commons-cicd-env March 5, 2025 05:17 — with GitHub Actions Inactive
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 05:17 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 18:19 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 18:19 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 19:08 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 19:08 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 19:45 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 19:45 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 21:02 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 5, 2025 21:02 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 00:11 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 00:11 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 19:12 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 19:12 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 21:49 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 6, 2025 21:49 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 02:20 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 02:20 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 03:56 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 03:56 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 18:45 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 18:45 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 19:48 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 19:48 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 21:55 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 7, 2025 21:55 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 01:23 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 01:23 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 22:31 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 22:31 — with GitHub Actions Failure
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 23:30 — with GitHub Actions Error
@jngz-es jngz-es had a problem deploying to ml-commons-cicd-env March 8, 2025 23:30 — with GitHub Actions Failure
)
.build()
);
if (!StringUtils.isEmpty(sessionId)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's inverse this? if (StringUtils.isEmpty()) { return emptyList; }

Comment on lines +229 to +231
List<ModelTensors> traceTensors = (conversationIndexMemory == null)
? new ArrayList<>()
: createModelTensors(sessionId, parentInteractionId);
Copy link
Contributor

@pyek-bot pyek-bot Mar 17, 2025

Choose a reason for hiding this comment

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

what about passing conversationIndexMemory to this method and returning empty list rather than using ternary operator here?

*ignore, seems like it will affect a lot of other methods using this

@@ -121,12 +122,17 @@ public MLChatAgentRunner(

@Override
public void run(MLAgent mlAgent, Map<String, String> params, ActionListener<Object> listener) {
String memoryType = mlAgent.getMemory().getType();
String memoryType = mlAgent.getMemory() == null ? null : mlAgent.getMemory().getType();
Copy link
Contributor

Choose a reason for hiding this comment

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

does the current behavior throw NPE here? wondering if there is some validation in the REST/Transport layer to check for memory, didn't see any tho

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.

2 participants