Docs: Input and output variables defined in the Input and Output sections must also be implemented in your code. (#10162)

### What problem does this PR solve?
 
#10089 

### Type of change

- [x] Documentation Update
This commit is contained in:
writinwaters
2025-09-19 11:35:58 +08:00
committed by GitHub
parent a24547aa66
commit 4846589599
2 changed files with 14 additions and 1 deletions

View File

@ -49,6 +49,10 @@ You can specify multiple input sources for the **Code** component. Click **+ Add
This field allows you to enter and edit your source code.
:::danger IMPORTANT
If your code implementation includes defined variables, whether input or output variables, ensure they are also specified in the corresponding **Input** or **Output** sections.
:::
#### A Python code example
```Python
@ -77,6 +81,15 @@ This field allows you to enter and edit your source code.
You define the output variable(s) of the **Code** component here.
:::danger IMPORTANT
If you define output variables here, ensure they are also defined in your code implementation; otherwise, their values will be `null`. The following are two examples:
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/set_object_output.jpg)
![](https://raw.githubusercontent.com/infiniflow/ragflow-docs/main/images/set_nested_object_output.png)
:::
### Output
The defined output variable(s) will be auto-populated here.