-
Notifications
You must be signed in to change notification settings - Fork 140
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
[BUG] 4 problems in memory message API response. #2344
Comments
Hi, @ramda1234786 can you elaborate more on how to reproduce? |
Ping the memory feature builder @Zhangxunmt, Xun Can you help take a look ? |
@ramda1234786, Thanks for all your feedbacks. Please check the below: |
Hi @Zhangxunmt , thanks for your reply. Below are the responses on 4 questions Question 1 First i created the memory like below using the below JSON Body
Then used the conversational_flow Agent like below to ask question as i get the memory_id from above API { Can you give me the complete Applicable body to Create Memory via API? Question 2: Yes i have used Search API to get it on descending then got another problem 3 and problem 4 which i mentioned in my first post Question 3 : No it is not same issue as Problem 1 , this is different Below is my agent
This is message Response with search
Below message you can see i am getting 3 JSON blocks one for
Why i am getting
Question: 4 This is the reason i used descending order in the JSON body as mentioned above but then i do not have scroll id to do pagination Thanks for reviewing this. RamDa |
@ramda1234786 To reply your last comment Question 1:Create memory API only requires Question 3:The For example your Agent has a
That's why you see some message with Check this tutorial https://github.com/opensearch-project/ml-commons/blob/2.x/docs/tutorials/agent_framework/RAG_with_conversational_flow_agent.md
Generally you don't need to show trace data. You can use such query to search message with
Question4:Have you tried such query?
|
@ramda1234786 To summarize your questions, we can make 2 updates to address your concerns.
In the meantime, can you try using the above search query to get the latest message and pagination. For the "origin" value, you can obtain it from the traces or just check the name of the tools in the Agent. |
In the traces, it works well, this one i highlighted in the first message. Concern is that extra
If we can address this two problem, it will be helpful and memory API will become more mature. Thanks |
@Zhangxunmt I think we should put @ramda1234786 What value do you expect to see for the origin field ? |
if you see the above messages, i am getting 3 origin in response Below message you can see i am getting 3 JSON blocks one for
I am getting extra, which i do not need it in response as i have already got the
the last extra
|
I am using conversational_flow Agent for RAG, but i am getting 4 problems in memory message API response
When we use this API : /_plugins/_ml/memory/xSDabo4BToKzewPCJxU1/messages
Problem 1 : Get List of messages shows
origin
as nullProblem 2 : The List of messages is not sorted in descending order with this API. This is needed to show latest messages. This becomes a problem to show latest message when used as pagination
?max_results=5&next_token=3
Alternatively with Search Message API : /_plugins/_ml/memory/xSDabo4BToKzewPCJxU1/_search
Problem 3 : We get a extra response with
origin
as null apart from hybrid search and llm model responseProblem 4 : there is no pagination like
scroll_id
so that we can retrieve all the messages interactionsNote : Traces of messages shows only 2 traces which is perfect as i am using only 2 steps in agent
Below is the JSON body
Below is the Response
The text was updated successfully, but these errors were encountered: