Skip to content

A programming framework for agentic AI

Fix syntax error in user-defined-functions docs (unecessarily capitalized) (#3336)

Suchit G0b19aa74d4bf
diff --git a/website/docs/topics/code-execution/user-defined-functions.ipynb b/website/docs/topics/code-execution/user-defined-functions.ipynb
index ade02dfc0..7697f7393 100644
--- a/website/docs/topics/code-execution/user-defined-functions.ipynb
+++ b/website/docs/topics/code-execution/user-defined-functions.ipynb
@@ -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",
@@ -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",
@@ -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",
@@ -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",