Run "last_error":{"code":"server_error","message":"Sorry, something went wrong."}

user request: “show product of id 3”
Result: “last_error”:{“code”:“server_error”,“message”:“Sorry, something went wrong.”}
performed in playground works perfectly !!!
Some log:
whileloop: in_progress run_3ry5SHtv3dhQPGR…
[2024-08-10 15:15:30] in_progress run_3ry5SHtv3dhQPGR…
[2024-08-10 15:15:30] in_progress run_3ry5SHtv3dhQPGR…
[2024-08-10 15:15:31] failed run_3ry5SHtv3dhQPGR…
Assistant: you are an expert in SQL and can execute sql queries using the executeSQL function,
tools : file search with database structure
Function: {
“name”: “eseguiSQL”,
“description”: “esegue una query sql, esempio select * from prodotti where ID = :id”,
“strict”: false,
“parameters”: {
“type”: “object”,
“properties”: {
“sql”: {
“type”: “string”,
“description”: “comando sql per esempio select * from clienti order by ragsoc”
},
“type”: {
“tipo”: “string”,
“description”: “tipo CRUD”,
“enum”: [
“GET”,
“POST”,
“PUT”,
“DELETE”
]
},
“params”: {
“type”: “string”,
“description”: "parametri della query , esempio $params[‘:prezzo’, ‘:um’] "
},
“conditions”: {
“type”: “string”,
“description”: "condizioni della query , esempio $params[‘:id’, ‘:scorta’] "
}
},
“required”: [
“sql”,
“type”
]
}
}
A strange thing, I added List run steps and now it works!
(https://platform.openai.com/docs/api-reference/run-steps/listRunSteps)
User
show product of ID 3

Assistant
no answer

User
show product of ID 3

Assistant (now it works)
Here are the details of the product with ID 3: - Description: porcini mushrooms - Category: side dishes - Unit of Measure: kg - Price: €20.00

Sounds like it’s on your backend server side?

It connects to your database successfully in Playground, you say?

1 Like

A strange thing, I added List run steps and now it works!
(https://platform.openai.com/docs/api-reference/run-steps/listRunSteps)

User
show product of ID 3

Assistant
no answer

User
show product of ID 3

Assistant (now it works!!!)
Here are the details of the product with ID 3: - Description: porcini mushrooms - Category: side dishes - Unit of Measure: kg - Price: €20.00

I did other tests, sometimes it works sometimes it doesn’t :thinking:
sometimes ok:
[2024-08-10 22:04:28] run step: {
“object”: “list”,
“data”: [
{

“step_details”: {
“type”: “tool_calls”,
“tool_calls”: [
{
“id”: “call_vCuxyPUJOuJSerERl9ZNrViN”,
“type”: “function”,
“function”: {
“name”: “eseguiSQL”,
“arguments”: “{"sql":"SELECT * FROM prodotti WHERE ID = 3"}”,
“output”: null

sometimes ko:
“step_details”: {
“type”: “tool_calls”,
“tool_calls”: [
{
“id”: “call_7sDTuZpN5ReoDV41MaQokxd5”,
“type”: “file_search”,
“file_search”: {}

1 Like

that’s where the problem was, but it wasn’t reported, I only received the generic and useless message “server error”
‘max_prompt_tokens’ => 2000,
‘max_completion_tokens’ => 2000.

Nothing to do, the operation is random and does not allow for professional use, I will continue to test it until I see good reliability.