Can't make to call my API
stinkokenzo opened this issue · comments
Describe the bug
I'm trying to make a poc of the assistant to call my local api
To Reproduce
make install-arm : Docker Opencopilot
run my server on localhost:4000
Enter in localhost:8888
Create an action to get http://localhost:4000/api/test
Should get a JSON Object as an answer:
{
data: [
{
name: "A"
},
{
name: "B"
}
]
}
Can't see in the logs of my server any call.
Get an error from the chat bot:
An error occurred while trying to process your request. It seems that you are passing a dictionary
(0) instead of a string, integer, or float value. Please make sure to provide the correct data type for the variable. If you need further assistance, please let me know.
Expected behavior
Show a list of the array received
This is the Action I created:
Hi @stinkokenzo ,
Do you see anything on the browser console ? It would be helpful if you could attach the screenshot of error, network call and console.
Also, feel free to join our Discord channel here: https://discord.gg/tHRdGAvDsW. We should be able to better support you there.
I'm getting the same issue, do you have any updates on that?
I've checked the logs and probably find from where problem is coming:
*** LOGS ***
llm-server-1 | LLM Body Response
llm-server-1 | Parsed the json payload
llm-server-1 | MAKING_API_REQUEST
llm-server-1 | Error occurred during workflow check in store
llm-server-1 | HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
llm-server-1 | Workflow output {"response":"An error occurred while trying to process your request. It seems that you are passing a dictionary ({}) instead of a string, integer, or float value. Please make sure to provide the correct data type for the variable. If you need further assistance, please let me know.","error":null}
And the problem is coming from the file llm-server/routes/flow/utils/run_openai_obs.py -> run_actions() function. I'm speculating that this is occuring while generating payload for the action call.
I couldn't debug the app because I was not able to run it on my machine probperly without using docker.
No any updates for now.
I've also tried to use an external API for testing like: https://jsonplaceholder.typicode.com/todos but any luck. Same error message. So it's not a problem of context that localhost is not reachable from inside a docker.
This has been resolved, closing the issue