Skip to content

Function documentation format fix #879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@
{"id": "exec_parallel_46", "question": [[{"role": "user", "content": "We're planning a dinner and decided to order 101 dumplings at $0.1 each, 20 rice bowls at $10 each, 50 spring rolls at $0.5 each, and 10 noodle soups at $3 each. I need to know the total cost for our meal. Can you work that out for me?"}]], "function": [{"name": "order_food", "description": "Orders food for a customer.Return the total price.", "parameters": {"type": "dict", "properties": {"item": {"type": "array", "items": {"type": "string", "description": "the name of the product, possible options ['fries', 'dumplings', 'pizza', 'soda', 'salad', 'rice bowl', 'burger', 'cake', 'cookie', 'ice cream', 'sandwich', 'hot dog', 'noodles', 'chicken', 'beef', 'pork', 'fish', 'shrimp', 'lobster', 'crab', 'steak']."}}, "quantity": {"type": "array", "items": {"type": "integer", "description": "the number of the product purchased."}}, "price": {"type": "array", "items": {"type": "float", "description": "the number of the product purchased."}}}, "required": ["item", "quantity", "price"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["order_food(item=['dumplings'], quantity=[101], price=[0.1])", "order_food(item=['rice bowl'], quantity=[20], price=[10])", "order_food(item=['spring rolls'], quantity=[50], price=[0.5])", "order_food(item=['noodle soup'], quantity=[10], price=[3])"]}
{"id": "exec_parallel_47", "question": [[{"role": "user", "content": "I'm having a Tarantino movie marathon tonight and want to make sure I've got my facts straight for the trivia session with my friends. Can you fetch me the directors for the movies 'Pulp Fiction,' 'Reservoir Dogs,' 'Kill Bill,' and 'Django Unchained'? I'll need this info to impress the gang."}]], "function": [{"name": "get_movie_director", "description": "Fetches the director of a movie from the OMDB API.", "parameters": {"type": "dict", "properties": {"movie_name": {"type": "string", "description": "The name of the movie."}}, "required": ["movie_name"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["get_movie_director(movie_name='Pulp Fiction')", "get_movie_director(movie_name='Reservoir Dogs')", "get_movie_director(movie_name='Kill Bill')", "get_movie_director(movie_name='Django Unchained')"]}
{"id": "exec_parallel_48", "question": [[{"role": "user", "content": "I've been on a classic film binge lately and have a few iconic movies lined up for my next movie night. My cousin is staying over, so I need to ensure the films are appropriate for us to watch together. Could you check the age ratings for 'Pulp Fiction', 'The Godfather', 'Schindler's List', and 'The Dark Knight'?"}]], "function": [{"name": "get_movie_rating", "description": "Fetches the age rating of a movie from the OMDB API.", "parameters": {"type": "dict", "properties": {"movie_name": {"type": "string", "description": "The name of the movie."}}, "required": ["movie_name"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["get_movie_rating(movie_name='Pulp Fiction')", "get_movie_rating(movie_name='The Godfather')", "get_movie_rating(movie_name=\"Schindler's List\")", "get_movie_rating(movie_name='The Dark Knight')"]}
{"id": "exec_parallel_49", "question": [[{"role": "user", "content": "I'm working on a project that requires calculating the areas of various plots of land based on their corner points. For the first plot, the corners are at [1,2], [3,4], [1,4], and [3,7]; the second one has corners at [5,5], [6,7], and [7,5]; the third plot's corners are at [2,1], [4,2], [3,4], and [1,3]; and the fourth plot, which has an irregular shape, has corners at [-1,0], [2,3], [0,4], and [-2,2]. Could you provide the area calculations for these four plots?"}]], "function": [{"name": "polygon_area", "description": "Calculate the area of a polygon given its vertices using the shoelace formula.", "parameters": {"type": "dict", "properties": {"vertices": {"type": "array", "items": {"type": "array", "items": {"type": "float"}, "description": "A single vertex represented by a 2 element list [x, y]."}, "description": "The vertices of the polygon, where each vertex is a 2 element list [x, y]."}}, "required": ["vertices"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["polygon_area(vertices=[[1,2],[3,4],[1,4],[3,7]])", "polygon_area(vertices=[[5,5],[6,7],[7,5]])", "polygon_area(vertices=[[2,1],[4,2],[3,4],[1,3]])", "polygon_area(vertices=[[-1,0],[2,3],[0,4],[-2,2]])"]}
{"id": "exec_parallel_49", "question": [[{"role": "user", "content": "I'm working on a project that requires calculating the areas of various plots of land based on their corner points. For the first plot, the corners are at [1,2], [3,4], [1,4], and [3,7]; the second one has corners at [5,5], [6,7], and [7,5]; the third plot's corners are at [2,1], [4,2], [3,4], and [1,3]; and the fourth plot, which has an irregular shape, has corners at [-1,0], [2,3], [0,4], and [-2,2]. Could you provide the area calculations for these four plots?"}]], "function": [{"name": "polygon_area", "description": "Calculate the area of a polygon given its vertices using the shoelace formula.", "parameters": {"type": "dict", "properties": {"vertices": {"type": "array", "items": {"type": "array", "items": {"type": "float"}, "description": "A single vertex represented by a 2 element list [x, y]."}, "description": "The vertices of the polygon, where each vertex is a 2 element list [x, y]."}}, "required": ["vertices"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["polygon_area(vertices=[[1,2],[3,4],[1,4],[3,7]])", "polygon_area(vertices=[[5,5],[6,7],[7,5]])", "polygon_area(vertices=[[2,1],[4,2],[3,4],[1,3]])", "polygon_area(vertices=[[-1,0],[2,3],[0,4],[-2,2]])"]}
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
{"id": "exec_parallel_multiple_36", "question": [[{"role": "user", "content": "I've invested $5000 at an annual interest rate of 5% and plan to hold it for 10 years. I'd like to calculate the future value of this investment. Once I have that information, I'm considering purchasing a product from Amazon with the ASIN 'B08BHXG144' and would appreciate it if you could find out the current price for me. In addition, I'm looking up some details for a friend who lives in the area with the zip code '10001' and need to know which city this code is associated with. On a different note, for a math project, I'm working with the function f(x) = 3x^2 + 2x - 1 and I need to estimate the derivative at x = 2. Could you help me with these calculations?"}]], "function": [{"name": "calculate_future_value", "description": "Calculates the future value of an investment.", "parameters": {"type": "dict", "properties": {"present_value": {"type": "float", "description": "The present value of the investment, in dollars."}, "interest_rate": {"type": "float", "description": "The interest rate of the investment, ranging from 0 to 1."}, "periods": {"type": "integer", "description": "The number of periods, in years."}}, "required": ["present_value", "interest_rate", "periods"]}}, {"name": "retrieve_city_based_on_zipcode", "description": "Finds the city of a zipcode.", "parameters": {"type": "dict", "properties": {"zipcode": {"type": "string", "description": "The zipcode of the city."}}, "required": ["zipcode"]}}, {"name": "estimate_derivative", "description": "Estimate the derivative of a function at a given point.", "parameters": {"type": "dict", "properties": {"function": {"type": "string", "description": "The function to calculate the derivative of."}, "x": {"type": "integer", "description": "The point to calculate the derivative at."}}, "required": ["function", "x"]}}, {"name": "get_price_by_amazon_ASIN", "description": "Finds the price of a product by its Amazon ASIN.", "parameters": {"type": "dict", "properties": {"ASIN": {"type": "string", "description": "The Amazon ASIN of the product."}}, "required": ["ASIN"]}}], "execution_result_type": ["exact_match", "exact_match", "exact_match", "exact_match"], "ground_truth": ["calculate_future_value(present_value=5000, interest_rate=0.05, periods=10)", "get_price_by_amazon_ASIN(ASIN='B08BHXG144')", "retrieve_city_based_on_zipcode(zipcode='10001')", "estimate_derivative(function='lambda x: 3*x**2 + 2*x - 1', x=2)"]}
{"id": "exec_parallel_multiple_37", "question": [[{"role": "user", "content": "I've got coordinates for a place I'm doing some research on, specifically longitude 12.4924 and latitude 41.8902. I need to know what time zone it falls under. Also, I'm planning a trip to the UK next year, and I'm trying to avoid the busy holiday seasons. Could you tell me what the official holidays are for the UK in 2022?"}]], "function": [{"name": "get_time_zone_by_coord", "description": "Finds the timezone of a coordinate.", "parameters": {"type": "dict", "properties": {"long": {"type": "string", "description": "The longitude of the coordinate."}, "lat": {"type": "string", "description": "The latitude of the coordinate."}}, "required": ["long", "lat"]}}, {"name": "retrieve_holiday_by_year", "description": "Finds the holidays of a year.", "parameters": {"type": "dict", "properties": {"year": {"type": "string", "description": "The year of the holidays."}, "country": {"type": "string", "description": "The country of the holidays. Possible options: US, AT, DE, ES, FR, GB, IT, NL, PL, RO, SK, UA."}}, "required": ["year", "country"]}}], "execution_result_type": ["exact_match", "exact_match"], "ground_truth": ["get_time_zone_by_coord(long=\"12.4924\", lat=\"41.8902\")", "retrieve_holiday_by_year(year=\"2022\", country='GB')"]}
{"id": "exec_parallel_multiple_38", "question": [[{"role": "user", "content": "Alright, I've got a few tasks to take care of. I need to look up the slang definition of \"Hello World\" to settle a debate with my friend about programming jargon. While doing that, I also have to check the latest one-month stock history for Apple Inc. (AAPL), and I need the data to include dividends and stock splits. I'm working on a physics project too, so I need to figure out the density of an object that weighs 10 kilograms and occupies a space of 2 cubic meters. Oh, and for my math homework, can you help me organize these numbers in descending order: [5, 2, 9, 1, 7, 4, 6, 3, 8]?"}]], "function": [{"name": "find_term_on_urban_dictionary", "description": "Finds the definition of a term on Urban Dictionary.", "parameters": {"type": "dict", "properties": {"term": {"type": "string", "description": "The term to find the definition of."}}, "required": ["term"]}}, {"name": "calculate_density", "description": "Calculates the density of an object.", "parameters": {"type": "dict", "properties": {"mass": {"type": "float", "description": "The mass of the object, in kilograms."}, "volume": {"type": "float", "description": "The volume of the object, in cubic meters."}}, "required": ["mass", "volume"]}}, {"name": "get_stock_history", "description": "Finds the price of a stock by its stock name.", "parameters": {"type": "dict", "properties": {"stock_name": {"type": "string", "description": "The stock name of the product, in the format of the stock symbol."}, "interval": {"type": "string", "description": "The interval of the stock history. Allows one of following : 5m|15m|30m|1h|1d|1wk|1mo|3mo"}, "diffandsplits": {"type": "string", "description": "The diff and splits of the stock history. Allows one of following : true|false. Default to false"}}, "required": ["stock_name", "interval"]}}, {"name": "sort_array", "description": "Sorts an array of numbers.", "parameters": {"type": "dict", "properties": {"array": {"type": "array", "items": {"type": "float"}, "description": "The array of numbers."}, "reverse": {"type": "boolean", "description": "Whether to sort the array in reverse order, i.e., descending order.", "default": false}}, "required": ["array"]}}], "execution_result_type": ["exact_match", "structural_match", "exact_match", "exact_match"], "ground_truth": ["find_term_on_urban_dictionary(term='Hello World')", "get_stock_history(stock_name='AAPL', interval='1mo', diffandsplits='true')", "calculate_density(mass=10, volume=2)", "sort_array(array=[5, 2, 9, 1, 7, 4, 6, 3, 8], reverse=True)"]}
{"id": "exec_parallel_multiple_39", "question": [[{"role": "user", "content": "Could you fetch the current weather data for the location with the latitude 45.4215 and longitude -75.6972? Also, I need to calculate the chances of achieving exactly 3 successes out of 5 attempts, assuming there's a 50% probability of success on each attempt."}]], "function": [{"name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": {"type": "dict", "properties": {"coordinates": {"type": "array", "items": {"type": "float"}, "description": "The latitude and longitude of the location."}}, "required": ["coordinates"]}}, {"name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": {"type": "dict", "properties": {"n": {"type": "integer", "description": "The number of trials."}, "k": {"type": "integer", "description": "The number of successes."}, "p": {"type": "float", "description": "The probability of success."}}, "required": ["n", "k", "p"]}}], "execution_result_type": ["structural_match", "exact_match"], "ground_truth": ["get_weather_data(coordinates=[45.4215, -75.6972])", "calc_binomial_probability(n=5, k=3, p=0.5)"]}
{"id": "exec_parallel_multiple_39", "question": [[{"role": "user", "content": "Could you fetch the current weather data for the location with the latitude 45.4215 and longitude -75.6972? Also, I need to calculate the chances of achieving exactly 3 successes out of 5 attempts, assuming there's a 50% probability of success on each attempt."}]], "function": [{"name": "get_weather_data", "description": "Fetches weather data from the Open-Meteo API for the given latitude and longitude.", "parameters": {"type": "dict", "properties": {"coordinates": {"type": "array", "items": {"type": "float"}, "description": "The latitude and longitude of the location."}}, "required": ["coordinates"]}}, {"name": "calc_binomial_probability", "description": "Calculates the probability of getting k successes in n trials.", "parameters": {"type": "dict", "properties": {"n": {"type": "integer", "description": "The number of trials."}, "k": {"type": "integer", "description": "The number of successes."}, "p": {"type": "float", "description": "The probability of success."}}, "required": ["n", "k", "p"]}}], "execution_result_type": ["structural_match", "exact_match"], "ground_truth": ["get_weather_data(coordinates=[45.4215, -75.6972])", "calc_binomial_probability(n=5, k=3, p=0.5)"]}
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@
{"id": "exec_simple_96", "question": [[{"role": "user", "content": "I'm considering showing the movie \"Avatar\" at my family's movie night this weekend, but I need to make sure it's appropriate for all ages. Can you find out the age rating for \"Avatar\" for me?"}]], "function": [{"name": "get_movie_rating", "description": "Fetches the age rating of a movie from the OMDB API.", "parameters": {"type": "dict", "properties": {"movie_name": {"type": "string", "description": "The name of the movie."}}, "required": ["movie_name"]}}], "execution_result_type": ["exact_match"], "ground_truth": ["get_movie_rating(movie_name='Avatar')"]}
{"id": "exec_simple_97", "question": [[{"role": "user", "content": "Could you find out what the age rating is for \"Pulp Fiction\"? I'm trying to decide if it's suitable for my teenage kids to watch."}]], "function": [{"name": "get_movie_rating", "description": "Fetches the age rating of a movie from the OMDB API.", "parameters": {"type": "dict", "properties": {"movie_name": {"type": "string", "description": "The name of the movie."}}, "required": ["movie_name"]}}], "execution_result_type": ["exact_match"], "ground_truth": ["get_movie_rating(movie_name='Pulp Fiction')"]}
{"id": "exec_simple_98", "question": [[{"role": "user", "content": "I'm working on some land survey data and need to calculate the area of a particular triangular plot. I've got the coordinates of the vertices of the triangle, which are (1,2), (3,4), and (1,3). Can you help me figure out the area of this triangle using these points?"}]], "function": [{"name": "polygon_area", "description": "Calculate the area of a polygon given its vertices using the shoelace formula.", "parameters": {"type": "dict", "properties": {"vertices": {"type": "array", "items": {"type": "array", "items": {"type": "integer"}, "description": "A single vertex represented by a 2 element list [x, y]."}, "description": "The vertices of the polygon, where each vertex is a 2 element list [x, y]."}}, "required": ["vertices"]}}], "execution_result_type": ["exact_match"], "ground_truth": ["polygon_area(vertices=[[1,2],[3,4],[1,3]])"]}
{"id": "exec_simple_99", "question": [[{"role": "user", "content": "I was reviewing the basics of geometry and ended up with a challenge to calculate the area of a polygon. The polygon is defined by these vertices: [[1,2],[3,4],[1,4],[3,7]]. Can you help me determine the area of this polygon using the shoelace formula?"}]], "function": [{"name": "polygon_area", "description": "Calculate the area of a polygon given its vertices using the shoelace formula.", "parameters": {"type": "dict", "properties": {"vertices": {"type": "array", "items": {"type": "array", "items": {"type": "integer"}, "description": "A single vertex represented by a 2 element list [x, y]."}, "description": "The vertices of the polygon, where each vertex is a 2 element list [x, y]."}}, "required": ["vertices"]}}], "execution_result_type": ["exact_match"], "ground_truth": ["polygon_area(vertices=[[1,2],[3,4],[1,4],[3,7]])"]}
{"id": "exec_simple_99", "question": [[{"role": "user", "content": "I was reviewing the basics of geometry and ended up with a challenge to calculate the area of a polygon. The polygon is defined by these vertices: [[1,2],[3,4],[1,4],[3,7]]. Can you help me determine the area of this polygon using the shoelace formula?"}]], "function": [{"name": "polygon_area", "description": "Calculate the area of a polygon given its vertices using the shoelace formula.", "parameters": {"type": "dict", "properties": {"vertices": {"type": "array", "items": {"type": "array", "items": {"type": "integer"}, "description": "A single vertex represented by a 2 element list [x, y]."}, "description": "The vertices of the polygon, where each vertex is a 2 element list [x, y]."}}, "required": ["vertices"]}}], "execution_result_type": ["exact_match"], "ground_truth": ["polygon_area(vertices=[[1,2],[3,4],[1,4],[3,7]])"]}
Loading