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 formatting of admonitions in udf docs #2188

Merged
merged 1 commit into from
Mar 28, 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
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
Loading