Skip to content
Merged
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
12 changes: 6 additions & 6 deletions Basic_Samples/Functions/working_with_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -615,13 +615,13 @@
" # verify function exists\n",
" if function_name not in available_functions:\n",
" return \"Function \" + function_name + \" does not exist\"\n",
" fuction_to_call = available_functions[function_name] \n",
" function_to_call = available_functions[function_name] \n",
" \n",
" # verify function has correct number of arguments\n",
" function_args = json.loads(response_message[\"function_call\"][\"arguments\"])\n",
" if check_args(fuction_to_call, function_args) is False:\n",
" if check_args(function_to_call, function_args) is False:\n",
" return \"Invalid number of arguments for function: \" + function_name\n",
" function_response = fuction_to_call(**function_args)\n",
" function_response = function_to_call(**function_args)\n",
" \n",
" print(\"Output of function call:\")\n",
" print(function_response)\n",
Expand Down Expand Up @@ -736,13 +736,13 @@
" # verify function exists\n",
" if function_name not in available_functions:\n",
" return \"Function \" + function_name + \" does not exist\"\n",
" fuction_to_call = available_functions[function_name] \n",
" function_to_call = available_functions[function_name] \n",
" \n",
" # verify function has correct number of arguments\n",
" function_args = json.loads(response_message[\"function_call\"][\"arguments\"])\n",
" if check_args(fuction_to_call, function_args) is False:\n",
" if check_args(function_to_call, function_args) is False:\n",
" return \"Invalid number of arguments for function: \" + function_name\n",
" function_response = fuction_to_call(**function_args)\n",
" function_response = function_to_call(**function_args)\n",
" \n",
" print(\"Output of function call:\")\n",
" print(function_response)\n",
Expand Down