I have a simple assistant with file search and one function. In the shop there is a database structure for invoicing with tables products customers invoice headers and invoice lines. The user asks “add invoice number 10 to the customer pizzeria il talento”.
From my log it is clear that the execution times are biblical: 41 seconds!!!
Many operations are repeated an exaggerated number of times and consume an enormous amount of tokens.
(Many times the RUN fails and many times no response is generated.)
(in the playground i get this error that i don’t get in my software: Error streaming run: Runs in status “queued” do not accept tool outputs.)
LOG: (I hope this can help in some way!)
[2024-08-23 **10:19:57**] addMessage: asst_tfLdda9k8nXxHPi233oVshCd aggiungi una fattura numero 10 al cliente pizzeria il talento thread_1QUrReOzsymwpi1unGvbTul6
[2024-08-23 10:19:57] addMessage response: {
"id": "msg_IwmLJZkw5DFoU25NJq5MvWJt",
"object": "thread.message",
"created_at": 1724401197,
"assistant_id": null,
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"run_id": null,
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "aggiungi una fattura numero 10 al cliente pizzeria il talento",
"annotations": []
}
}
],
"attachments": [],
"metadata": {}
}
[2024-08-23 10:19:57] creaRun: https://api.openai.com/v1/threads/thread_1QUrReOzsymwpi1unGvbTul6/runs
[2024-08-23 10:19:58] Id del Run: run_WqI7DOqbpCMXT08qN1hCkf1k
[2024-08-23 10:19:59] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:00] cicloLetturaRun_1: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:00] run step: {
"object": "list",
"data": [],
"first_id": null,
"last_id": null,
"has_more": false
}
[2024-08-23 10:20:01] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:02] cicloLetturaRun_2: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:02] run step: {
"object": "list",
"data": [
{
...
"status": "in_progress",
"cancelled_at": null,
"completed_at": null,
"expires_at": 1724401797,
"failed_at": null,
"last_error": null,
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_xUUzZWXR8YdTP6xomtHdhPtO",
"type": "file_search",
"file_search": {}
}
...
}
[2024-08-23 10:20:02] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:03] cicloLetturaRun_3: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:04] run step: {
"object": "list",
"data": [
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
"object": "thread.run.step",
"created_at": 1724401203,
"run_id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"type": "message_creation",
"status": "in_progress",
...
}
[2024-08-23 10:20:04] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:05] cicloLetturaRun_4: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:05] run step: {
"object": "list",
"data": [
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
"object": "thread.run.step",
"created_at": 1724401203,
"run_id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"type": "message_creation",
"status": "in_progress",
"cancelled_at": null,
"completed_at": null,
"expires_at": 1724401797,
"failed_at": null,
"last_error": null,
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_5kheZDH3P4b8yjE6fUQcYIjQ"
}
},
"usage": null
},
{
"id": "step_JfY2pbFzvYBuR8ULbeBBYOG2",
"object": "thread.run.step",
"created_at": 1724401202,
"run_id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"type": "tool_calls",
"status": "completed",
...
}
[2024-08-23 10:20:06] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:07] cicloLetturaRun_5: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:07] run step: {
"object": "list",
"data": [
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
"object": "thread.run.step",
"created_at": 1724401203,
"run_id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"type": "message_creation",
"status": "in_progress",
...
},
{
"id": "step_JfY2pbFzvYBuR8ULbeBBYOG2",
...
"status": "completed",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_xUUzZWXR8YdTP6xomtHdhPtO",
"type": "file_search",
"file_search": {}
}
]
},
...
}
[2024-08-23 10:20:07] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:08] cicloLetturaRun_6: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:09] run step: {
"object": "list",
"data": [
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
...
"status": "in_progress",
"cancelled_at": null,
...
},
{
"id": "step_JfY2pbFzvYBuR8ULbeBBYOG2",
...
"status": "completed",
...
}
[2024-08-23 10:20:09] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:10] cicloLetturaRun_7: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:11] run step: {
"object": "list",
"data": [
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"status": "in_progress",
"cancelled_at": null,
"completed_at": null,
"expires_at": 1724401797,
"failed_at": null,
"last_error": null,
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": null
}
}
]
},
"usage": null
},
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
...
"status": "completed",
"cancelled_at": null,
"completed_at": 1724401210,
"expires_at": 1724401797,
"failed_at": null,
"last_error": null,
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_5kheZDH3P4b8yjE6fUQcYIjQ"
}
},
...
},
{
"id": "step_JfY2pbFzvYBuR8ULbeBBYOG2",
...
"status": "completed",
...
}
[2024-08-23 10:20:11] Ciclowhile: requires_action run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 0
[2024-08-23 10:20:11] required_action: {
"type": "submit_tool_outputs",
"submit_tool_outputs": {
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}"
}
}
]
}
}
[2024-08-23 10:20:11] funzione: eseguiSQL: SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';
[2024-08-23 10:20:11] eseguequerysql: https:.../fattur/apiVarie.php
[2024-08-23 10:20:11] eseguiSQL: {"sql":"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';"}
[2024-08-23 10:20:11] ActionRequired aggiungi: [{"id":3}] generico
[2024-08-23 10:20:11] eseguiSQL jsonResponse: [{"id":3}]
[2024-08-23 10:20:11] assistente outputs: [{"id":3}]
[2024-08-23 10:20:11] assistente toolOutputs: {"tool_outputs":[{"tool_call_id":"call_VuJvKbe5mKOqkLhmdiQTS2dv","output":"[{\"id\":3}]"}]}
[2024-08-23 10:20:13] cicloLetturaRun_1:
[2024-08-23 10:20:13] run step: {
"object": "list",
"data": [
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"status": "completed",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}
...
}
[2024-08-23 10:20:14] Ciclowhile: queued run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:15] cicloLetturaRun_2: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "queued",
...
}
[2024-08-23 10:20:15] run step: {
"object": "list",
"data": [
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"status": "completed",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}
...
}
[2024-08-23 10:20:15] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:16] cicloLetturaRun_3: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:17] run step: {
"object": "list",
"data": [
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
},
...
}
[2024-08-23 10:20:17] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:18] cicloLetturaRun_4: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
...
"status": "in_progress",
...
}
[2024-08-23 10:20:18] run step: {
"object": "list",
"data": [
{
"id": "step_geBXaByYFZYt7pc3O78gCn2M",
..
"type": "message_creation",
"status": "in_progress",
...
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_zFTMtm3FrrEYwhDIeMBIEMdf"
}
},
"usage": null
},
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"status": "completed",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
},
...
}
[2024-08-23 10:20:19] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:20] cicloLetturaRun_5: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
}
[2024-08-23 10:20:20] run step: {
"object": "list",
"data": [
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
...
}
[2024-08-23 10:20:20] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:21] cicloLetturaRun_6: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:22] run step: {
"object": "list",
"data": [
{
"id": "step_geBXaByYFZYt7pc3O78gCn2M",
...
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_zFTMtm3FrrEYwhDIeMBIEMdf"
}
},
"usage": null
},
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
"object": "thread.run.step",
"created_at": 1724401210,
...
"type": "tool_calls",
"status": "completed",
...
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}
...
}
[2024-08-23 10:20:22] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:23] cicloLetturaRun_7: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:23] run step: {
"object": "list",
"data": [
{
...
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}...
}
[2024-08-23 10:20:24] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:25] cicloLetturaRun_8: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:25] run step: {
"object": "list",
"data": [
{
"id": "step_WyAoramRKH7rMEThBLf6Es9u",
...
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}...
}
[2024-08-23 10:20:27] Ciclowhile: in_progress run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:28] cicloLetturaRun_9: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
"object": "thread.run",
"created_at": 1724401197,
"assistant_id": "asst_tfLdda9k8nXxHPi233oVshCd",
"thread_id": "thread_1QUrReOzsymwpi1unGvbTul6",
"status": "in_progress",
...
}
[2024-08-23 10:20:29] run step: {
"object": "list",
"data": [
{
"id": "step_WyAoramRKH7rMEThBLf6Es9u",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_R6cPALJXOSkNWgfCzNyqgdKe",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"INSERT INTO testatefattura (numero, data, idcliente, modalitapag, totaleft) VALUES (10, '2023-10-01', 3, 'bonifico', 0);\"\n}",
"output": null
}
}
]
}...
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}...
}
[2024-08-23 10:20:29] Ciclowhile: requires_action run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 1
[2024-08-23 10:20:29] required_action: {
"type": "submit_tool_outputs",
"submit_tool_outputs": {
"tool_calls": [
{
"id": "call_R6cPALJXOSkNWgfCzNyqgdKe",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"INSERT INTO testatefattura (numero, data, idcliente, modalitapag, totaleft) VALUES (10, '2023-10-01', 3, 'bonifico', 0);\"\n}"
}
}
]
}
}
[2024-08-23 10:20:29] funzione: eseguiSQL: INSERT INTO testatefattura (numero, data, idcliente, modalitapag, totaleft) VALUES (10, '2023-10-01', 3, 'bonifico', 0);
[2024-08-23 10:20:29] eseguequerysql: https://.../fattur/apiVarie.php
[2024-08-23 10:20:29] eseguiSQL: {"sql":"INSERT INTO testatefattura (numero, data, idcliente, modalitapag, totaleft) VALUES (10, '2023-10-01', 3, 'bonifico', 0);"}
[2024-08-23 10:20:29] ActionRequired aggiungi: [] generico
[2024-08-23 10:20:29] eseguiSQL jsonResponse: []
[2024-08-23 10:20:29] assistente outputs: []
[2024-08-23 10:20:29] assistente toolOutputs: {"tool_outputs":[{"tool_call_id":"call_R6cPALJXOSkNWgfCzNyqgdKe","output":"[]"}]}
[2024-08-23 10:20:31] cicloLetturaRun_1:
...
...
...
[2024-08-23 10:20:37] Ciclowhile: completed run_WqI7DOqbpCMXT08qN1hCkf1k, nAction 2
[2024-08-23 10:20:38] cicloLetturaRun_5: {
"id": "run_WqI7DOqbpCMXT08qN1hCkf1k",
...
"status": "completed",
...
}
[2024-08-23 10:20:38] run step: {
"object": "list",
"data": [
{
"id": "step_KcJZOOBZLpEchYMO1vpfDdtH",
...
"type": "message_creation",
"status": "completed",
"cancelled_at": null,
...
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_vrGTMfxDW3oIdzGN6Xxpky8Z"
}
}...
{
"id": "step_WyAoramRKH7rMEThBLf6Es9u",
...
"created_at": 1724401224,
...
"status": "completed",
"cancelled_at": null,
"completed_at": 1724401230,
...
"tool_calls": [
{
"id": "call_R6cPALJXOSkNWgfCzNyqgdKe",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"INSERT INTO testatefattura (numero, data, idcliente, modalitapag, totaleft) VALUES (10, '2023-10-01', 3, 'bonifico', 0);\"\n}",
"output": "[]"
}
}
]
}...
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_zFTMtm3FrrEYwhDIeMBIEMdf"
}
}...
{
"id": "step_qLtWwF7b7Ov59Kz4G78c4d12",
...
"status": "completed",
...
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_VuJvKbe5mKOqkLhmdiQTS2dv",
"type": "function",
"function": {
"name": "eseguiSQL",
"arguments": "{\n \"sql\": \"SELECT id FROM clienti WHERE ragsoc = 'Pizzeria Il Talento';\"\n}",
"output": "[{\"id\":3}]"
}
}
]
}...
{
"id": "step_6V7F6LqQJjA5rFfurEYxT8fz",
...
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_5kheZDH3P4b8yjE6fUQcYIjQ"
}
}...
{
"id": "step_JfY2pbFzvYBuR8ULbeBBYOG2",
...
"status": "completed",
"cancelled_at": null,
"completed_at": 1724401203,
"expires_at": null,
"failed_at": null,
"last_error": null,
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_xUUzZWXR8YdTP6xomtHdhPtO",
"type": "file_search",
"file_search": {}
}
]
}...
}
[2024-08-23 10:20:38] cicloLetturaRun: {"id":"run_WqI7DOqbpCMXT08qN1hCkf1k","object":"thread.run","created_at":1724401197,"assistant_id":"asst_tfLdda9k8nXxHPi233oVshCd","thread_id":"thread_1QUrReOzsymwpi1unGvbTul6","status":"completed","started_at":1724401230,"expires_at":null,"cancelled_at":null,"failed_at":null,"completed_at":1724401236,"required_action":null,"last_error":null,"model":"gpt-4o","instructions":"sei esperto di SQL crea sempre una query per soddisfare le richieste dell'utente e poi esegui la query con la funzione eseguiSQL, chiedi tutti i parametri all'utente gradualmente e proponi sempre i valori di default. Per Esempio per inserire una fattura formata da testata e righe chiedi prima i dati della testata, poi la inserisci e poi chiedi i dati delle righe. ","tool_resources":[],"metadata":[],"temperature":0,"top_p":1,"max_completion_tokens":null,"max_prompt_tokens":null,"truncation_strategy":{"type":"auto","last_messages":null},"incomplete_details":null,"usage":{"prompt_tokens":11529,"completion_tokens":1052,"total_tokens":12581},"response_format":{"type":"text"},"tool_choice":"auto","parallel_tool_calls":false}
[2024-08-23 10:20:38] listMessage ruolo assistant: La testata della fattura è stata inserita con successo.
### Inserimento delle Righe della Fattura
Ora, chiediamo i dettagli delle righe della fattura.
1. **ID prodotto**: (chiedere all'utente)
2. **Descrizione**: (chiedere all'utente)
3. **Quantità**: (default: 1)
4. **Prezzo unitario**: (chiedere all'utente)
Procediamo con l'inserimento delle righe della fattura.
#### Dettagli delle Righe della Fattura
- **ID prodotto**: Puoi fornire l'ID del prodotto?
- **Descrizione**: Puoi fornire la descrizione del prodotto?
- **Quantità**: (default: 1)
- **Prezzo unitario**: Puoi fornire il prezzo unitario del prodotto?
Una volta ottenuti questi dettagli, possiamo calcolare l'imponibile come \( \text{Quantità} \times \text{Prezzo unitario} \) e inserire le righe della fattura.
[2024-08-23 10:20:38] listMessage ruolo: assistant
[2024-08-23 10:20:38] listMessage aggiunta generico: []
[2024-08-23 10:20:38] CicloRun: 1724401197.0762 1724401238.9179
[2024-08-23 **10:20:38**] CicloRun: Duration of the function:
**41.841644048691** secondi
!!!