DEBUG
nstatus := rnodo.Select Single Node ("/Root_JSON/status") [Null]
base := C"/Root_JSON/required_action/submit_tool_outputs/tool_calls" [/Root_JSON/required_action/submit_tool_outputs/tool_calls]
n Function := rnodo.Select Single Node (base + "/function/name") [Null]
n Arguments := rnodo.Select Single Node (base + "/function/arguments") [Null]
DOMANDA:
i null sono dovuti al fatto che ad esempio status non è considerato un nodo?
Però il convertitore da json a xml mi dà: <status>requires_action</status>
Ok, comunque Select Single Node è molto utile e fa risparmiare molto tempo
è praticamente una find su un json.
una parte del mio JSON:
{
"id": "run_y9p9ecZVEJo5WLvROUrWzsKy",
"object": "thread.run",
"created_at": 1703793348,
"assistant_id": "asst_J00a337CrYjT619kZ8sUM7zE",
"thread_id": "thread_YPBOVlvx8YSbPyFekdqHjNpk",
"status": "requires_action",
"started_at": 1703793349,
"expires_at": 1703793948,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"required_action": {
"type": "submit_tool_outputs",
"submit_tool_outputs": {
"tool_calls": [
{
"id": "call_xSBIyZ2d89Fahg4r3aNfmBcZ",
"type": "function",
"function": {
"name": "getchurch",
"arguments": "{\"id\":1}"
}
}
]
}
},