Giter VIP home page Giter VIP logo

Comments (6)

lucenzhong avatar lucenzhong commented on August 17, 2024 1

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.

lucenzhong avatar lucenzhong commented on August 17, 2024

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.

farawayxxx avatar farawayxxx commented on August 17, 2024

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.

HuanzhiMao avatar HuanzhiMao commented on August 17, 2024

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.

Fanjia-Yan avatar Fanjia-Yan commented on August 17, 2024

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/:

  1. in eval_checker/executable_python_function.py replace yahoo-finance15.p.rapidapi.com with mboum-finance.p.rapidapi.com in X-RapidAPI-Host and https://yahoo-finance15.p.rapidapi.com/api/v1/markets/search(also markets/quotes)
    with https://mboum-finance.p.rapidapi.com/v1/markets/search for get_company_name_by_stock_name and get_stock_price_by_stock_name.
  2. 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.

farawayxxx avatar farawayxxx commented on August 17, 2024

Thank you for your response. I have successfully run it now.
The finance15 is also accessible.

from gorilla.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.