ethz-spylab / satml-llm-ctf

Code used to run the platform for the LLM CTF colocated with SaTML 2024
https://ctf.spylab.ai
MIT License
23 stars 5 forks source link

Failed to fetch error during /api/v1/defense/{id}/evaluate-utility #35

Closed persistz closed 8 months ago

persistz commented 8 months ago

When I use the API to perform the evaluate-utility operation, the browser has a certain probability of returning the following error, which causes a lot of budget waste.

Failed to fetch. Possible Reasons:

CORS Network Failure URL scheme must be "http" or "https" for CORS request.

dedeswim commented 8 months ago

Hi, the server was overloaded and I restarted it. There is likely a memory leak. Can you try again?

persistz commented 8 months ago

OK, thanks. I will try again and close the issue.

persistz commented 8 months ago

Hi Edoardo @dedeswim ,

I refresh the website and resent the corresponding post request, but the server still returned the same error.

Code Details
Undocumented Failed to fetch. Possible Reasons: CORS Network Failure URL scheme must be "http" or "https" for CORS request.
dedeswim commented 8 months ago

Hi, can you please send what request you're sending? Remember to censor the API key

persistz commented 8 months ago

The request is:

curl -X 'POST' \
  'https://ctf.spylab.ai/api/v1/defense/xxxxx/evaluate-utility' \
  -H 'accept: application/json' \
  -H 'X-API-Key: xxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "api_keys": {
  },
  "model": "openai/gpt-3.5-turbo-1106",
  "small": true
}'

One detail is that even if the above error is returned, my account will be deducted (the amount of the deduction depends on how long the program is running), so this seems to be an error that occurred midway through the utility evaluation.

dedeswim commented 8 months ago

Can you please provide the defense ID? This won't be enough for competition participants to see your defense (they'll also need your API key)

persistz commented 8 months ago

Hi Edoardo, thank you for the timely reply. I currently suspect it caused by fluctuations in my local network, I'm closing the issue for local testing.