mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-16 12:47:19 +08:00
fix(go-agent): missing input form for ExeSQL and Browser agent nodes (#16675)
## Summary - Add Go dynamic input form support for ExeSQL and Browser components. - Align their input form metadata with the Python implementation. - Add regression tests for `/components/:component_id/input-form`.
This commit is contained in:
@@ -334,6 +334,19 @@ func (b *BrowserComponent) Inputs() map[string]string {
|
||||
}
|
||||
}
|
||||
|
||||
func (b *BrowserComponent) GetInputForm() map[string]any {
|
||||
return map[string]any{
|
||||
"prompts": map[string]any{
|
||||
"type": "text",
|
||||
"name": "Prompts",
|
||||
},
|
||||
"upload_sources": map[string]any{
|
||||
"type": "line",
|
||||
"name": "Upload sources",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
// Outputs returns the response surface.
|
||||
func (b *BrowserComponent) Outputs() map[string]string {
|
||||
return map[string]string{
|
||||
|
||||
@@ -517,6 +517,15 @@ func (c *exesqlComponent) Inputs() map[string]string {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *exesqlComponent) GetInputForm() map[string]any {
|
||||
return map[string]any{
|
||||
"sql": map[string]any{
|
||||
"name": "SQL",
|
||||
"type": "line",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (c *exesqlComponent) Outputs() map[string]string {
|
||||
return map[string]string{
|
||||
"columns": "Result-set column names.",
|
||||
|
||||
Reference in New Issue
Block a user