Describe the bug
The plan is correct (that took a fair bit of effort to make it work to use the array index in the input), but even though the plan claims to be correctly setting the input of the second step to the output of the first step, thats not what it ends up doing, Instead it is passing the full $DOCUMENT_LIST object to each input value.
{
"proposedPlan": {
"state": [
{
"Key": "INPUT",
"Value": ""
}
],
"steps": [
{
"state": [
{
"Key": "INPUT",
"Value": ""
}
],
"steps": [],
"parameters": [
{
"Key": "server_url",
"Value": "http://10.0.1.235:8000/"
},
{
"Key": "version",
"Value": ""
},
{
"Key": "INPUT",
"Value": ""
}
],
"outputs": [
"DOCUMENTS_LIST"
],
"next_step_index": 0,
"name": "GetDocuments",
"skill_name": "LocusPlugin",
"description": "List all documents uploaded by an user. The output of this contains values needed to use by the search endpoing for searching individual documents."
},
{
"state": [
{
"Key": "INPUT",
"Value": ""
}
],
"steps": [],
"parameters": [
{
"Key": "server_url",
"Value": "http://10.0.1.235:8000/"
},
{
"Key": "version",
"Value": ""
},
{
"Key": "document_id",
"Value": "$DOCUMENTS_LIST[0].document_id"
},
{
"Key": "model_name",
"Value": "multi-qa-MiniLM-L6-cos-v1"
},
{
"Key": "query",
"Value": "what was the first car?"
},
{
"Key": "document_type",
"Value": "$DOCUMENTS_LIST[0].document_type"
},
{
"Key": "INPUT",
"Value": ""
}
],
"outputs": [
"SEARCH_RESULT"
],
"next_step_index": 0,
"name": "DoSearch",
"skill_name": "LocusPlugin",
"description": "Perform a search over a document."
}
],
"parameters": [
{
"Key": "INPUT",
"Value": ""
}
],
"outputs": [],
"next_step_index": 0,
"name": "plan830e1fb2299546f1bd45038ed0023661",
"skill_name": "Plan",
"description": "Given the following context, accomplish the user intent.\nContext:\nuserName: Default User\nuserId: xxxx1\nINPUT: iterate thru each document in locus and ask the question \"what was the first car?\". The result of step 1 in the plan will be a list of documents, iterate thru each document and dosearch. set the inputs of dosearch with the output of each item of getdocuments. the plan is still wrong. it must set index for each output property used as an input\nmessageType: 0\nUser intent: The user intends to adjust a data processing plan in the Locus AI CoPilot system, instructing it to iterate through each document, perform a search with the question \"what was the first car?\", and then use the results for further operations, ensuring that an index is set for each output property used as an input."
},
"type": 1,
"state": 1
}
What it is actually sending the api is the entire result of the prior step
Describe the bug The plan is correct (that took a fair bit of effort to make it work to use the array index in the input), but even though the plan claims to be correctly setting the input of the second step to the output of the first step, thats not what it ends up doing, Instead it is passing the full $DOCUMENT_LIST object to each input value.
What it is actually sending the api is the entire result of the prior step