已合并
fix: 修复仲景问题 #88
张雅晴创建于 4月13日
fix: 修复仲景问题 #88
已合并
共 3 个文件变更+9-88
| @@ -1 +1 @@ | |||
| 1 | -Subproject commit c36396ab7423e6a3123dea85ec6be73c1aff5859 | 1 | +Subproject commit fe293f7256627a7541f924b1b9a316e57f927d2c |
Dapplications/lowcode_agent/openjiuwen_runtime/examples/lowcode_agent/test-export-simpleAgent.json+0-79
| @@ -1,79 +0,0 @@ | |||
| 1 | -{ | ||
| 2 | - "version": "0.1.1", | ||
| 3 | - "agent": { | ||
| 4 | - "agent_id": "ab7b4536-047b-42c7-8f14-3910edf2339b", | ||
| 5 | - "agent_version": "draft", | ||
| 6 | - "latest_publish_time": null, | ||
| 7 | - "latest_publish_version": null, | ||
| 8 | - "primary_id": 1174, | ||
| 9 | - "space_id": "03852674", | ||
| 10 | - "agent_name": "test", | ||
| 11 | - "description": "测试", | ||
| 12 | - "agent_type": "react", | ||
| 13 | - "icon": "🤖", | ||
| 14 | - "edit_mode": "manual", | ||
| 15 | - "prompt_template_name": "", | ||
| 16 | - "auto_generated_prompt": "", | ||
| 17 | - "opening_remarks": "您好!我是您的智能助手,很高兴为您服务。请问有什么可以帮助您的吗?", | ||
| 18 | - "default_response": null, | ||
| 19 | - "configs": { | ||
| 20 | - "retrieval_config": { | ||
| 21 | - "topk": 5, | ||
| 22 | - "use_sync": false, | ||
| 23 | - "use_agent": false, | ||
| 24 | - "retrieval_type": 2, | ||
| 25 | - "score_threshold": 0.5 | ||
| 26 | - } | ||
| 27 | - }, | ||
| 28 | - "plugins": [], | ||
| 29 | - "workflows": [], | ||
| 30 | - "model_id": 147, | ||
| 31 | - "agent_model_config": { | ||
| 32 | - "top_p": 0.9, | ||
| 33 | - "timeout": 300, | ||
| 34 | - "temperature": 0.7 | ||
| 35 | - }, | ||
| 36 | - "prompt_template": [], | ||
| 37 | - "constraint": { | ||
| 38 | - "max_iteration": 5, | ||
| 39 | - "reserved_max_chat_rounds": 10 | ||
| 40 | - }, | ||
| 41 | - "prompt_tuning": {}, | ||
| 42 | - "triggers": [], | ||
| 43 | - "knowledge": [], | ||
| 44 | - "memory": { | ||
| 45 | - "max_tokens": 1000, | ||
| 46 | - "memory_base": null, | ||
| 47 | - "variable_config": null, | ||
| 48 | - "longterm_memory_config": false | ||
| 49 | - }, | ||
| 50 | - "create_time": 1772260500738, | ||
| 51 | - "update_time": 1772704484102 | ||
| 52 | - }, | ||
| 53 | - "dependencies": { | ||
| 54 | - "workflows": [], | ||
| 55 | - "plugins": [], | ||
| 56 | - "knowledge_bases": [], | ||
| 57 | - "prompt_templates": [] | ||
| 58 | - }, | ||
| 59 | - "metadata": { | ||
| 60 | - "export_time": "2026-03-05T09:54:47.966503+00:00", | ||
| 61 | - "export_by": "test", | ||
| 62 | - "agent_studio_version": "0.1.1" | ||
| 63 | - }, | ||
| 64 | - "model_references": { | ||
| 65 | - "siliconflow/Qwen/Qwen3-8B": { | ||
| 66 | - "provider": "siliconflow", | ||
| 67 | - "model_type": "Qwen/Qwen3-8B", | ||
| 68 | - "name": "Qwen/Qwen3-8B", | ||
| 69 | - "base_url": "https://api.siliconflow.cn/v1", | ||
| 70 | - "api_key": "sk-xxx", | ||
| 71 | - "timeout": 300, | ||
| 72 | - "parameters": { | ||
| 73 | - "top_p": 0.9, | ||
| 74 | - "max_tokens": 5000, | ||
| 75 | - "temperature": 0.7 | ||
| 76 | - } | ||
| 77 | - } | ||
| 78 | - } | ||
| 79 | -} | ||
| @@ -13,7 +13,7 @@ Reference: OPENJIUWEN_RUNTIME_DESIGN_V2.md Section 3.3 | |||
| 13 | from typing import Dict, Any | 13 | from typing import Dict, Any |
| 14 | 14 | ||
| 15 | from openjiuwen_runtime.foundation.log import get_logger | 15 | from openjiuwen_runtime.foundation.log import get_logger |
| 16 | -from openjiuwen_runtime.service import PluginApp | 16 | +from service.openjiuwen_runtime.service import PluginApp |
| 17 | 17 | ||
| 18 | logger = get_logger(__name__) | 18 | logger = get_logger(__name__) |
| 19 | 19 | ||
| @@ -121,7 +121,7 @@ async def divide(a: float, b: float) -> Dict[str, Any]: | |||
| 121 | 121 | ||
| 122 | if __name__ == "__main__": | 122 | if __name__ == "__main__": |
| 123 | logger.info( | 123 | logger.info( |
| 124 | - "Starting CalculatorTools Plugin on http://127.0.0.1:8092\n\n" | 124 | + "Starting CalculatorTools Plugin on http://127.0.0.1:8090\n\n" |
| 125 | "Available endpoints:\n" | 125 | "Available endpoints:\n" |
| 126 | " GET /health - 健康检查\n" | 126 | " GET /health - 健康检查\n" |
| 127 | " GET /tools - 列出所有工具\n" | 127 | " GET /tools - 列出所有工具\n" |
| @@ -130,14 +130,14 @@ if __name__ == "__main__": | |||
| 130 | " POST /tools/subtract - 减法工具\n" | 130 | " POST /tools/subtract - 减法工具\n" |
| 131 | " POST /tools/divide - 除法工具\n\n" | 131 | " POST /tools/divide - 除法工具\n\n" |
| 132 | "Example usage:\n" | 132 | "Example usage:\n" |
| 133 | - ' curl -X POST http://127.0.0.1:8092/tools/add -H "Content-Type: application/json" ' | 133 | + ' curl -X POST http://127.0.0.1:8090/tools/add -H "Content-Type: application/json" ' |
| 134 | ' -d \'{"a": 5, "b": 3}\'\n' | 134 | ' -d \'{"a": 5, "b": 3}\'\n' |
| 135 | - ' curl -X POST http://127.0.0.1:8092/tools/multiply -H "Content-Type: application/json" ' | 135 | + ' curl -X POST http://127.0.0.1:8090/tools/multiply -H "Content-Type: application/json" ' |
| 136 | ' -d \'{"a": 4, "b": 7}\'\n' | 136 | ' -d \'{"a": 4, "b": 7}\'\n' |
| 137 | - ' curl -X POST http://127.0.0.1:8092/tools/subtract -H "Content-Type: application/json" ' | 137 | + ' curl -X POST http://127.0.0.1:8090/tools/subtract -H "Content-Type: application/json" ' |
| 138 | ' -d \'{"a": 10, "b": 3}\'\n' | 138 | ' -d \'{"a": 10, "b": 3}\'\n' |
| 139 | - ' curl -X POST http://127.0.0.1:8092/tools/divide -H "Content-Type: application/json" ' | 139 | + ' curl -X POST http://127.0.0.1:8090/tools/divide -H "Content-Type: application/json" ' |
| 140 | ' -d \'{"a": 20, "b": 4}\'\n\n' | 140 | ' -d \'{"a": 20, "b": 4}\'\n\n' |
| 141 | - "API documentation: http://127.0.0.1:8092/docs\n" | 141 | + "API documentation: http://127.0.0.1:8090/docs\n" |
| 142 | ) | 142 | ) |
| 143 | - app.run(host="127.0.0.1", port=8092) | 143 | + app.run() |