Commit Graph

49 Commits

Author SHA1 Message Date
mengyonghao
e08e761319 fix(workflow): adapt node ID regex to support symbols 2025-12-31 12:07:59 +08:00
孟永豪
0e5397bcf4 Merge #86 into develop from feature/20251219_myh
fix(workflow): prevent duplicate conditional branches in if-else nodes

* feature/20251219_myh: (3 commits squashed)

  - perf(workflow): adjust default template to be compatible with frontend format

  - fix: correct function naming for memory retrieval

  - fix(workflow): prevent duplicate conditional branches in if-else nodes

Signed-off-by: Eternity <1533512157@qq.com>
Reviewed-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>
Merged-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/86
2025-12-30 07:53:49 +00:00
孟永豪
9bedcadca4 Merge #80 into develop from feature/20251219_myh
feat(workflow): support cycle nodes in workflow config validation and enhance node logging

* feature/20251219_myh: (11 commits squashed)

  - feat(workflow): update reranker model configuration for knowledge base retrieval

  - fix(workflow): fix output issue in parameter extraction node

  - fix(workflow): fix output issue in parameter extraction node

  - feat(workflow): add user prompt to parameter extraction node

  - perf(workflow): change grouped variable input to key-value format in variable aggregator

  - feat(workflow): Add new cycle node for iterative workflow execution
    
    - Introduce a new Loop/Iteration node in the workflow engine.
    - Supports both conditional loops and iteration over lists.
    - Allows parallel execution and flattening of iteration outputs.
    - Maintains runtime state, node outputs, and loop variables for downstream nodes.
    - Enhances workflow flexibility for complex, repeated operations.

  - Merge branch &#39;develop&#39; into feature/20251219_myh
    
    # Conflicts:
    #&#9;api/app/core/workflow/nodes/configs.py
    #&#9;api/app/core/workflow/nodes/node_factory.py

  - feat(workflow): Add new cycle node for iterative workflow execution
    
    - Introduce a new Loop/Iteration node in the workflow engine.
    - Supports both conditional loops and iteration over lists.
    - Allows parallel execution and flattening of iteration outputs.
    - Maintains runtime state, node outputs, and loop variables for downstream nodes.
    - Enhances workflow flexibility for complex, repeated operations.

  - feat(workflow): support cycle nodes in workflow config validation and enhance node logging

  - feat(workflow): support cycle nodes in workflow config validation and enhance node logging

  - fix(workflow): fix compatibility with some legacy node configurations

Signed-off-by: Eternity <1533512157@qq.com>
Reviewed-by: zhuwenhui5566@163.com <zhuwenhui5566@163.com>
Reviewed-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>
Merged-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/80
2025-12-30 03:40:38 +00:00
孟永豪
b376c3d648 Merge #78 into develop from feature/20251219_myh
Merge branch &#39;develop&#39; into feature/20251219_myh

* feature/20251219_myh: (8 commits squashed)

  - feat(workflow): update reranker model configuration for knowledge base retrieval

  - fix(workflow): fix output issue in parameter extraction node

  - fix(workflow): fix output issue in parameter extraction node

  - feat(workflow): add user prompt to parameter extraction node

  - perf(workflow): change grouped variable input to key-value format in variable aggregator

  - feat(workflow): Add new cycle node for iterative workflow execution
    
    - Introduce a new Loop/Iteration node in the workflow engine.
    - Supports both conditional loops and iteration over lists.
    - Allows parallel execution and flattening of iteration outputs.
    - Maintains runtime state, node outputs, and loop variables for downstream nodes.
    - Enhances workflow flexibility for complex, repeated operations.

  - Merge branch &#39;develop&#39; into feature/20251219_myh
    
    # Conflicts:
    #&#9;api/app/core/workflow/nodes/configs.py
    #&#9;api/app/core/workflow/nodes/node_factory.py

  - feat(workflow): Add new cycle node for iterative workflow execution
    
    - Introduce a new Loop/Iteration node in the workflow engine.
    - Supports both conditional loops and iteration over lists.
    - Allows parallel execution and flattening of iteration outputs.
    - Maintains runtime state, node outputs, and loop variables for downstream nodes.
    - Enhances workflow flexibility for complex, repeated operations.

Signed-off-by: Eternity <1533512157@qq.com>
Reviewed-by: zhuwenhui5566@163.com <zhuwenhui5566@163.com>
Reviewed-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>
Merged-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com>

CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/78
2025-12-29 11:57:13 +00:00
谢俊男
284951900d feat(workflow-node): question_classfier node development 2025-12-29 17:01:19 +08:00
mengyonghao
ca89aba548 perf(prompt_opt): improve prompt optimization and model output quality 2025-12-26 17:45:14 +08:00
mengyonghao
fc15a7793a feat(workflow): add parameter extraction node
- Implemented ParameterExtractorNode to extract structured parameters from input text using LLM.
- Supports dynamic Jinja2 prompt rendering with field descriptions and types.
- Integrates with RedBearLLM and ModelConfigService for model retrieval.
- Handles JSON repair and raises clear BusinessException on parsing errors.
2025-12-26 14:39:17 +08:00
mengyonghao
7181d41e51 feat(workflow): add VariableAggregatorNode for aggregating workflow variables 2025-12-25 18:38:53 +08:00
mengyonghao
eeb7a3a68d feat(workflow): add Jinja2 template rendering node 2025-12-25 16:54:57 +08:00
mengyonghao
0b141fb952 fix(workflow): fix missing re-ranking for hybrid retrieval results in knowledge base node, add config example 2025-12-25 14:47:22 +08:00
mengyonghao
aef7ae2cce feat(workflow): add default User-Agent and redirect following for HTTP request node, add config example 2025-12-25 14:44:47 +08:00
mengyonghao
8accd36f9e feat(workflow): support variables wrapped with {{}} in assignment nodes, add input config example 2025-12-25 14:41:41 +08:00
mengyonghao
68901e2642 fix(workflow): correct property usage in HTTP request node 2025-12-24 21:32:38 +08:00
mengyonghao
3993aa55ea refactor(workflow): organize knowledge base code structure and add comments 2025-12-24 21:24:21 +08:00
mengyonghao
31a7727992 feat(workflow): add HTTP request node
- Introduce a new HttpRequestNode to enable external HTTP API calls in workflows
- Support multiple HTTP methods (GET, POST, PUT, DELETE, PATCH, HEAD)
- Support authentication strategies (None, Basic, Bearer, Custom header)
- Support multiple request body types (JSON, form-data, x-www-form-urlencoded, raw)
- Add configurable timeout, retry, and SSL verification
- Provide flexible error handling strategies (none, default response, branch)
2025-12-24 21:23:08 +08:00
Mark
63d5047d21 [fix] end stream output 2025-12-24 12:37:50 +08:00
mengyonghao
1253bedcde fix(db): fix database connection handling 2025-12-24 12:23:16 +08:00
mengyonghao
0a8c1be084 fix(db): fix database connection handling 2025-12-24 12:22:59 +08:00
mengyonghao
38220006a6 fix(db): fix database connection handling 2025-12-24 12:21:12 +08:00
mengyonghao
8c4d31e4d5 feat(workflow): implement a workflow node for knowledge base retrieval 2025-12-24 12:10:52 +08:00
mengyonghao
d423e80ddb feat(workflow): support multi-variable assignment in assigner node 2025-12-23 17:45:37 +08:00
mengyonghao
28e88c2d4c fix(workflow): fix incorrect list append logic in assigner node 2025-12-23 16:57:59 +08:00
mengyonghao
0ad5d1b662 fix(workflow): fix incorrect list extend logic in assigner node 2025-12-23 16:57:59 +08:00
mengyonghao
6b2c69ebf4 fix(workflow): fix incorrect list append/pop logic in assigner node 2025-12-23 16:57:59 +08:00
mengyonghao
054a5976f5 feat(workflow): add assigner node and fix circular imports with minor code style cleanup 2025-12-23 16:57:59 +08:00
mengyonghao
75ee591202 style(workflow): remove unnecessary indentation 2025-12-23 16:57:15 +08:00
Mark
47c4f93014 [fix] end node bug 2025-12-23 16:38:25 +08:00
Mark
da6b17de2b [modify] fix workflow execute logic 2025-12-22 18:24:36 +08:00
Mark
5097fed067 [fix] end 2025-12-20 18:12:02 +08:00
Mark
639abae99f Merge branch 'develop-mark' into develop
# Conflicts:
#	api/app/core/workflow/executor.py
#	api/app/services/workflow_service.py
2025-12-20 17:51:49 +08:00
Mark
fafbe72ce2 [modify] sse format 2025-12-20 17:45:58 +08:00
Mark
43a427bac7 [modify] llm & end logic 2025-12-20 17:37:36 +08:00
Mark
36b36b729b [add] workflow llm & end logic 2025-12-20 17:25:47 +08:00
Mark
d8fcea8564 [fix] model support stream 2025-12-20 16:03:41 +08:00
谢俊男
b00d6e37e3 feat(tool system): tool system development 2025-12-20 16:03:06 +08:00
mengyonghao
00a5016c06 feat(workflow): add import for if-else node configuration 2025-12-20 15:37:08 +08:00
mengyonghao
d12b1e4a51 refactor(workflow): unify all enum classes in one file and restructure workflow node type definitions 2025-12-20 15:37:08 +08:00
mengyonghao
4e0c5ed3c1 style(enums): correct enum class name spelling 2025-12-20 15:37:08 +08:00
mengyonghao
debb2f0162 style(workflow): update condition edge comments for conditional nodes 2025-12-20 15:37:08 +08:00
mengyonghao
cb6d7b04f9 docs(samples): add config example for If-Else node
- Provide a sample configuration for the If-Else workflow node.
- Helps users understand how to define conditional branches.
2025-12-20 15:37:08 +08:00
mengyonghao
aa44b8df71 fix(expression-eval): fix variable extraction issue in Jinja2 templates
- Resolve the bug where variables inside Jinja2 template expressions were not correctly extracted.
- Ensure expressions containing {{ ... }} are parsed reliably.
2025-12-20 15:37:08 +08:00
mengyonghao
647fc27bb5 perf(types): add Union type declaration for workflow nodes
- Introduce a `Nodes` type as a Union of all workflow node classes.
- Improves type checking and IDE autocompletion.
2025-12-20 15:37:08 +08:00
mengyonghao
01ac36195a feat(workflow): add conditional branch (If-Else) node
- Introduce a new conditional branch node for workflows.
- Supports multiple case branches with logical operators (AND/OR).
- Enables workflow routing based on evaluated conditions.
2025-12-20 15:37:07 +08:00
Mark
3aff6baccb [add] workflow support stream mode 2025-12-20 15:33:23 +08:00
谢俊男
c26af11f76 feat(apikey system): tool system development 2025-12-20 15:24:28 +08:00
Mark
6c04c99073 [modify] workflow executor support stream 2025-12-20 13:59:20 +08:00
Mark
0503b26232 [add] workflow support stream mode 2025-12-18 19:46:36 +08:00
Mark
7bbef35b7d [ADD] Merge code 2025-12-15 19:53:33 +08:00
Ke Sun
c1adc62ec6 feat: Add base project structure with API and web components 2025-12-02 20:28:01 +08:00