Skip to content

Commit

Permalink
Fix formatting of admonitions in udf docs (#2188)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackgerrits authored Mar 28, 2024
1 parent dd61eaa commit f467f21
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions website/docs/topics/code-execution/user-defined-functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"source": [
"# User Defined Functions\n",
"\n",
"```mdx\n",
"````{=mdx}\n",
":::note\n",
"This is experimental and not *yet* supported by all executors. At this stage only [`LocalCommandLineCodeExecutor`](/docs/reference/coding/local_commandline_code_executor#localcommandlinecodeexecutor) is supported.\n",
"\n",
"\n",
"Currently, the method of registering tools and using this feature are different. We would like to unify them. See Github issue [here](https://github.com/microsoft/autogen/issues/2101)\n",
":::\n",
"```\n",
"````\n",
"\n",
"User defined functions allow you to define Python functions in your AutoGen program and then provide these to be used by your executor. This allows you to provide your agents with tools without using traditional tool calling APIs. Currently only Python is supported for this feature.\n",
"\n",
Expand All @@ -26,11 +26,11 @@
"\n",
"## Define the function\n",
"\n",
"```mdx\n",
"````{=mdx}\n",
":::warning\n",
"Keep in mind that the entire source code of these functions will be available to the executor. This means that you should not include any sensitive information in the function as an LLM agent may be able to access it.\n",
":::\n",
"```\n",
"````\n",
"\n",
"If the function does not require any external imports or dependencies then you can simply use the function. For example:\n"
]
Expand All @@ -52,11 +52,11 @@
"source": [
"This would be a valid standalone function.\n",
"\n",
"```mdx\n",
"````{=mdx}\n",
":::tip\n",
"Using type hints and docstrings are not required but are highly recommended. They will help the code writing agent understand the function and how to use it.\n",
":::\n",
"```\n",
"````\n",
"\n",
"If the function requires external imports or dependencies then you can use the `@with_requirements` decorator to specify the requirements. For example:"
]
Expand Down

0 comments on commit f467f21

Please sign in to comment.