mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Docs: Updated docs for 0.20.0 (#9169)
### What problem does this PR solve? v0.20.0 documents. ### Type of change - [x] Documentation Update
This commit is contained in:
@ -13,19 +13,17 @@ A component that enables users to integrate Python or JavaScript codes into thei
|
||||
|
||||
A **Code** component is essential when you need to integrate complex code logic (Python or JavaScript) into your Agent for dynamic data processing.
|
||||
|
||||
## Input variables
|
||||
## Configurations
|
||||
|
||||
### Input
|
||||
|
||||
You can specify multiple input sources for the **Code** component. Click **+ Add variable** in the **Input variables** section to include the desired input variables.
|
||||
|
||||
After defining an input variable, you are required to select from the dropdown menu:
|
||||
- A component ID under **Component Output**, or
|
||||
- A global variable under **Begin input**, which is defined in the **Begin** component.
|
||||
|
||||
## Coding field
|
||||
### Code
|
||||
|
||||
This field allows you to enter and edit your source code.
|
||||
|
||||
### A Python code example
|
||||
#### A Python code example
|
||||
|
||||
```Python
|
||||
def main(arg1: str, arg2: str) -> dict:
|
||||
@ -34,7 +32,7 @@ This field allows you to enter and edit your source code.
|
||||
}
|
||||
```
|
||||
|
||||
### A JavaScript code example
|
||||
#### A JavaScript code example
|
||||
|
||||
```JavaScript
|
||||
|
||||
@ -49,4 +47,12 @@ This field allows you to enter and edit your source code.
|
||||
}
|
||||
```
|
||||
|
||||
### Return values
|
||||
|
||||
You define the output variable(s) of the **Code** component here.
|
||||
|
||||
### Output
|
||||
|
||||
The defined output variable(s) will be auto-populated here.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user