Skip to content
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

Fix syntax error in user-defined-functions docs (unecessarily capital… #3336

Merged
merged 2 commits into from
Sep 25, 2024
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
18 changes: 9 additions & 9 deletions website/docs/topics/code-execution/user-defined-functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
],
"source": [
"code = f\"\"\"\n",
"from {LocalCommandLineCodeExecutor.FUNCTIONS_MODULE} import add_two_numbers\n",
"from {executor.functions_module} import add_two_numbers\n",
"\n",
"print(add_two_numbers(1, 2))\n",
"\"\"\"\n",
Expand Down Expand Up @@ -207,7 +207,7 @@
],
"source": [
"code = f\"\"\"\n",
"from {LocalCommandLineCodeExecutor.FUNCTIONS_MODULE} import load_data\n",
"from {executor.functions_module} import load_data\n",
"\n",
"print(load_data())\n",
"\"\"\"\n",
Expand Down Expand Up @@ -359,12 +359,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[33mcode_executor_agent\u001b[0m (to code_writer):\n",
"\u001B[33mcode_executor_agent\u001B[0m (to code_writer):\n",
"\n",
"Please use the load_data function to load the data and please calculate the average age of all people.\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mcode_writer\u001b[0m (to code_executor_agent):\n",
"\u001B[33mcode_writer\u001B[0m (to code_executor_agent):\n",
"\n",
"Below is the python code to load the data using the `load_data()` function and calculate the average age of all people. \n",
"\n",
Expand All @@ -385,21 +385,21 @@
"This code starts by importing the `load_data()` function. It then uses this function to load the data into a variable `df`. Afterwards, it calculates the average (mean) of the 'age' column in the DataFrame, before printing the result.\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[31m\n",
">>>>>>>> EXECUTING CODE BLOCK (inferred language is python)...\u001b[0m\n",
"\u001b[33mcode_executor_agent\u001b[0m (to code_writer):\n",
"\u001B[31m\n",
">>>>>>>> EXECUTING CODE BLOCK (inferred language is python)...\u001B[0m\n",
"\u001B[33mcode_executor_agent\u001B[0m (to code_writer):\n",
"\n",
"exitcode: 0 (execution succeeded)\n",
"Code output: The average age is 30.75\n",
"\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mcode_writer\u001b[0m (to code_executor_agent):\n",
"\u001B[33mcode_writer\u001B[0m (to code_executor_agent):\n",
"\n",
"Great! The code worked fine. So, the average age of all people in the dataset is 30.75 years.\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\u001b[33mcode_executor_agent\u001b[0m (to code_writer):\n",
"\u001B[33mcode_executor_agent\u001B[0m (to code_writer):\n",
"\n",
"\n",
"\n",
Expand Down
Loading