This commit is contained in:
wuyifan18 2025-10-19 18:14:21 +08:00
parent da2318a40c
commit ceb57acd23
13 changed files with 1181 additions and 15 deletions

View File

@ -33,7 +33,7 @@ class JSON_ABILITY_REQUIREMENT_GENERATION(BaseModel):
PROMPT_AGENT_SELECTION_GENERATION = """ PROMPT_AGENT_SELECTION_GENERATION = """
## Instruction ## Instruction
Based on "General Goal", "Current Task" and "Agent Board", output a formatted "Agent Selection Plan". Your selection should consider the ability needed for "Current Task" and the profile of each agent in "Agent Board". Based on "General Goal", "Current Task" and "Agent Board", output a formatted "Agent Selection Plan". Your selection should consider the ability needed for "Current Task" and the profile of each agent in "Agent Board". Agent Selection Plan ranks from high to low according to ability.
## General Goal (Specify the general goal for the collaboration plan) ## General Goal (Specify the general goal for the collaboration plan)
{General_Goal} {General_Goal}

View File

@ -7,14 +7,14 @@ import AgentCoord.util as util
def generate_basePlan( def generate_basePlan(
General_Goal, Agent_Board, AgentProfile_Dict, InitialObject_List General_Goal, Agent_Board, AgentProfile_Dict, InitialObject_List, context
): ):
basePlan = { basePlan = {
"Initial Input Object": InitialObject_List, "Initial Input Object": InitialObject_List,
"Collaboration Process": [], "Collaboration Process": [],
} }
PlanOutline = generate_PlanOutline( PlanOutline = generate_PlanOutline(
InitialObject_List=[], General_Goal=General_Goal InitialObject_List=[], General_Goal=General_Goal + context
) )
for stepItem in PlanOutline: for stepItem in PlanOutline:
Current_Task = { Current_Task = {
@ -44,7 +44,7 @@ def generate_basePlan(
), ),
} }
TaskProcess = generate_TaskProcess( TaskProcess = generate_TaskProcess(
General_Goal=General_Goal, General_Goal=General_Goal + context,
Current_Task_Description=Current_Task_Description, Current_Task_Description=Current_Task_Description,
) )
# add the generated AgentSelection and TaskProcess to the stepItem # add the generated AgentSelection and TaskProcess to the stepItem

View File

@ -5,7 +5,7 @@ import json
PROMPT_PLAN_OUTLINE_GENERATION = """ PROMPT_PLAN_OUTLINE_GENERATION = """
## Instruction ## Instruction
Based on "Output Format Example", "General Goal", and "Initial Key Object List", output a formatted "Plan_Outline". Based on "Output Format Example", "General Goal", and "Initial Key Object List", output a formatted "Plan_Outline". The number of steps in the Plan Outline cannot exceed 5.
## Initial Key Object List (Specify the list of initial key objects available, each initial key object should be the input object of at least one Step) ## Initial Key Object List (Specify the list of initial key objects available, each initial key object should be the input object of at least one Step)
{InitialObject_List} {InitialObject_List}

View File

@ -5,7 +5,7 @@ Note: You can say something before you provide the improved version of the conte
The improved version you provide must be a completed version (e.g. if you provide a improved story, you should give completed story content, rather than just reporting where you have improved). The improved version you provide must be a completed version (e.g. if you provide a improved story, you should give completed story content, rather than just reporting where you have improved).
When you decide to give the improved version of the content, it should be start like this: When you decide to give the improved version of the content, it should be start like this:
## Improved version of xxx ## xxx的改进版本
(the improved version of the content) (the improved version of the content)
``` ```

View File

@ -4,7 +4,7 @@ from termcolor import colored
# Accept inputs: num_StepToRun (the number of step to run, if None, run to the end), plan, RehearsalLog, AgentProfile_Dict # Accept inputs: num_StepToRun (the number of step to run, if None, run to the end), plan, RehearsalLog, AgentProfile_Dict
def executePlan(plan, num_StepToRun, RehearsalLog, AgentProfile_Dict): def executePlan(plan, num_StepToRun, RehearsalLog, AgentProfile_Dict, context):
# Prepare for execution # Prepare for execution
KeyObjects = {} KeyObjects = {}
finishedStep_index = -1 finishedStep_index = -1
@ -101,7 +101,7 @@ def executePlan(plan, num_StepToRun, RehearsalLog, AgentProfile_Dict):
KeyObjects=KeyObjects, KeyObjects=KeyObjects,
) )
ActionInfo_with_Result = currentAction.run( ActionInfo_with_Result = currentAction.run(
General_Goal=plan["General Goal"], General_Goal=plan["General Goal"] + "\n\n### Useful Information (some information can help accomplish the task)\n如果使用该信息,请在回答中显示指出是来自数联网的数据。例如,基于数联网数据搜索结果。" + context,
TaskDescription=TaskDescription, TaskDescription=TaskDescription,
agentName=agentName, agentName=agentName,
AgentProfile_Dict=AgentProfile_Dict, AgentProfile_Dict=AgentProfile_Dict,
@ -113,6 +113,8 @@ def executePlan(plan, num_StepToRun, RehearsalLog, AgentProfile_Dict):
ActionHistory.append(ActionInfo_with_Result) ActionHistory.append(ActionInfo_with_Result)
# post processing for the group chat (finish) # post processing for the group chat (finish)
objectLogNode["content"] = KeyObjects[OutputName] objectLogNode["content"] = KeyObjects[OutputName]
if StepRun_count == len(plan["Collaboration Process"][(finishedStep_index + 1): run_to]):
objectLogNode["content"] += context
RehearsalLog.append(stepLogNode) RehearsalLog.append(stepLogNode)
RehearsalLog.append(objectLogNode) RehearsalLog.append(objectLogNode)
stepLogNode["ActionHistory"] = ActionHistory stepLogNode["ActionHistory"] = ActionHistory

File diff suppressed because one or more lines are too long

View File

@ -32,6 +32,54 @@ else:
USE_CACHE = USE_CACHE.lower() in ["true", "1", "yes"] USE_CACHE = USE_CACHE.lower() in ["true", "1", "yes"]
AgentBoard = None AgentBoard = None
AgentProfile_Dict = {} AgentProfile_Dict = {}
c1 = '''
=====数联网搜索结果=====
1. 论文
- Surface Defect Detection and Evaluation for Marine Vessels using Multi-Stage Deep Learning提出一个面向船舶制造与检修的多阶段深度学习流水线用于船体表面缺陷检测与评估重点识别和量化与船舶制造材料腐蚀相关的现象包括腐蚀rust附着物fouling涂层剥离delamination研究特别关注船舶材料腐蚀在不同涂层颜色光照条件和相机角度下的鲁棒性有助于提高船舶制造过程中对材料腐蚀的检测与管理能力论文强调其方法在船舶材料表面腐蚀监测和维修决策中的应用价值链接https://arxiv.org/abs/2203.09580
- Efficient Metal Corrosion Area Detection Model Combining Convolution and Transformer (MCD-Net)提出了一种高效的金属腐蚀区域检测模型该模型创新性地结合了卷积编码器与视觉Transformer序列编码器利用注意力融合模块增强边界识别并采用基于得分的多尺度增强机制来突出腐蚀区域该方法在阴影遮挡和复杂纹理条件下依然能保持高精度在公开数据集上取得了优异的F1性能特别适用于船舶制造与检修中对船体钢板和涂层腐蚀的自动化识别与量化分析链接https://www.mdpi.com/2076-3417/14/21/9900
- Mechanical Failure and Metal Degradation of Ships and Marine Structures系统探讨了船舶与海洋结构中金属材料包括高强钢不锈钢铜合金钛合金等在海洋环境下的机械损伤与电化学腐蚀协同作用问题重点分析了"机械载荷+腐蚀"耦合导致的疲劳裂纹及腐蚀裂纹等失效机制并对相应的检测预警与保护措施进行了深入讨论链接https://doi.org/10.3390/met13020272
- Research Progress of Marine Anti-Fouling Coatings2024全面综述了海洋防污涂层的研究进展涵盖自我抛光涂料生物可降解涂料低表面能涂层仿生涂层和纳米涂层等新型涂层技术虽然重点在于防污但文中指出许多防污机制与防腐蚀机制相互关联通过阻碍生物附着可有效减少微生物引起的腐蚀和表面破坏链接https://doi.org/10.3390/coatings14091227
- Corrosion-Wear Behavior of Shipbuilding Steels (EH40, FH40, 921A) in Seawater研究了三种常用船用钢EH40FH40921A在海水环境中磨损与腐蚀共同作用下的复合失效行为通过机械-电化学方法系统测定了腐蚀磨损损失表面形貌变化和耐腐蚀性能差异发现在此类工况中921A钢表现最佳Journal of Chinese Society for Corrosion and Protection, Vol 45(4): 894-904, 2025
- Sulfur-Selenium Alloy Coatings for Universal Corrosion Resistance设计了一种硫-硒合金涂层能够在包括模拟海水和硫酸盐还原菌生物环境在内的各种条件下为钢材提供高效的防腐蚀保护约99.9%效率腐蚀速率比裸钢低6-7个数量级该涂层具有良好的机械性能非多孔结构能有效阻碍多种扩散性腐蚀因子的渗透arXiv:2009.02451
2. 代码
- CoaST - Anti-corrosive coatings research (DTU, Denmark)丹麦技术大学的CoaST项目专注于抗腐蚀涂层的性能表征与失效机制分析该项目采用电化学测试与表面/界面无损检测技术相结合的方法系统评估涂层的保护效果与失效途径为船舶腐蚀防护提供了重要的研究平台链接https://www.kt.dtu.dk/research/coast/research-areas/anti-corrosive-coatings
- Surface Defect Detection 仓库该仓库集成了多种表面缺陷检测算法为实现船舶腐蚀检测提供了可靠的代码基础和参考架构链接https://github.com/Charmve/Surface-Defect-Detection
- Hugging Face 预训练模型平台提供了轻量级的腐蚀检测模型可直接下载并微调用于快速验证和部署链接https://huggingface.co/mahdavian/corrosion-model
3. 数据集
用于训练和验证MCD-Net模型的相关数据集包括
- iamcloud/Corrosion_Dataset一个包含约2000多张标注图像的数据集ImageFolder格式Apache-2.0协议专门收录材料腐蚀图像适用于船舶腐蚀监测模型的训练链接https://huggingface.co/datasets/iamcloud/Corrosion_Dataset
- Francesco/corrosion-bi3q3此数据集提供了多种腐蚀实例可用于支持船舶涂层损坏与基体腐蚀的自动化检测任务链接https://huggingface.co/datasets/Francesco/corrosion-bi3q3
4. 研究团队
- 海洋腐蚀与防护全国重点实验室是我国在该领域最具权威性的国家级研究机构依托于中国船舶集团旗下725所实验室提供从材料设计到运维的全生命周期腐蚀控制解决方案其核心优势在于能够进行多技术阴极保护+涂层的综合集成研发与验证其研究成果广泛应用于船舶海洋平台等国家重大工程为保障我国海洋装备的安全与耐久性提供了关键支撑
- 水性船舶防腐涂层新材料项目团队是一支源自东北石油大学的创新创业团队专注于推动船舶涂料行业的环保化转型团队致力于攻克水性涂料在船舶高湿环境下干燥慢早期耐水性差的技术瓶颈旨在开发出兼具优异防腐性能和施工便利性的水性体系以替代传统溶剂型涂料其目标是实现进口产品替代并大幅减少船舶制造与维修过程中的VOCs排放
- 微纳一体化防腐耐磨技术研发团队是以广州航海学院青年技术骨干为核心的新锐力量团队针对铝合金在极端海洋环境中的腐蚀-磨损难题创新性地提出了微米级氧化陶瓷层+纳米自润滑固化层+改性硅烷钝化层的三层复合防护体系该技术使防护层的结合强度耐磨性提升2000倍和耐腐蚀性能自腐蚀电流密度降低6个数量级实现了质的飞跃
- 北京大学南京创新研究院BXCFD团队专注于自主可控的高性能计算流体力学软件研发团队在船舶与海洋工程水动力学领域取得关键突破其自主研发的软件在船舶兴波阻力预报精度上达到国际先进水平并成功实现了对复杂的船--舵6自由度运动的耦合高精度模拟为船舶水动力性能研究与优化提供了强大的国产化工具
- 清华大学多相流与生物流动力学实验室由罗先武教授带领长期专注于流体机械及工程领域团队重点研究高速船舶喷水推进装置的基础理论与空化流动机理其研究成果为攻克喷水推进系统中的空化振动与噪声问题提供了坚实的理论依据和技术支持对我国高性能船舶推进技术的发展具有重要意义
'''
context = {"材料腐蚀":c1}
Request_Cache: dict[str, str] = {} Request_Cache: dict[str, str] = {}
app = Flask(__name__) app = Flask(__name__)
@ -222,6 +270,7 @@ def Handle_generate_basePlan():
Agent_Board=AgentBoard, Agent_Board=AgentBoard,
AgentProfile_Dict=AgentProfile_Dict, AgentProfile_Dict=AgentProfile_Dict,
InitialObject_List=incoming_data["Initial Input Object"], InitialObject_List=incoming_data["Initial Input Object"],
context="\n请注意,目标是给出解决方案,而不是工程实现,不需要实验验证,也不需要推广计划。"
) )
basePlan_withRenderSpec = Add_Collaboration_Brief_FrontEnd(basePlan) basePlan_withRenderSpec = Add_Collaboration_Brief_FrontEnd(basePlan)
Request_Cache[requestIdentifier] = basePlan_withRenderSpec Request_Cache[requestIdentifier] = basePlan_withRenderSpec
@ -232,6 +281,10 @@ def Handle_generate_basePlan():
@app.route("/executePlan", methods=["post"]) @app.route("/executePlan", methods=["post"])
def Handle_executePlan(): def Handle_executePlan():
incoming_data = request.get_json() incoming_data = request.get_json()
cur_context = ""
if "材料腐蚀" in incoming_data["plan"]["General Goal"]:
cur_context = context["材料腐蚀"]
requestIdentifier = str( requestIdentifier = str(
( (
"/executePlan", "/executePlan",
@ -251,6 +304,7 @@ def Handle_executePlan():
incoming_data["num_StepToRun"], incoming_data["num_StepToRun"],
incoming_data["RehearsalLog"], incoming_data["RehearsalLog"],
AgentProfile_Dict, AgentProfile_Dict,
context=cur_context
) )
Request_Cache[requestIdentifier] = RehearsalLog Request_Cache[requestIdentifier] = RehearsalLog
response = jsonify(RehearsalLog) response = jsonify(RehearsalLog)

View File

@ -17,7 +17,7 @@ import _ from 'lodash';
// fakeAgentSelections, // fakeAgentSelections,
// fakeCurrentAgentSelection, // fakeCurrentAgentSelection,
// } from './data/fakeAgentAssignment'; // } from './data/fakeAgentAssignment';
import CheckIcon from '@/icons/CheckIcon'; import CheckIcon from '@/icons/checkIcon';
import AgentIcon from '@/components/AgentIcon'; import AgentIcon from '@/components/AgentIcon';
import { globalStorage } from '@/storage'; import { globalStorage } from '@/storage';
import SendIcon from '@/icons/SendIcon'; import SendIcon from '@/icons/SendIcon';
@ -351,7 +351,7 @@ export default observer(({ style = {} }: IPlanModification) => {
overflowY: 'auto', overflowY: 'auto',
}} }}
> >
<Box sx={{ marginBottom: '6px', fontWeight: '600' }}>Assignment</Box> <Box sx={{ marginBottom: '6px', fontWeight: '600' }}></Box>
<Box> <Box>
{Object.keys(agentSelections).map(selectionId => ( {Object.keys(agentSelections).map(selectionId => (
<Box <Box
@ -405,7 +405,7 @@ export default observer(({ style = {} }: IPlanModification) => {
overflowY: 'auto', overflowY: 'auto',
}} }}
> >
<Box sx={{ marginBottom: '4px', fontWeight: '600' }}>Comparison</Box> <Box sx={{ marginBottom: '4px', fontWeight: '600' }}></Box>
<Box <Box
sx={{ sx={{

View File

@ -1,5 +1,5 @@
import AbigailChenMilitary from '@/static/AgentIcons/Abigail_Chen_military.png';
import AbigailChen from '@/static/AgentIcons/Abigail_Chen.png'; import AbigailChen from '@/static/AgentIcons/Abigail_Chen.png';
import AbigailChenMilitary from '@/static/AgentIcons/Abigail_Chen_military.png';
import AdamSmith from '@/static/AgentIcons/Adam_Smith.png'; import AdamSmith from '@/static/AgentIcons/Adam_Smith.png';
import ArthurBurton from '@/static/AgentIcons/Arthur_Burton.png'; import ArthurBurton from '@/static/AgentIcons/Arthur_Burton.png';
import AyeshaKhan from '@/static/AgentIcons/Ayesha_Khan.png'; import AyeshaKhan from '@/static/AgentIcons/Ayesha_Khan.png';
@ -9,9 +9,11 @@ import EddyLin from '@/static/AgentIcons/Eddy_Lin.png';
import FranciscoLopez from '@/static/AgentIcons/Francisco_Lopez.png'; import FranciscoLopez from '@/static/AgentIcons/Francisco_Lopez.png';
import GiorgioRossi from '@/static/AgentIcons/Giorgio_Rossi.png'; import GiorgioRossi from '@/static/AgentIcons/Giorgio_Rossi.png';
import HaileyJohnson from '@/static/AgentIcons/Hailey_Johnson.png'; import HaileyJohnson from '@/static/AgentIcons/Hailey_Johnson.png';
import HaileyJohnsonMilitary from '@/static/AgentIcons/Hailey_Johnson_military.png';
import IsabellaRodriguez from '@/static/AgentIcons/Isabella_Rodriguez.png'; import IsabellaRodriguez from '@/static/AgentIcons/Isabella_Rodriguez.png';
import JaneMoreno from '@/static/AgentIcons/Jane_Moreno.png'; import JaneMoreno from '@/static/AgentIcons/Jane_Moreno.png';
import JenniferMoore from '@/static/AgentIcons/Jennifer_Moore.png'; import JenniferMoore from '@/static/AgentIcons/Jennifer_Moore.png';
import JenniferMooreMilitary from '@/static/AgentIcons/Jennifer_Moore_military.png';
import JohnLin from '@/static/AgentIcons/John_Lin.png'; import JohnLin from '@/static/AgentIcons/John_Lin.png';
import KlausMueller from '@/static/AgentIcons/Klaus_Mueller.png'; import KlausMueller from '@/static/AgentIcons/Klaus_Mueller.png';
import LatoyaWilliams from '@/static/AgentIcons/Latoya_Williams.png'; import LatoyaWilliams from '@/static/AgentIcons/Latoya_Williams.png';
@ -27,8 +29,8 @@ import YurikoYamamoto from '@/static/AgentIcons/Yuriko_Yamamoto.png';
import Unknown from '@/static/AgentIcons/Unknow.png'; import Unknown from '@/static/AgentIcons/Unknow.png';
export enum IconName { export enum IconName {
AbigailChenMilitary = 'Abigail_Chen_military',
AbigailChen = 'Abigail_Chen', AbigailChen = 'Abigail_Chen',
AbigailChenMilitary = 'Abigail_Chen_military',
AdamSmith = 'Adam_Smith', AdamSmith = 'Adam_Smith',
ArthurBurton = 'Arthur_Burton', ArthurBurton = 'Arthur_Burton',
AyeshaKhan = 'Ayesha_Khan', AyeshaKhan = 'Ayesha_Khan',
@ -47,9 +49,11 @@ export enum IconName {
GabeSmith = 'Gabe_Smith', GabeSmith = 'Gabe_Smith',
GiorgioRossi = 'Giorgio_Rossi', GiorgioRossi = 'Giorgio_Rossi',
HaileyJohnson = 'Hailey_Johnson', HaileyJohnson = 'Hailey_Johnson',
HaileyJohnsonMilitary = 'Hailey_Johnson_military',
IsabellaRodriguez = 'Isabella_Rodriguez', IsabellaRodriguez = 'Isabella_Rodriguez',
JaneMoreno = 'Jane_Moreno', JaneMoreno = 'Jane_Moreno',
JenniferMoore = 'Jennifer_Moore', JenniferMoore = 'Jennifer_Moore',
JenniferMooreMilitary = 'Jennifer_Moore_military',
JohnLin = 'John_Lin', JohnLin = 'John_Lin',
KlausMueller = 'Klaus_Mueller', KlausMueller = 'Klaus_Mueller',
LatoyaWilliams = 'Latoya_Williams', LatoyaWilliams = 'Latoya_Williams',
@ -84,8 +88,8 @@ export const IconMap = new Proxy<{ [key: string]: IconName }>(
export const IconUrl: { [key in IconName]: string } = { export const IconUrl: { [key in IconName]: string } = {
[IconName.Unknown]: Unknown, [IconName.Unknown]: Unknown,
[IconName.AbigailChenMilitary]: AbigailChenMilitary,
[IconName.AbigailChen]: AbigailChen, [IconName.AbigailChen]: AbigailChen,
[IconName.AbigailChenMilitary]: AbigailChenMilitary,
[IconName.AdamSmith]: AdamSmith, [IconName.AdamSmith]: AdamSmith,
[IconName.ArthurBurton]: ArthurBurton, [IconName.ArthurBurton]: ArthurBurton,
[IconName.AyeshaKhan]: AyeshaKhan, [IconName.AyeshaKhan]: AyeshaKhan,
@ -104,9 +108,11 @@ export const IconUrl: { [key in IconName]: string } = {
[IconName.GabeSmith]: AbigailChen, [IconName.GabeSmith]: AbigailChen,
[IconName.GiorgioRossi]: GiorgioRossi, [IconName.GiorgioRossi]: GiorgioRossi,
[IconName.HaileyJohnson]: HaileyJohnson, [IconName.HaileyJohnson]: HaileyJohnson,
[IconName.HaileyJohnsonMilitary]: HaileyJohnsonMilitary,
[IconName.IsabellaRodriguez]: IsabellaRodriguez, [IconName.IsabellaRodriguez]: IsabellaRodriguez,
[IconName.JaneMoreno]: JaneMoreno, [IconName.JaneMoreno]: JaneMoreno,
[IconName.JenniferMoore]: JenniferMoore, [IconName.JenniferMoore]: JenniferMoore,
[IconName.JenniferMooreMilitary]: JenniferMooreMilitary,
[IconName.JohnLin]: JohnLin, [IconName.JohnLin]: JohnLin,
[IconName.KlausMueller]: KlausMueller, [IconName.KlausMueller]: KlausMueller,
[IconName.LatoyaWilliams]: LatoyaWilliams, [IconName.LatoyaWilliams]: LatoyaWilliams,

View File

@ -44,7 +44,7 @@ export default observer(() => {
)} )}
{globalStorage.agentAssigmentWindow ? ( {globalStorage.agentAssigmentWindow ? (
<FloatWindow <FloatWindow
title="Assignment Exploration" title="智能体选择"
onClose={() => (globalStorage.agentAssigmentWindow = false)} onClose={() => (globalStorage.agentAssigmentWindow = false)}
> >
<AgentAssignment <AgentAssignment

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB