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 memory id and interation id for non-verbose #2004

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

jngz-es
Copy link
Collaborator

@jngz-es jngz-es commented Feb 3, 2024

Description

Add memory id and parent interaction id in response.

An example,

The request,

POST /_plugins/_ml/agents/ZtW3XI0BS7ZuQOvZvMqS/_execute
{
    "parameters": {
        "question": "how many index I have?"
    }
}


Old response,

{
  "inference_results": [
    {
      "output": [
        {
          "name": "response",
          "dataAsMap": {
            "response": "Unfortunately, without access to the tools, I do not have enough information to determine the number of indexes you currently have.",
            "additional_info": {}
          }
        }
      ]
    }
  ]
}

New response,

{
  "inference_results": [
    {
      "output": [
        {
          "name": "memory_id",
          "result": "ZujBbY0BRiMrBD-_tYrq"
        },
        {
          "name": "parent_interaction_id",
          "result": "Z-jBbY0BRiMrBD-_tooF"
        },
        {
          "name": "response",
          "dataAsMap": {
            "response": "Unfortunately, without access to the tools, I do not have enough information to determine the number of indexes you currently have.",
            "additional_info": {}
          }
        }
      ]
    }
  ]
}

Issues Resolved

#1988

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Jing Zhang <jngz@amazon.com>
Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a62ecc1) 82.55% compared to head (f54151c) 82.56%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2004      +/-   ##
============================================
+ Coverage     82.55%   82.56%   +0.01%     
+ Complexity     5577     5576       -1     
============================================
  Files           540      540              
  Lines         22431    22453      +22     
  Branches       2286     2286              
============================================
+ Hits          18517    18538      +21     
- Misses         2981     2984       +3     
+ Partials        933      931       -2     
Flag Coverage Δ
ml-commons 82.56% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jngz-es jngz-es temporarily deployed to ml-commons-cicd-env February 3, 2024 08:07 — with GitHub Actions Inactive
@jngz-es jngz-es temporarily deployed to ml-commons-cicd-env February 3, 2024 08:07 — with GitHub Actions Inactive
@jngz-es jngz-es temporarily deployed to ml-commons-cicd-env February 3, 2024 08:07 — with GitHub Actions Inactive
@ylwu-amzn ylwu-amzn merged commit b84b130 into opensearch-project:main Feb 3, 2024
15 of 16 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 3, 2024
Signed-off-by: Jing Zhang <jngz@amazon.com>
(cherry picked from commit b84b130)
ylwu-amzn pushed a commit that referenced this pull request Feb 3, 2024
Signed-off-by: Jing Zhang <jngz@amazon.com>
(cherry picked from commit b84b130)

Co-authored-by: Jing Zhang <jngz@amazon.com>
@jngz-es jngz-es deleted the verbose branch February 21, 2024 17:30
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants