mirror of
https://github.com/microsoft/autogen.git
synced 2025-10-28 16:29:39 +00:00
Fix formatting of admonitions in udf docs (#2188)
This commit is contained in:
parent
dd61eaae43
commit
f467f21ec9
@ -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",
|
||||
@ -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"
|
||||
]
|
||||
@ -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:"
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user