Make infinity adapt (#4635)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-01-24 17:45:04 +08:00 committed by GitHub
parent 9d717f0b6e
commit 71c132f76d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1131 additions and 1124 deletions

View File

@ -6,122 +6,83 @@
"dsl": { "dsl": {
"answer": [], "answer": [],
"components": { "components": {
"begin": {
"obj": {
"component_name": "Begin",
"inputs": [],
"params": {
"prologue": "",
"query": [
{
"key": "title",
"name": "Title",
"optional": false,
"type": "line",
"value": ""
},
{
"key": "language",
"name": "Language",
"optional": false,
"type": "line",
"value": ""
}
]
}
},
"downstream": [
"Generate:SmoothTeamsJoke"
],
"upstream": []
},
"Generate:SmoothTeamsJoke": {
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"max_tokens": 256,
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@title",
"id": "00bd69b8-6bda-48b5-9cbf-08c899d46d82",
"key": "title"
},
{
"component_id": "begin@language",
"id": "8d06024c-c87e-4fc2-bdb5-40ac1a2d2aa2",
"key": "language"
}
],
"presence_penalty": 0.4,
"prompt": "<instruction>\n<task_description>\nGenerate a series of appropriate search engine queries to break down questions based on user inquiries\n</task_description>\n\n<examples>\n<example>\nInput: User asks how to learn programming\nOutput: programming learning methods, programming tutorials for beginners\n</example>\n\n<example>\nInput: User wants to understand latest technology trends \nOutput: tech trends 2024, latest technology news\n</example>\n\n<example>\nInput: User seeks healthy eating advice\nOutput: healthy eating guide, balanced nutrition diet\n</example>\n</examples>\n\n<instructions>\n1. Take user's question as input.\n2. Identify relevant keywords or phrases based on the topic of user's question.\n3. Use these keywords or phrases to make search engine queries.\n4. Generate a series of appropriate search engine queries to help break down user's question.\n5. Ensure output content does not contain any xml tags.\n6. The output must be pure and conform to the <example> style without other explanations.\n7. Break down into at least 4-6 subproblems.\n8. Output is separated only by commas.\n</instructions>\n\n\ntitle{title}\nlanguage{language}\nThe output must be pure and conform to the <example> style without other explanations.\nOutput is separated only by commas.\nBreak down into at least 4-6 subproblems.\n\nOutput:",
"temperature": 0.1,
"top_p": 0.3
}
},
"downstream": [
"Generate:RedAliensLive",
"Iteration:BlueClothsGrab"
],
"upstream": [
"begin"
]
},
"Answer:WittyBottlesJog": { "Answer:WittyBottlesJog": {
"downstream": [],
"obj": { "obj": {
"component_name": "Answer", "component_name": "Answer",
"inputs": [], "inputs": [],
"params": {} "params": {}
}, },
"downstream": [],
"upstream": [ "upstream": [
"Template:LazyMasksFollow" "Template:LazyMasksFollow"
] ]
}, },
"Baidu:MeanBroomsMatter": {
"downstream": [
"Generate:FruityGrapesLook"
],
"obj": {
"component_name": "Baidu",
"inputs": [],
"params": {
"query": [
{
"component_id": "IterationItem:RudeTablesSmile",
"type": "reference"
}
],
"top_n": 10
}
},
"parent_id": "Iteration:BlueClothsGrab",
"upstream": [
"IterationItem:RudeTablesSmile"
]
},
"Generate:EagerFliesTrade": {
"downstream": [
"Template:SaltyMasksItch"
],
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@language",
"id": "3e17849a-902d-48a2-8ba9-673cedc21f82",
"key": "language"
},
{
"component_id": "Iteration:BlueClothsGrab",
"id": "afa356ff-bc38-4363-b933-54e00562e89e",
"key": "context"
},
{
"component_id": "IterationItem:OliveStatesSmoke",
"id": "3e79ca4b-bfbb-4ae3-80ae-a1812b97223b",
"key": "sub_title"
}
],
"presence_penalty": 0.4,
"prompt": "in a detailed report — The report should focus on the answer to {sub_title}and nothing else.\nlanguage{language}\ncontext{context}\n\nProvide the research report in the specified language, avoiding small talk.\nThe main content is provided in markdown format\nWrite all source urls at the end of the report in apa format. ",
"temperature": 0.1,
"top_p": 0.3
}
},
"parent_id": "Iteration:ThreeParksChew",
"upstream": [
"IterationItem:OliveStatesSmoke"
]
},
"Generate:FruityGrapesLook": {
"downstream": [],
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"max_tokens": 2048,
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@language",
"id": "3af930e7-4b51-452a-ab32-cefabfab44ce",
"key": "language"
},
{
"component_id": "begin@title",
"id": "59062b99-fe21-4e98-b95c-83c7f6fe1d97",
"key": "title"
},
{
"component_id": "IterationItem:RudeTablesSmile",
"id": "2728ed42-cf38-4904-a366-cc11726830ec",
"key": "item"
}
],
"presence_penalty": 0.4,
"prompt": "Your goal is to provide answers based on information from the internet. \nYou must use the provided search results to find relevant online information. \nYou should never use your own knowledge to answer questions.\nPlease include relevant url sources in the end of your answers.\n\nlanguage{language}\n \"{title}\" Using the above information, answer the following question or topic: \"{item} \"\nin a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.",
"temperature": 0.1,
"top_p": 0.3
}
},
"parent_id": "Iteration:BlueClothsGrab",
"upstream": [
"Baidu:MeanBroomsMatter"
]
},
"Generate:RedAliensLive": { "Generate:RedAliensLive": {
"downstream": [
"Iteration:ThreeParksChew"
],
"obj": { "obj": {
"component_name": "Generate", "component_name": "Generate",
"inputs": [], "inputs": [],
@ -153,114 +114,14 @@
"top_p": 0.3 "top_p": 0.3
} }
}, },
"downstream": [
"Iteration:ThreeParksChew"
],
"upstream": [ "upstream": [
"Generate:SmoothTeamsJoke" "Generate:SmoothTeamsJoke"
] ]
}, },
"Generate:SmoothTeamsJoke": {
"downstream": [
"Generate:RedAliensLive",
"Iteration:BlueClothsGrab"
],
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"max_tokens": 256,
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@title",
"id": "00bd69b8-6bda-48b5-9cbf-08c899d46d82",
"key": "title"
},
{
"component_id": "begin@language",
"id": "8d06024c-c87e-4fc2-bdb5-40ac1a2d2aa2",
"key": "language"
}
],
"presence_penalty": 0.4,
"prompt": "<instruction>\n<task_description>\nGenerate a series of appropriate search engine queries to break down questions based on user inquiries\n</task_description>\n\n<examples>\n<example>\nInput: User asks how to learn programming\nOutput: programming learning methods, programming tutorials for beginners\n</example>\n\n<example>\nInput: User wants to understand latest technology trends \nOutput: tech trends 2024, latest technology news\n</example>\n\n<example>\nInput: User seeks healthy eating advice\nOutput: healthy eating guide, balanced nutrition diet\n</example>\n</examples>\n\n<instructions>\n1. Take user's question as input.\n2. Identify relevant keywords or phrases based on the topic of user's question.\n3. Use these keywords or phrases to make search engine queries.\n4. Generate a series of appropriate search engine queries to help break down user's question.\n5. Ensure output content does not contain any xml tags.\n6. The output must be pure and conform to the <example> style without other explanations.\n7. Break down into at least 4-6 subproblems.\n8. Output is separated only by commas.\n</instructions>\n\n\ntitle{title}\nlanguage{language}\nThe output must be pure and conform to the <example> style without other explanations.\nOutput is separated only by commas.\nBreak down into at least 4-6 subproblems.\n\nOutput:",
"temperature": 0.1,
"top_p": 0.3
}
},
"upstream": [
"begin"
]
},
"Iteration:BlueClothsGrab": {
"downstream": [],
"obj": {
"component_name": "Iteration",
"inputs": [],
"params": {
"delimiter": ",",
"query": [
{
"component_id": "Generate:SmoothTeamsJoke",
"type": "reference"
}
]
}
},
"upstream": [
"Generate:SmoothTeamsJoke"
]
},
"Iteration:ThreeParksChew": {
"downstream": [
"Template:LazyMasksFollow"
],
"obj": {
"component_name": "Iteration",
"inputs": [],
"params": {
"delimiter": "\n",
"query": [
{
"component_id": "Generate:RedAliensLive",
"type": "reference"
}
]
}
},
"upstream": [
"Generate:RedAliensLive"
]
},
"IterationItem:OliveStatesSmoke": {
"downstream": [
"Generate:EagerFliesTrade"
],
"obj": {
"component_name": "IterationItem",
"inputs": [],
"params": {}
},
"parent_id": "Iteration:ThreeParksChew",
"upstream": []
},
"IterationItem:RudeTablesSmile": {
"downstream": [
"Baidu:MeanBroomsMatter"
],
"obj": {
"component_name": "IterationItem",
"inputs": [],
"params": {}
},
"parent_id": "Iteration:BlueClothsGrab",
"upstream": []
},
"Template:LazyMasksFollow": { "Template:LazyMasksFollow": {
"downstream": [
"Answer:WittyBottlesJog"
],
"obj": { "obj": {
"component_name": "Template", "component_name": "Template",
"inputs": [], "inputs": [],
@ -280,12 +141,179 @@
] ]
} }
}, },
"downstream": [
"Answer:WittyBottlesJog"
],
"upstream": [ "upstream": [
"Iteration:ThreeParksChew" "Iteration:ThreeParksChew"
] ]
}, },
"Template:SaltyMasksItch": { "Iteration:BlueClothsGrab": {
"obj": {
"component_name": "Iteration",
"inputs": [],
"params": {
"delimiter": ",",
"query": [
{
"component_id": "Generate:SmoothTeamsJoke",
"type": "reference"
}
]
}
},
"downstream": [], "downstream": [],
"upstream": [
"Generate:SmoothTeamsJoke"
]
},
"IterationItem:RudeTablesSmile": {
"obj": {
"component_name": "IterationItem",
"inputs": [],
"params": {}
},
"downstream": [
"Baidu:MeanBroomsMatter"
],
"upstream": [],
"parent_id": "Iteration:BlueClothsGrab"
},
"Baidu:MeanBroomsMatter": {
"obj": {
"component_name": "Baidu",
"inputs": [],
"params": {
"query": [
{
"component_id": "IterationItem:RudeTablesSmile",
"type": "reference"
}
],
"top_n": 10
}
},
"downstream": [
"Generate:FruityGrapesLook"
],
"upstream": [
"IterationItem:RudeTablesSmile"
],
"parent_id": "Iteration:BlueClothsGrab"
},
"Generate:FruityGrapesLook": {
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"max_tokens": 2048,
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@language",
"id": "3af930e7-4b51-452a-ab32-cefabfab44ce",
"key": "language"
},
{
"component_id": "Baidu:MeanBroomsMatter",
"id": "59062b99-fe21-4e98-b95c-83c7f6fe1d97",
"key": "search_res"
},
{
"component_id": "IterationItem:RudeTablesSmile",
"id": "2728ed42-cf38-4904-a366-cc11726830ec",
"key": "item"
}
],
"presence_penalty": 0.4,
"prompt": "Your goal is to provide answers based on information from the internet. \nYou must use the provided search results to find relevant online information. \nYou should never use your own knowledge to answer questions.\nPlease include relevant url sources in the end of your answers.\n\n{search_res}\nlanguage{language}\n \"{search_res}\" \nUsing the above information, answer the following question or topic: \"{item} \"\nin a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.",
"temperature": 0.1,
"top_p": 0.3
}
},
"downstream": [],
"upstream": [
"Baidu:MeanBroomsMatter"
],
"parent_id": "Iteration:BlueClothsGrab"
},
"Iteration:ThreeParksChew": {
"obj": {
"component_name": "Iteration",
"inputs": [],
"params": {
"delimiter": "\n",
"query": [
{
"component_id": "Generate:RedAliensLive",
"type": "reference"
}
]
}
},
"downstream": [
"Template:LazyMasksFollow"
],
"upstream": [
"Generate:RedAliensLive"
]
},
"IterationItem:OliveStatesSmoke": {
"obj": {
"component_name": "IterationItem",
"inputs": [],
"params": {}
},
"downstream": [
"Generate:EagerFliesTrade"
],
"upstream": [],
"parent_id": "Iteration:ThreeParksChew"
},
"Generate:EagerFliesTrade": {
"obj": {
"component_name": "Generate",
"inputs": [],
"params": {
"cite": false,
"frequency_penalty": 0.7,
"llm_id": "deepseek-chat@DeepSeek",
"message_history_window_size": 1,
"parameters": [
{
"component_id": "begin@language",
"id": "3e17849a-902d-48a2-8ba9-673cedc21f82",
"key": "language"
},
{
"component_id": "Iteration:BlueClothsGrab",
"id": "afa356ff-bc38-4363-b933-54e00562e89e",
"key": "context"
},
{
"component_id": "IterationItem:OliveStatesSmoke",
"id": "3e79ca4b-bfbb-4ae3-80ae-a1812b97223b",
"key": "sub_title"
}
],
"presence_penalty": 0.4,
"prompt": "in a detailed report — The report should focus on the answer to {sub_title}and nothing else.\nlanguage{language}\ncontext{context}\n\nProvide the research report in the specified language, avoiding small talk.\nThe main content is provided in markdown format\nWrite all source urls at the end of the report in apa format. ",
"temperature": 0.1,
"top_p": 0.3
}
},
"downstream": [
"Template:SaltyMasksItch"
],
"upstream": [
"IterationItem:OliveStatesSmoke"
],
"parent_id": "Iteration:ThreeParksChew"
},
"Template:SaltyMasksItch": {
"obj": { "obj": {
"component_name": "Template", "component_name": "Template",
"inputs": [], "inputs": [],
@ -305,213 +333,15 @@
] ]
} }
}, },
"parent_id": "Iteration:ThreeParksChew", "downstream": [],
"upstream": [ "upstream": [
"Generate:EagerFliesTrade" "Generate:EagerFliesTrade"
]
},
"begin": {
"downstream": [
"Generate:SmoothTeamsJoke"
], ],
"obj": { "parent_id": "Iteration:ThreeParksChew"
"component_name": "Begin",
"inputs": [],
"params": {
"prologue": "",
"query": [
{
"key": "title",
"name": "Title",
"optional": false,
"type": "line",
"value": ""
},
{
"key": "language",
"name": "Language",
"optional": false,
"type": "line",
"value": ""
}
]
}
},
"upstream": []
} }
}, },
"embed_id": "", "embed_id": "",
"graph": { "graph": {
"edges": [
{
"id": "reactflow__edge-begin-Generate:SmoothTeamsJokec",
"markerEnd": "logo",
"source": "begin",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:SmoothTeamsJoke",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Baidu:SharpHotelsNailb-Generate:RealCamerasSendb",
"markerEnd": "logo",
"source": "Baidu:SharpHotelsNail",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:RealCamerasSend",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:SmoothTeamsJokeb-Generate:RedAliensLivec",
"markerEnd": "logo",
"source": "Generate:SmoothTeamsJoke",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:RedAliensLive",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:BeigeEyesFlyb-Template:ThinSnailsDreamc",
"markerEnd": "logo",
"source": "Generate:BeigeEyesFly",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:ThinSnailsDream",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Template:LazyMasksFollowb-Answer:WittyBottlesJogc",
"markerEnd": "logo",
"source": "Template:LazyMasksFollow",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Answer:WittyBottlesJog",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-IterationItem:RudeTablesSmile-Baidu:MeanBroomsMatterc",
"markerEnd": "logo",
"source": "IterationItem:RudeTablesSmile",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Baidu:MeanBroomsMatter",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Baidu:MeanBroomsMatterb-Generate:FruityGrapesLookb",
"markerEnd": "logo",
"source": "Baidu:MeanBroomsMatter",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:FruityGrapesLook",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:SmoothTeamsJokeb-Iteration:BlueClothsGrabc",
"markerEnd": "logo",
"source": "Generate:SmoothTeamsJoke",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Iteration:BlueClothsGrab",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-IterationItem:OliveStatesSmoke-Generate:EagerFliesTradec",
"markerEnd": "logo",
"source": "IterationItem:OliveStatesSmoke",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:EagerFliesTrade",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:RedAliensLiveb-Iteration:ThreeParksChewc",
"markerEnd": "logo",
"source": "Generate:RedAliensLive",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Iteration:ThreeParksChew",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Iteration:ThreeParksChewb-Template:LazyMasksFollowc",
"markerEnd": "logo",
"source": "Iteration:ThreeParksChew",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:LazyMasksFollow",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:EagerFliesTradeb-Template:SaltyMasksItchb",
"markerEnd": "logo",
"source": "Generate:EagerFliesTrade",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:SaltyMasksItch",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
}
],
"nodes": [ "nodes": [
{ {
"data": { "data": {
@ -589,7 +419,7 @@
"top_p": 0.3 "top_p": 0.3
}, },
"label": "Generate", "label": "Generate",
"name": "Query" "name": "GenQuery"
}, },
"dragging": false, "dragging": false,
"height": 190, "height": 190,
@ -862,9 +692,9 @@
"key": "language" "key": "language"
}, },
{ {
"component_id": "begin@title", "component_id": "Baidu:MeanBroomsMatter",
"id": "59062b99-fe21-4e98-b95c-83c7f6fe1d97", "id": "59062b99-fe21-4e98-b95c-83c7f6fe1d97",
"key": "title" "key": "search_res"
}, },
{ {
"component_id": "IterationItem:RudeTablesSmile", "component_id": "IterationItem:RudeTablesSmile",
@ -874,7 +704,7 @@
], ],
"presencePenaltyEnabled": true, "presencePenaltyEnabled": true,
"presence_penalty": 0.4, "presence_penalty": 0.4,
"prompt": "Your goal is to provide answers based on information from the internet. \nYou must use the provided search results to find relevant online information. \nYou should never use your own knowledge to answer questions.\nPlease include relevant url sources in the end of your answers.\n\nlanguage{language}\n \"{title}\" Using the above information, answer the following question or topic: \"{item} \"\nin a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.", "prompt": "Your goal is to provide answers based on information from the internet. \nYou must use the provided search results to find relevant online information. \nYou should never use your own knowledge to answer questions.\nPlease include relevant url sources in the end of your answers.\n\n{search_res}\nlanguage{language}\n \"{search_res}\" \nUsing the above information, answer the following question or topic: \"{item} \"\nin a detailed report — The report should focus on the answer to the question, should be well structured, informative, in depth, with facts and numbers if available, a minimum of 1,200 words and with markdown syntax and apa format. Write all source urls at the end of the report in apa format. You should write your report only based on the given information and nothing else.",
"temperature": 0.1, "temperature": 0.1,
"temperatureEnabled": true, "temperatureEnabled": true,
"topPEnabled": true, "topPEnabled": true,
@ -921,14 +751,14 @@
"name": "Sections" "name": "Sections"
}, },
"dragging": false, "dragging": false,
"height": 438, "height": 442,
"id": "Iteration:ThreeParksChew", "id": "Iteration:ThreeParksChew",
"measured": { "measured": {
"height": 438, "height": 442,
"width": 328 "width": 333
}, },
"position": { "position": {
"x": 891.9430519048244, "x": 894.4430519048244,
"y": 39.64877134989487 "y": 39.64877134989487
}, },
"positionAbsolute": { "positionAbsolute": {
@ -944,7 +774,7 @@
}, },
"targetPosition": "left", "targetPosition": "left",
"type": "group", "type": "group",
"width": 328 "width": 333
}, },
{ {
"data": { "data": {
@ -1022,8 +852,8 @@
}, },
"parentId": "Iteration:ThreeParksChew", "parentId": "Iteration:ThreeParksChew",
"position": { "position": {
"x": 195.8615643518841, "x": 194.65347489427984,
"y": 6 "y": 4.791910542395684
}, },
"positionAbsolute": { "positionAbsolute": {
"x": 923.8046162567085, "x": 923.8046162567085,
@ -1065,7 +895,7 @@
}, },
"parentId": "Iteration:ThreeParksChew", "parentId": "Iteration:ThreeParksChew",
"position": { "position": {
"x": 113.20709909819698, "x": 110.79092018298843,
"y": 259.6247245989738 "y": 259.6247245989738
}, },
"positionAbsolute": { "positionAbsolute": {
@ -1145,7 +975,7 @@
"id": "Note:SmoothAreasBet", "id": "Note:SmoothAreasBet",
"measured": { "measured": {
"height": 128, "height": 128,
"width": 273 "width": 266
}, },
"position": { "position": {
"x": 439.2665425320009, "x": 439.2665425320009,
@ -1210,6 +1040,176 @@
"type": "noteNode", "type": "noteNode",
"width": 336 "width": 336
} }
],
"edges": [
{
"id": "reactflow__edge-begin-Generate:SmoothTeamsJokec",
"markerEnd": "logo",
"source": "begin",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:SmoothTeamsJoke",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Baidu:SharpHotelsNailb-Generate:RealCamerasSendb",
"markerEnd": "logo",
"source": "Baidu:SharpHotelsNail",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:RealCamerasSend",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:SmoothTeamsJokeb-Generate:RedAliensLivec",
"markerEnd": "logo",
"source": "Generate:SmoothTeamsJoke",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:RedAliensLive",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:BeigeEyesFlyb-Template:ThinSnailsDreamc",
"markerEnd": "logo",
"source": "Generate:BeigeEyesFly",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:ThinSnailsDream",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Template:LazyMasksFollowb-Answer:WittyBottlesJogc",
"markerEnd": "logo",
"source": "Template:LazyMasksFollow",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Answer:WittyBottlesJog",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-IterationItem:RudeTablesSmile-Baidu:MeanBroomsMatterc",
"markerEnd": "logo",
"source": "IterationItem:RudeTablesSmile",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Baidu:MeanBroomsMatter",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Baidu:MeanBroomsMatterb-Generate:FruityGrapesLookb",
"markerEnd": "logo",
"source": "Baidu:MeanBroomsMatter",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:FruityGrapesLook",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:SmoothTeamsJokeb-Iteration:BlueClothsGrabc",
"markerEnd": "logo",
"source": "Generate:SmoothTeamsJoke",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Iteration:BlueClothsGrab",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-IterationItem:OliveStatesSmoke-Generate:EagerFliesTradec",
"markerEnd": "logo",
"source": "IterationItem:OliveStatesSmoke",
"sourceHandle": null,
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Generate:EagerFliesTrade",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:RedAliensLiveb-Iteration:ThreeParksChewc",
"markerEnd": "logo",
"source": "Generate:RedAliensLive",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Iteration:ThreeParksChew",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Iteration:ThreeParksChewb-Template:LazyMasksFollowc",
"markerEnd": "logo",
"source": "Iteration:ThreeParksChew",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:LazyMasksFollow",
"targetHandle": "c",
"type": "buttonEdge",
"zIndex": 1001
},
{
"id": "reactflow__edge-Generate:EagerFliesTradeb-Template:SaltyMasksItchb",
"markerEnd": "logo",
"source": "Generate:EagerFliesTrade",
"sourceHandle": "b",
"style": {
"stroke": "rgb(202 197 245)",
"strokeWidth": 2
},
"target": "Template:SaltyMasksItch",
"targetHandle": "b",
"type": "buttonEdge",
"zIndex": 1001
}
] ]
}, },
"history": [], "history": [],

View File

@ -30,7 +30,7 @@
"knowledge_graph_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"}, "knowledge_graph_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"},
"entities_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"}, "entities_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"},
"pagerank_fea": {"type": "integer", "default": 0}, "pagerank_fea": {"type": "integer", "default": 0},
"tag_feas": {"type": "integer", "default": 0}, "tag_feas": {"type": "varchar", "default": ""},
"important_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"}, "important_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"},
"from_entity_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"}, "from_entity_kwd": {"type": "varchar", "default": "", "analyzer": "whitespace"},

View File

@ -484,7 +484,7 @@ def update_nodes_pagerank_nhop_neighbour(tenant_id, kb_id, graph, n_hop):
chunk, chunk,
search.index_name(tenant_id), kb_id) search.index_name(tenant_id), kb_id)
else: else:
settings.docStoreConn.insert([{"id": chunk_id(chunk), **chunk}], search.index_name(tenant_id)) settings.docStoreConn.insert([{"id": chunk_id(chunk), **chunk}], search.index_name(tenant_id), kb_id)
def get_entity_type2sampels(idxnms, kb_ids: list): def get_entity_type2sampels(idxnms, kb_ids: list):

View File

@ -299,7 +299,7 @@ class InfinityConnection(DocStoreConnection):
matchExpr.extra_options[k] = str(v) matchExpr.extra_options[k] = str(v)
logger.debug(f"INFINITY search MatchTextExpr: {json.dumps(matchExpr.__dict__)}") logger.debug(f"INFINITY search MatchTextExpr: {json.dumps(matchExpr.__dict__)}")
elif isinstance(matchExpr, MatchDenseExpr): elif isinstance(matchExpr, MatchDenseExpr):
if filter_cond and "filter" not in matchExpr.extra_options: if filter_fulltext and filter_cond and "filter" not in matchExpr.extra_options:
matchExpr.extra_options.update({"filter": filter_fulltext}) matchExpr.extra_options.update({"filter": filter_fulltext})
for k, v in matchExpr.extra_options.items(): for k, v in matchExpr.extra_options.items():
if not isinstance(v, str): if not isinstance(v, str):
@ -424,9 +424,11 @@ class InfinityConnection(DocStoreConnection):
assert "_id" not in d assert "_id" not in d
assert "id" in d assert "id" in d
for k, v in d.items(): for k, v in d.items():
if k in ["important_kwd", "question_kwd", "entities_kwd"]: if k in ["important_kwd", "question_kwd", "entities_kwd", "tag_kwd"]:
assert isinstance(v, list) assert isinstance(v, list)
d[k] = "###".join(v) d[k] = "###".join(v)
elif re.search(r"_feas$", k):
d[k] = json.dumps(v)
elif k == 'kb_id': elif k == 'kb_id':
if isinstance(d[k], list): if isinstance(d[k], list):
d[k] = d[k][0] # since d[k] is a list, but we need a str d[k] = d[k][0] # since d[k] is a list, but we need a str
@ -462,7 +464,12 @@ class InfinityConnection(DocStoreConnection):
del condition["exist"] del condition["exist"]
filter = equivalent_condition_to_str(condition) filter = equivalent_condition_to_str(condition)
for k, v in list(newValue.items()): for k, v in list(newValue.items()):
if k.endswith("_kwd") and isinstance(v, list): if k in ["important_kwd", "question_kwd", "entities_kwd", "tag_kwd"]:
assert isinstance(v, list)
newValue[k] = "###".join(v)
elif re.search(r"_feas$", k):
newValue[k] = json.dumps(v)
elif k.endswith("_kwd") and isinstance(v, list):
newValue[k] = " ".join(v) newValue[k] = " ".join(v)
elif k == 'kb_id': elif k == 'kb_id':
if isinstance(newValue[k], list): if isinstance(newValue[k], list):
@ -531,7 +538,7 @@ class InfinityConnection(DocStoreConnection):
v = res[fieldnm][i] v = res[fieldnm][i]
if isinstance(v, Series): if isinstance(v, Series):
v = list(v) v = list(v)
elif fieldnm in ["important_kwd", "question_kwd", "entities_kwd"]: elif fieldnm in ["important_kwd", "question_kwd", "entities_kwd", "tag_kwd"]:
assert isinstance(v, str) assert isinstance(v, str)
v = [kwd for kwd in v.split("###") if kwd] v = [kwd for kwd in v.split("###") if kwd]
elif fieldnm == "position_int": elif fieldnm == "position_int":