THUNLP-MT / StableToolBench

A new tool learning benchmark aiming at well-balanced stability and reality, based on ToolBench.
https://zhichengg.github.io/stb.github.io/
Apache License 2.0
81 stars 11 forks source link

Encounter with 500 Internal Server Error when requesting toolbench_url #9

Closed Dr-Left closed 1 month ago

Dr-Left commented 2 months ago
# config.yml
api_key: ***
api_base: ***
model: gpt-3.5-turbo
temperature: 0
toolbench_url: http://8.218.239.54:8080/rapidapi
tools_folder: "./tools"
cache_folder: "./tool_response_cache"
is_save: true
port: 8080

When the stabletoolbench server requests http://8.218.239.54:8080/rapidapi, got a response:

statuscode: 500, Internal Server Error

Is the server down?

zhichengg commented 1 month ago

Hi,

The server works well now. You can use the following code to test the status of the server:

import requests

url  = "http://8.218.239.54:8080/rapidapi"
payload = {

    "category": "Food",
    "tool_name": "yummly",
    "api_name": "categories_list",
    "tool_input": "{}",
    "strip": "truncate",
    'toolbench_key': ''
}

headers = {'toolbench_key': ''}
response = requests.post(url, json=payload, headers=headers)
print(response.text)

The error may be because the tool you are calling is not available on RapidAPI now. However, this error was not designed to trigger simulation. I have added this to simulation cases now.

Many thanks!

Dr-Left commented 1 month ago

Thank you! Yes, the api I called is no longer available on RapidAPI. Thank you for fixing the codebase!