Comments (6)
Thanks for your reply! I changed the url and it works. But I encountered another problem. Have you met before?
Data: {'idx': 32, 'ground_truth': ["get_company_name_by_stock_name(stock_name='AAPL')"], 'execution_result': ['Apple Inc.'], 'execution_result_type': ['exact_match']} Error: ['Wrong execution result for "get_company_name_by_stock_name(stock_name=\'AAPL\')". Expected: Apple Inc., but got: {\'message\': \'You are not subscribed to this API.\'}.'] Data: {'idx': 54, 'ground_truth': ["get_stock_price_by_stock_name(stock_name='AAPL')"], 'execution_result': [169.02], 'execution_result_type': ['structural_match']} Error: ['Wrong execution result type for "get_stock_price_by_stock_name(stock_name=\'AAPL\')". Expected type: <class \'float\'>, but got: <class \'dict\'>.'] Data: {'idx': 52, 'ground_truth': ["get_stock_history(stock_name='AAPL', interval='1mo', diffandsplits='true')"], 'execution_result': [{'1690862400': {'date': '01-08-2023', 'date_utc': 1690862400, 'open': 196.24, 'high': 196.73, 'low': 171.96, 'close': 187.87, 'volume': 1322439400, 'adjclose': 187.13}, '1693540800': {'date': '01-09-2023', 'date_utc': 1693540800, 'open': 189.49, 'high': 189.98, 'low': 167.62, 'close': 171.21, 'volume': 1337586600, 'adjclose': 170.77}, '1696132800': {'date': '01-10-2023', 'date_utc': 1696132800, 'open': 171.22, 'high': 182.34, 'low': 165.67, 'close': 170.77, 'volume': 1172719600, 'adjclose': 170.33}, '1698811200': {'date': '01-11-2023', 'date_utc': 1698811200, 'open': 171, 'high': 192.93, 'low': 170.12, 'close': 189.95, 'volume': 1099586100, 'adjclose': 189.46}, '1701406800': {'date': '01-12-2023', 'date_utc': 1701406800, 'open': 190.33, 'high': 199.62, 'low': 187.45, 'close': 192.53, 'volume': 1062774800, 'adjclose': 192.28}, '1704085200': {'date': '01-01-2024', 'date_utc': 1704085200, 'open': 187.15, 'high': 196.38, 'low': 180.17, 'close': 184.4, 'volume': 1187219300, 'adjclose': 184.16}, '1706763600': {'date': '01-02-2024', 'date_utc': 1706763600, 'open': 183.99, 'high': 191.05, 'low': 179.25, 'close': 180.75, 'volume': 1161627000, 'adjclose': 180.52}, '1709269200': {'date': '01-03-2024', 'date_utc': 1709269200, 'open': 179.55, 'high': 180.53, 'low': 168.49, 'close': 171.48, 'volume': 1432782800, 'adjclose': 171.48}, '1711944000': {'date': '01-04-2024', 'date_utc': 1711944000, 'open': 171.19, 'high': 178.36, 'low': 164.08, 'close': 169.02, 'volume': 1016085600, 'adjclose': 169.02}, '1713988801': {'date': '24-04-2024', 'date_utc': 1713988801, 'open': 166.4, 'high': 169.3, 'low': 166.21, 'close': 169.02, 'volume': 47315677, 'adjclose': 169.02}}], 'execution_result_type': ['structural_match']} Error: ['Wrong execution result pattern for "get_stock_history(stock_name=\'AAPL\', interval=\'1mo\', diffandsplits=\'true\')". Expect type Dict, but wrong number of elements in the output. Expected length: 10, but got: 1.'] Traceback (most recent call last): File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/./eval_runner.py", line 510, in <module> runner(model_names, test_categories, api_sanity_check) File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/./eval_runner.py", line 355, in runner api_status_sanity_check_executable() File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/eval_runner_helper.py", line 632, in api_status_sanity_check_executable raise BadAPIStatusError(error_msg) custom_exception.BadAPIStatusError: API Status Test Failed for Executable Section. 3 out of 28 API behaviors are not as expected. Be careful with executable test category results; they may be inaccurate.
Maybe you need to replace all "https://yahoo-finance15.p.rapidapi.com/api/" with "https://mboum-finance.p.rapidapi.com/" in the eval_checker/executable_python_function.py, eval_checker/api_status_check_ground_truth_REST.json and other files related to yahoo-finance15.
from gorilla.
I tried to change the url to https://rapidapi.com/sparior/api/mboum-finance. It works.
Thank you for your excellent work. However, I noticed that in the Berkeley Function Calling Leaderboard, the Yahoo Finance API from rapid-api (https://rapidapi.com/sparior/api/yahoo-finance15) is inaccessible, and the page returns a "not found" error.
from gorilla.
Thanks for your reply!
I changed the url and it works. But I encountered another problem. Have you met before?
Data: {'idx': 32, 'ground_truth': ["get_company_name_by_stock_name(stock_name='AAPL')"], 'execution_result': ['Apple Inc.'], 'execution_result_type': ['exact_match']} Error: ['Wrong execution result for "get_company_name_by_stock_name(stock_name=\'AAPL\')". Expected: Apple Inc., but got: {\'message\': \'You are not subscribed to this API.\'}.'] Data: {'idx': 54, 'ground_truth': ["get_stock_price_by_stock_name(stock_name='AAPL')"], 'execution_result': [169.02], 'execution_result_type': ['structural_match']} Error: ['Wrong execution result type for "get_stock_price_by_stock_name(stock_name=\'AAPL\')". Expected type: <class \'float\'>, but got: <class \'dict\'>.'] Data: {'idx': 52, 'ground_truth': ["get_stock_history(stock_name='AAPL', interval='1mo', diffandsplits='true')"], 'execution_result': [{'1690862400': {'date': '01-08-2023', 'date_utc': 1690862400, 'open': 196.24, 'high': 196.73, 'low': 171.96, 'close': 187.87, 'volume': 1322439400, 'adjclose': 187.13}, '1693540800': {'date': '01-09-2023', 'date_utc': 1693540800, 'open': 189.49, 'high': 189.98, 'low': 167.62, 'close': 171.21, 'volume': 1337586600, 'adjclose': 170.77}, '1696132800': {'date': '01-10-2023', 'date_utc': 1696132800, 'open': 171.22, 'high': 182.34, 'low': 165.67, 'close': 170.77, 'volume': 1172719600, 'adjclose': 170.33}, '1698811200': {'date': '01-11-2023', 'date_utc': 1698811200, 'open': 171, 'high': 192.93, 'low': 170.12, 'close': 189.95, 'volume': 1099586100, 'adjclose': 189.46}, '1701406800': {'date': '01-12-2023', 'date_utc': 1701406800, 'open': 190.33, 'high': 199.62, 'low': 187.45, 'close': 192.53, 'volume': 1062774800, 'adjclose': 192.28}, '1704085200': {'date': '01-01-2024', 'date_utc': 1704085200, 'open': 187.15, 'high': 196.38, 'low': 180.17, 'close': 184.4, 'volume': 1187219300, 'adjclose': 184.16}, '1706763600': {'date': '01-02-2024', 'date_utc': 1706763600, 'open': 183.99, 'high': 191.05, 'low': 179.25, 'close': 180.75, 'volume': 1161627000, 'adjclose': 180.52}, '1709269200': {'date': '01-03-2024', 'date_utc': 1709269200, 'open': 179.55, 'high': 180.53, 'low': 168.49, 'close': 171.48, 'volume': 1432782800, 'adjclose': 171.48}, '1711944000': {'date': '01-04-2024', 'date_utc': 1711944000, 'open': 171.19, 'high': 178.36, 'low': 164.08, 'close': 169.02, 'volume': 1016085600, 'adjclose': 169.02}, '1713988801': {'date': '24-04-2024', 'date_utc': 1713988801, 'open': 166.4, 'high': 169.3, 'low': 166.21, 'close': 169.02, 'volume': 47315677, 'adjclose': 169.02}}], 'execution_result_type': ['structural_match']} Error: ['Wrong execution result pattern for "get_stock_history(stock_name=\'AAPL\', interval=\'1mo\', diffandsplits=\'true\')". Expect type Dict, but wrong number of elements in the output. Expected length: 10, but got: 1.'] Traceback (most recent call last): File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/./eval_runner.py", line 510, in <module> runner(model_names, test_categories, api_sanity_check) File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/./eval_runner.py", line 355, in runner api_status_sanity_check_executable() File "/Users/4thee/Documents/gorilla/berkeley-function-call-leaderboard/eval_checker/eval_runner_helper.py", line 632, in api_status_sanity_check_executable raise BadAPIStatusError(error_msg) custom_exception.BadAPIStatusError: API Status Test Failed for Executable Section. 3 out of 28 API behaviors are not as expected. Be careful with executable test category results; they may be inaccurate.
from gorilla.
Hi @farawayxxx and @lucenzhong,
Thank you for flagging this. We will update all the impacted entries soon. Edit, see Fanjia's comment below.
btw, you need to subscribe to these APIs in order to call them, otherwise you would get the error You are not subscribed to this API.
(the one you get at index 32).
from gorilla.
Hi, followup with this issue to provide more context in addressing this.
Without logging in RapidAPI, I get page not found error as you described. After I logged in, being previously subscribed to the service, I am able to access https://rapidapi.com/sparior/api/yahoo-finance15 and it functions well to serve evaluation.
If for some reasons the above setup does not work, the below is the steps you can do to replace https://yahoo-finance15.p.rapidapi.com/api/
with https://mboum-finance.p.rapidapi.com/
:
- in
eval_checker/executable_python_function.py
replaceyahoo-finance15.p.rapidapi.com
withmboum-finance.p.rapidapi.com
inX-RapidAPI-Host
andhttps://yahoo-finance15.p.rapidapi.com/api/v1/markets/search
(also markets/quotes)
withhttps://mboum-finance.p.rapidapi.com/v1/markets/search
forget_company_name_by_stock_name
andget_stock_price_by_stock_name
. - in
data/gorilla_openfunctions_v1_test_rest.json
do the same above as well as modifying the question.
Let us know if you need further help with setting up the environment as we have also encountered difficulties with third parties API previously.
Bests,
Fanjia
from gorilla.
Thank you for your response. I have successfully run it now.
The finance15 is also accessible.
from gorilla.
Related Issues (20)
- Evaluation using vLLM and other tools HOT 1
- Test data error in executable parallel multiple function HOT 2
- distutils.errors.CompileError: command '/usr/bin/cc' failed with exit code 1
- [bug] Hosted Gorilla: <Issue> HOT 2
- LangChain Integration of Gorilla OpenFunctions-v2 HOT 5
- Consistent Metric for OSS Model Cost
- wrong datapoint field in formatter for data generation HOT 3
- [BFCL] Incorrect ground truth HOT 4
- [BFCL] Is this the same data used for the leaderboard? HOT 3
- Goex Authentication Error HOT 4
- Possible answer for "parallel_function_29" HOT 2
- [feature] functions is deprecated, use tools instead HOT 1
- How to force function calling for Gorilla OpenFunctions-v2 HOT 3
- The Urban Dictionary from the RapidAPI is not serving, can't evaluate execution data HOT 2
- How to add a model that is not in vllm HOT 5
- [BFCL] Evaluation with Correct Precision Settings for Locally-Hosted Models HOT 1
- [feature] Integrate Unify AI to Expand API Access and Optimize Performance
- [feature] Add gpt-4o-2024-08-06 with strict: true in response_format
- [BFCL] Issue with temporal models/function calling HOT 1
- [RAFT] The chunking function doesn't separate PDF document pages in the chunks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gorilla.