mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-06-04 11:24:00 +08:00
agent template upgrade (#3060)
### What problem does this PR solve? #3056 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
07bb2a6fd6
commit
e56bd770ea
@ -43,25 +43,19 @@ class RetrievalParam(ComponentParamBase):
|
||||
self.check_decimal_float(self.similarity_threshold, "[Retrieval] Similarity threshold")
|
||||
self.check_decimal_float(self.keywords_similarity_weight, "[Retrieval] Keywords similarity weight")
|
||||
self.check_positive_number(self.top_n, "[Retrieval] Top N")
|
||||
self.check_empty(self.kb_ids, "[Retrieval] Knowledge bases")
|
||||
|
||||
|
||||
class Retrieval(ComponentBase, ABC):
|
||||
component_name = "Retrieval"
|
||||
|
||||
def _run(self, history, **kwargs):
|
||||
# query = []
|
||||
# for role, cnt in history[::-1][:self._param.message_history_window_size]:
|
||||
# if role != "user":continue
|
||||
# query.append(cnt)
|
||||
# # query = "\n".join(query)
|
||||
# query = query[0]
|
||||
query = self.get_input()
|
||||
query = str(query["content"][0]) if "content" in query else ""
|
||||
|
||||
kbs = KnowledgebaseService.get_by_ids(self._param.kb_ids)
|
||||
if not kbs:
|
||||
raise ValueError("Can't find knowledgebases by {}".format(self._param.kb_ids))
|
||||
return Retrieval.be_output("")
|
||||
|
||||
embd_nms = list(set([kb.embd_id for kb in kbs]))
|
||||
assert len(embd_nms) == 1, "Knowledge bases use different embedding models."
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -6,71 +6,57 @@
|
||||
"dsl": {
|
||||
"answer": [],
|
||||
"components": {
|
||||
"answer:0": {
|
||||
"downstream": ["generate:0"],
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"upstream": ["begin", "generate:0"]
|
||||
},
|
||||
"begin": {
|
||||
"downstream": ["answer:0"],
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {
|
||||
"prologue": "Hi there! Please enter the text you want to translate in format like: 'text you want to translate' => target language. For an example: 您好! => English"
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Answer:ShortPapersShake"
|
||||
],
|
||||
"upstream": []
|
||||
},
|
||||
"generate:0": {
|
||||
"downstream": ["answer:0"],
|
||||
"Answer:ShortPapersShake": {
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:HeavyForksTell"
|
||||
],
|
||||
"upstream": [
|
||||
"begin",
|
||||
"Generate:HeavyForksTell"
|
||||
]
|
||||
},
|
||||
"Generate:HeavyForksTell": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"llm_id": "deepseek-chat",
|
||||
"prompt": "You are an professional interpreter.\n- Role: an professional interpreter.\n- Input format: content need to be translated => target language. \n- Answer format: => translated content in target language. \n- Examples:\n - user: 您好! => English. assistant: => How are you doing!\n - user: You look good today. => Japanese. assistant: => 今日は調子がいいですね 。\n"
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "You are an professional interpreter.\n- Role: an professional interpreter.\n- Input format: content need to be translated => target language. \n- Answer format: => translated content in target language. \n- Examples:\n - user: 您好! => English. assistant: => How are you doing!\n - user: You look good today. => Japanese. assistant: => 今日は調子がいいですね 。\n",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": ["answer:0"]
|
||||
}
|
||||
},
|
||||
"graph": {
|
||||
"edges": [
|
||||
{
|
||||
"id": "c87c7805-8cf0-4cd4-b45b-152031811020",
|
||||
"label": "",
|
||||
"source": "begin",
|
||||
"target": "answer:0"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-answer:0b-generate:0d",
|
||||
"markerEnd": "logo",
|
||||
"source": "answer:0",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "generate:0",
|
||||
"targetHandle": "d",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-generate:0c-answer:0a",
|
||||
"markerEnd": "logo",
|
||||
"source": "generate:0",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "answer:0",
|
||||
"targetHandle": "a",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
"downstream": [
|
||||
"Answer:ShortPapersShake"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:ShortPapersShake"
|
||||
]
|
||||
}
|
||||
},
|
||||
"embed_id": "",
|
||||
"graph": {
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
@ -81,21 +67,21 @@
|
||||
"name": "Instruction"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "begin",
|
||||
"position": {
|
||||
"x": -175.31950791077287,
|
||||
"y": 32.340246044613565
|
||||
"x": -227.62119327532662,
|
||||
"y": 204.18864081386155
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -175.31950791077287,
|
||||
"y": 32.340246044613565
|
||||
"x": -227.62119327532662,
|
||||
"y": 204.18864081386155
|
||||
},
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 50
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -104,48 +90,164 @@
|
||||
"name": "Interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "answer:0",
|
||||
"height": 44,
|
||||
"id": "Answer:ShortPapersShake",
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 6
|
||||
"x": -2.51245296887717,
|
||||
"y": 206.25402277426554
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 0,
|
||||
"y": 6
|
||||
"x": -2.51245296887717,
|
||||
"y": 206.25402277426554
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"llm_id": "deepseek-chat",
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "You are an professional interpreter.\n- Role: an professional interpreter.\n- Input format: content need to be translated => target language. \n- Answer format: => translated content in target language. \n- Examples:\n - user: 您好! => English. assistant: => How are you doing!\n - user: You look good today. => Japanese. assistant: => 今日は調子がいいですね 。\n",
|
||||
"temperature": 0.5
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "generate:0",
|
||||
"height": 86,
|
||||
"id": "Generate:HeavyForksTell",
|
||||
"position": {
|
||||
"x": 214.89015821545786,
|
||||
"y": 135.10439391733706
|
||||
"x": -1.8557846635797546,
|
||||
"y": 70.16420357406685
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 214.89015821545786,
|
||||
"y": 135.10439391733706
|
||||
"x": -1.8557846635797546,
|
||||
"y": 70.16420357406685
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "The large model translates the user's desired content into the target language, returns the translated language."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Translate"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 180,
|
||||
"id": "Note:VioletNumbersStrive",
|
||||
"position": {
|
||||
"x": 0.8506882512325546,
|
||||
"y": -119.10519445109118
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 0.8506882512325546,
|
||||
"y": -119.10519445109118
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 180,
|
||||
"width": 209
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 209,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Receives the content the user wants to translate and the target language, displays the translation result from the large model."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 157,
|
||||
"id": "Note:WarmDoodlesSwim",
|
||||
"position": {
|
||||
"x": 22.5293807600396,
|
||||
"y": 267.8448268086032
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 22.5293807600396,
|
||||
"y": 267.8448268086032
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 157,
|
||||
"width": 252
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 252,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:ShortPapersShakec",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:ShortPapersShake",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:ShortPapersShakeb-Generate:HeavyForksTellb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:ShortPapersShake",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:HeavyForksTell",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:HeavyForksTellc-Answer:ShortPapersShakec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:HeavyForksTell",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:ShortPapersShake",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -6,40 +6,79 @@
|
||||
"dsl": {
|
||||
"answer": [],
|
||||
"components": {
|
||||
"AkShare:CalmHotelsKnow": {
|
||||
"begin": {
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {
|
||||
"prologue": "Hi there!"
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:RottenMangosSmash"
|
||||
"Answer:NeatLandsWave"
|
||||
],
|
||||
"upstream": []
|
||||
},
|
||||
"WenCai:TenParksOpen": {
|
||||
"obj": {
|
||||
"component_name": "WenCai",
|
||||
"params": {
|
||||
"query_type": "stock",
|
||||
"top_n": 5
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:RottenPianosUnite"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:NeatLandsWave"
|
||||
]
|
||||
},
|
||||
"AkShare:CalmHotelsKnow": {
|
||||
"obj": {
|
||||
"component_name": "AkShare",
|
||||
"params": {
|
||||
"top_n": 10
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:RottenPianosUnite"
|
||||
],
|
||||
"upstream": [
|
||||
"KeywordExtract:AllGarlicsPress"
|
||||
"KeywordExtract:BreezyGoatsRead"
|
||||
]
|
||||
},
|
||||
"Generate:RottenMangosSmash": {
|
||||
"Answer:NeatLandsWave": {
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"answer:0"
|
||||
"WenCai:TenParksOpen",
|
||||
"KeywordExtract:BreezyGoatsRead"
|
||||
],
|
||||
"upstream": [
|
||||
"begin",
|
||||
"Generate:RottenPianosUnite"
|
||||
]
|
||||
},
|
||||
"Generate:RottenPianosUnite": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 0,
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "WenCai:TenParksOpen",
|
||||
"id": "6045431c-3206-4aae-8f4e-c36c27c488d1",
|
||||
"id": "d35f331b-2787-4ae7-ab81-a7ea15970843",
|
||||
"key": "wencai_input"
|
||||
},
|
||||
{
|
||||
"component_id": "AkShare:CalmHotelsKnow",
|
||||
"id": "1eca5d40-9718-4a62-8e4c-afbd48fd3929",
|
||||
"id": "36c4db0b-c80d-4119-a2a6-05ed9f7efbc9",
|
||||
"key": "ak_input"
|
||||
}
|
||||
],
|
||||
@ -49,23 +88,24 @@
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Answer:NeatLandsWave"
|
||||
],
|
||||
"upstream": [
|
||||
"WenCai:TenParksOpen",
|
||||
"AkShare:CalmHotelsKnow"
|
||||
]
|
||||
},
|
||||
"KeywordExtract:AllGarlicsPress": {
|
||||
"downstream": [
|
||||
"AkShare:CalmHotelsKnow"
|
||||
],
|
||||
"KeywordExtract:BreezyGoatsRead": {
|
||||
"obj": {
|
||||
"component_name": "KeywordExtract",
|
||||
"params": {
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"parameter": "Precise",
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"temperature": 0.1,
|
||||
@ -75,139 +115,15 @@
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"answer:0"
|
||||
]
|
||||
},
|
||||
"WenCai:TenParksOpen": {
|
||||
"downstream": [
|
||||
"Generate:RottenMangosSmash"
|
||||
"AkShare:CalmHotelsKnow"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "WenCai",
|
||||
"params": {
|
||||
"query_type": "stock",
|
||||
"top_n": 5
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"answer:0"
|
||||
"Answer:NeatLandsWave"
|
||||
]
|
||||
},
|
||||
"answer:0": {
|
||||
"downstream": [
|
||||
"WenCai:TenParksOpen",
|
||||
"KeywordExtract:AllGarlicsPress"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"upstream": [
|
||||
"begin",
|
||||
"Generate:RottenMangosSmash"
|
||||
]
|
||||
},
|
||||
"begin": {
|
||||
"downstream": [
|
||||
"answer:0"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {
|
||||
"prologue": "Hi there!"
|
||||
}
|
||||
},
|
||||
"upstream": []
|
||||
}
|
||||
},
|
||||
"graph": {
|
||||
"edges": [
|
||||
{
|
||||
"id": "81de838d-a541-4b3f-9d68-9172ffd7c6b4",
|
||||
"label": "",
|
||||
"source": "begin",
|
||||
"target": "answer:0"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-WenCai:TenParksOpenb-Generate:RottenMangosSmashc",
|
||||
"markerEnd": "logo",
|
||||
"source": "WenCai:TenParksOpen",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:RottenMangosSmash",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-AkShare:CalmHotelsKnowb-Generate:RottenMangosSmashc",
|
||||
"markerEnd": "logo",
|
||||
"source": "AkShare:CalmHotelsKnow",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:RottenMangosSmash",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:RottenMangosSmashd-answer:0d",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:RottenMangosSmash",
|
||||
"sourceHandle": "d",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "answer:0",
|
||||
"targetHandle": "d",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-answer:0b-WenCai:TenParksOpenc",
|
||||
"markerEnd": "logo",
|
||||
"source": "answer:0",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "WenCai:TenParksOpen",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-answer:0b-KeywordExtract:AllGarlicsPressc",
|
||||
"markerEnd": "logo",
|
||||
"source": "answer:0",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "KeywordExtract:AllGarlicsPress",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-KeywordExtract:AllGarlicsPressb-AkShare:CalmHotelsKnowc",
|
||||
"markerEnd": "logo",
|
||||
"source": "KeywordExtract:AllGarlicsPress",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "AkShare:CalmHotelsKnow",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
@ -218,43 +134,20 @@
|
||||
"name": "Opening"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "begin",
|
||||
"position": {
|
||||
"x": -327.8118264317484,
|
||||
"y": -2.9994670375766646
|
||||
"x": -521.8118264317484,
|
||||
"y": -27.999467037576665
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -327.8118264317484,
|
||||
"y": -2.9994670375766646
|
||||
"x": -521.8118264317484,
|
||||
"y": -27.999467037576665
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 50
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {},
|
||||
"label": "Answer",
|
||||
"name": "Interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "answer:0",
|
||||
"position": {
|
||||
"x": -186.4123883768126,
|
||||
"y": -27.957575810677824
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -186.4123883768126,
|
||||
"y": -27.957575810677824
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
@ -264,24 +157,24 @@
|
||||
"top_n": 5
|
||||
},
|
||||
"label": "WenCai",
|
||||
"name": "wencai"
|
||||
"name": "Wencai"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "WenCai:TenParksOpen",
|
||||
"position": {
|
||||
"x": -21.020232062982387,
|
||||
"y": -47.73820863114301
|
||||
"x": -13.030801663267397,
|
||||
"y": -30.557141660610256
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -21.020232062982387,
|
||||
"y": -47.73820863114301
|
||||
"x": -13.030801663267397,
|
||||
"y": -30.557141660610256
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "ragNode",
|
||||
"width": 50
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -289,60 +182,47 @@
|
||||
"top_n": 10
|
||||
},
|
||||
"label": "AkShare",
|
||||
"name": "akshare"
|
||||
"name": "AKShare"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "AkShare:CalmHotelsKnow",
|
||||
"position": {
|
||||
"x": 99.2973230068406,
|
||||
"y": 62.01564509712426
|
||||
"x": 267.17349571786156,
|
||||
"y": 100.01281266803943
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 99.2973230068406,
|
||||
"y": 62.01564509712426
|
||||
"x": 267.17349571786156,
|
||||
"y": 100.01281266803943
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "ragNode",
|
||||
"width": 50
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_n": 2,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "KeywordExtract",
|
||||
"name": "keywords"
|
||||
"form": {},
|
||||
"label": "Answer",
|
||||
"name": "Interact"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 70,
|
||||
"id": "KeywordExtract:AllGarlicsPress",
|
||||
"height": 44,
|
||||
"id": "Answer:NeatLandsWave",
|
||||
"position": {
|
||||
"x": -18.700715327199163,
|
||||
"y": 51.73207329420393
|
||||
"x": -304.0612563145512,
|
||||
"y": -29.054278091837944
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -18.700715327199163,
|
||||
"y": 51.73207329420393
|
||||
"x": -304.0612563145512,
|
||||
"y": -29.054278091837944
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 70
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -350,20 +230,20 @@
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"maxTokensEnabled": false,
|
||||
"max_tokens": 2048,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 0,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "WenCai:TenParksOpen",
|
||||
"id": "6045431c-3206-4aae-8f4e-c36c27c488d1",
|
||||
"id": "d35f331b-2787-4ae7-ab81-a7ea15970843",
|
||||
"key": "wencai_input"
|
||||
},
|
||||
{
|
||||
"component_id": "AkShare:CalmHotelsKnow",
|
||||
"id": "1eca5d40-9718-4a62-8e4c-afbd48fd3929",
|
||||
"id": "36c4db0b-c80d-4119-a2a6-05ed9f7efbc9",
|
||||
"key": "ak_input"
|
||||
}
|
||||
],
|
||||
@ -376,24 +256,309 @@
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "generate"
|
||||
"name": "LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "Generate:RottenMangosSmash",
|
||||
"height": 170,
|
||||
"id": "Generate:RottenPianosUnite",
|
||||
"position": {
|
||||
"x": 271.2569202344237,
|
||||
"y": -154.181391877237
|
||||
"x": -16.477598988611703,
|
||||
"y": -251.90091743639417
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 271.2569202344237,
|
||||
"y": -154.181391877237
|
||||
"x": -16.477598988611703,
|
||||
"y": -251.90091743639417
|
||||
},
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"parameter": "Precise",
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_n": 2,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "KeywordExtract",
|
||||
"name": "Keywords"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 86,
|
||||
"id": "KeywordExtract:BreezyGoatsRead",
|
||||
"position": {
|
||||
"x": -17.690374759999543,
|
||||
"y": 80.39964392387697
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -17.690374759999543,
|
||||
"y": 80.39964392387697
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "keywordNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Receives the user's financial inquiries and displays the large model's response to financial questions."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Interact"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 162,
|
||||
"id": "Note:FuzzyPoetsLearn",
|
||||
"position": {
|
||||
"x": -296.5982116419186,
|
||||
"y": 38.77567426067935
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -296.5982116419186,
|
||||
"y": 38.77567426067935
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 162,
|
||||
"width": 214
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 214,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Extracts keywords based on the user's financial questions for better retrieval."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Keywords"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 155,
|
||||
"id": "Note:FlatBagsRun",
|
||||
"position": {
|
||||
"x": -14.82895160277127,
|
||||
"y": 186.52508153680787
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -14.82895160277127,
|
||||
"y": 186.52508153680787
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 155,
|
||||
"width": 213
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 213,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Searches on akshare for the latest news about economics based on the keywords and returns the results."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: AKShare"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:WarmClothsSort",
|
||||
"position": {
|
||||
"x": 573.7653319987893,
|
||||
"y": 102.64512355369035
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 573.7653319987893,
|
||||
"y": 102.64512355369035
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 128,
|
||||
"width": 283
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 283,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Searches by Wencai to select stocks that satisfy user mentioned conditions."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Wencai"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:TiredReadersWash",
|
||||
"position": {
|
||||
"x": 571.4274792499875,
|
||||
"y": -37.07105560150117
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 571.4274792499875,
|
||||
"y": -37.07105560150117
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 128,
|
||||
"width": 285
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 285,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "The large model answers the user's medical health questions based on the searched and retrieved content."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 163,
|
||||
"id": "Note:TameBoatsType",
|
||||
"position": {
|
||||
"x": -7.849538042569293,
|
||||
"y": -427.90526378748035
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -7.849538042569293,
|
||||
"y": -427.90526378748035
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 163,
|
||||
"width": 212
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 212,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:NeatLandsWavec",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:NeatLandsWave",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:NeatLandsWaveb-WenCai:TenParksOpenc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:NeatLandsWave",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "WenCai:TenParksOpen",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-KeywordExtract:BreezyGoatsReadb-AkShare:CalmHotelsKnowc",
|
||||
"markerEnd": "logo",
|
||||
"source": "KeywordExtract:BreezyGoatsRead",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "AkShare:CalmHotelsKnow",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-WenCai:TenParksOpenb-Generate:RottenPianosUniteb",
|
||||
"markerEnd": "logo",
|
||||
"source": "WenCai:TenParksOpen",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:RottenPianosUnite",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-AkShare:CalmHotelsKnowb-Generate:RottenPianosUniteb",
|
||||
"markerEnd": "logo",
|
||||
"source": "AkShare:CalmHotelsKnow",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:RottenPianosUnite",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:RottenPianosUnitec-Answer:NeatLandsWavec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:RottenPianosUnite",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:NeatLandsWave",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:NeatLandsWaveb-KeywordExtract:BreezyGoatsReadc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:NeatLandsWave",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "KeywordExtract:BreezyGoatsRead",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -6,87 +6,109 @@
|
||||
"dsl": {
|
||||
"answer": [],
|
||||
"components": {
|
||||
"Answer:FlatRavensPush": {
|
||||
"begin": {
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:BraveSnailsCheer",
|
||||
"Generate:UpsetCarrotsPoke"
|
||||
"Answer:FlatRavensPush"
|
||||
],
|
||||
"upstream": []
|
||||
},
|
||||
"PubMed:TwentyFansShake": {
|
||||
"obj": {
|
||||
"component_name": "PubMed",
|
||||
"params": {
|
||||
"email": "928018077@qq.com",
|
||||
"top_n": 10
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:SolidCrewsStare"
|
||||
],
|
||||
"upstream": [
|
||||
"Generate:FortyBaboonsRule"
|
||||
]
|
||||
},
|
||||
"Answer:FlatRavensPush": {
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:QuietMelonsHear",
|
||||
"Generate:FortyBaboonsRule"
|
||||
],
|
||||
"upstream": [
|
||||
"begin",
|
||||
"Generate:WholePansReply"
|
||||
"Generate:SolidCrewsStare"
|
||||
]
|
||||
},
|
||||
"Generate:BraveSnailsCheer": {
|
||||
"Generate:QuietMelonsHear": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional medical consulting translation assistant\n\nTask: Translate user questions into Chinese, ensuring accuracy of medical terminology and appropriateness of context.\n\nRequirements:\n- Accurately translate medical terminology to convey the integrity and emotional color of the original message.\n- For unclear or uncertain medical terminology, the original text may be retained to ensure accuracy.\n- Respect the privacy and sensitivity of medical consultations and ensure that sensitive information is not disclosed during the translation process.\n- If the user's question is in Chinese, there is no need to translate, just output the user's question directly\n\nExample:\nOriginal (English): Doctor, I have been suffering from chest pain and shortness of breath for the past few days.\nTranslation (Chinese): 医生,我这几天一直胸痛和气短。\n\nNote:\nOnly the translated content needs to be output, no other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Retrieval:BeigeBagsDress"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
]
|
||||
},
|
||||
"Generate:FortyBaboonsRule": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional Chinese-English medical question translation assistant\n\nTask: Accurately translate users' Chinese medical question content into English, ensuring accuracy of terminology and clarity of expression\n\nRequirements:\n- In-depth understanding of the terminology and disease descriptions in Chinese medical inquiries to ensure correct medical vocabulary is used in the English translation.\n- Maintain the semantic integrity and accuracy of the original text to avoid omitting important information or introducing errors.\n- Pay attention to the differences in expression habits between Chinese and English, and make appropriate adjustments to make the English translation more natural and fluent.\n- Respect the patient's privacy and the principle of medical confidentiality, and do not disclose any sensitive information during the translation process.\n\nExample:\nOriginal sentence: 我最近总是感觉胸闷,有时还会有心悸的感觉。\nTranslated: I've been feeling chest tightness recently, and sometimes I experience palpitations.\n\nNote:\nOnly the translated content should be given, do not output other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"PubMed:TwentyFansShake"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional Chinese-English medical question translation assistant\n\nTask: Accurately translate users' Chinese medical question content into English, ensuring accuracy of terminology and clarity of expression\n\nRequirements:\n- In-depth understanding of the terminology and disease descriptions in Chinese medical inquiries to ensure correct medical vocabulary is used in the English translation.\n- Maintain the semantic integrity and accuracy of the original text to avoid omitting important information or introducing errors.\n- Pay attention to the differences in expression habits between Chinese and English, and make appropriate adjustments to make the English translation more natural and fluent.\n- Respect the patient's privacy and the principle of medical confidentiality, and do not disclose any sensitive information during the translation process.\n\nExample\uff1a\nOriginal sentence: \u6211\u6700\u8fd1\u603b\u662f\u611f\u89c9\u80f8\u95f7\uff0c\u6709\u65f6\u8fd8\u4f1a\u6709\u5fc3\u60b8\u7684\u611f\u89c9\u3002\nTranslated: I've been feeling chest tightness recently, and sometimes I experience palpitations.\n\nNote:\nOnly the translated content should be given, do not output other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
]
|
||||
},
|
||||
"Generate:UpsetCarrotsPoke": {
|
||||
"downstream": [
|
||||
"Retrieval:FastPlumsWish"
|
||||
],
|
||||
"Generate:SolidCrewsStare": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional medical consulting translation assistant\n\nTask: Translate user questions into Chinese, ensuring accuracy of medical terminology and appropriateness of context.\n\nRequirements:\n- Accurately translate medical terminology to convey the integrity and emotional color of the original message.\n- For unclear or uncertain medical terminology, the original text may be retained to ensure accuracy.\n- Respect the privacy and sensitivity of medical consultations and ensure that sensitive information is not disclosed during the translation process.\n- If the user's question is in Chinese, there is no need to translate, just output the user's question directly\n\nExample:\nOriginal (English): Doctor, I have been suffering from chest pain and shortness of breath for the past few days.\nTranslation (Chinese): \u533b\u751f\uff0c\u6211\u8fd9\u51e0\u5929\u4e00\u76f4\u80f8\u75db\u548c\u6c14\u77ed\u3002\n\nNote:\nOnly the translated content needs to be output, no other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
]
|
||||
},
|
||||
"Generate:WholePansReply": {
|
||||
"downstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"max_tokens": 1024,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "PubMed:TwentyFansShake",
|
||||
"id": "2c063fef-5379-44ae-91f6-06e914e5ad2e",
|
||||
"id": "9fe5f82e-7be5-45d2-bc6c-1f9ba7e14b34",
|
||||
"key": "pm_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:FastPlumsWish",
|
||||
"id": "51fb537e-f68d-475f-93b3-d77c85e758a1",
|
||||
"component_id": "Retrieval:BeigeBagsDress",
|
||||
"id": "d2e7b0e2-e222-4776-988c-db239581a083",
|
||||
"key": "kb_input"
|
||||
}
|
||||
],
|
||||
@ -96,30 +118,15 @@
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
],
|
||||
"upstream": [
|
||||
"PubMed:TwentyFansShake",
|
||||
"Retrieval:FastPlumsWish"
|
||||
"Retrieval:BeigeBagsDress"
|
||||
]
|
||||
},
|
||||
"PubMed:TwentyFansShake": {
|
||||
"downstream": [
|
||||
"Generate:WholePansReply"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "PubMed",
|
||||
"params": {
|
||||
"email": "email@example.com",
|
||||
"top_n": 10
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:BraveSnailsCheer"
|
||||
]
|
||||
},
|
||||
"Retrieval:FastPlumsWish": {
|
||||
"downstream": [
|
||||
"Generate:WholePansReply"
|
||||
],
|
||||
"Retrieval:BeigeBagsDress": {
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
@ -129,128 +136,15 @@
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Generate:UpsetCarrotsPoke"
|
||||
]
|
||||
},
|
||||
"begin": {
|
||||
"downstream": [
|
||||
"Answer:FlatRavensPush"
|
||||
"Generate:SolidCrewsStare"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {}
|
||||
},
|
||||
"upstream": []
|
||||
"upstream": [
|
||||
"Generate:QuietMelonsHear"
|
||||
]
|
||||
}
|
||||
},
|
||||
"graph": {
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:FlatRavensPushc",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:FlatRavensPush",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-PubMed:TwentyFansShakeb-Generate:WholePansReplyc",
|
||||
"markerEnd": "logo",
|
||||
"source": "PubMed:TwentyFansShake",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:WholePansReply",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:FastPlumsWishb-Generate:WholePansReplyc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:FastPlumsWish",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:WholePansReply",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:WholePansReplya-Answer:FlatRavensPusha",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:WholePansReply",
|
||||
"sourceHandle": "a",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:FlatRavensPush",
|
||||
"targetHandle": "a",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:FlatRavensPushb-Generate:BraveSnailsCheerc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:FlatRavensPush",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:BraveSnailsCheer",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:BraveSnailsCheerb-PubMed:TwentyFansShakec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:BraveSnailsCheer",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "PubMed:TwentyFansShake",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:FlatRavensPushd-Generate:UpsetCarrotsPokec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:FlatRavensPush",
|
||||
"sourceHandle": "d",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:UpsetCarrotsPoke",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:UpsetCarrotsPokeb-Retrieval:FastPlumsWishc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:UpsetCarrotsPoke",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:FastPlumsWish",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
@ -258,21 +152,21 @@
|
||||
"name": "opening"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "begin",
|
||||
"position": {
|
||||
"x": -150.51830264174046,
|
||||
"y": 192.36132289534214
|
||||
"x": -599.8361708291377,
|
||||
"y": 161.91688790133628
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -150.51830264174046,
|
||||
"y": 192.36132289534214
|
||||
"x": -599.8361708291377,
|
||||
"y": 161.91688790133628
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 50
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -284,21 +178,21 @@
|
||||
"name": "Search PubMed"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"height": 44,
|
||||
"id": "PubMed:TwentyFansShake",
|
||||
"position": {
|
||||
"x": 411.1209571180216,
|
||||
"y": 293.67922026697573
|
||||
"x": 389.7229173847695,
|
||||
"y": 276.4372267765921
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 411.1209571180216,
|
||||
"y": 293.67922026697573
|
||||
"x": 389.7229173847695,
|
||||
"y": 276.4372267765921
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "ragNode",
|
||||
"width": 50
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -307,49 +201,21 @@
|
||||
"name": "Interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"height": 44,
|
||||
"id": "Answer:FlatRavensPush",
|
||||
"position": {
|
||||
"x": -27.594553801136584,
|
||||
"y": 166.66278050463274
|
||||
"x": -370.881803561134,
|
||||
"y": 161.41373998842477
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -27.594553801136584,
|
||||
"y": 166.66278050463274
|
||||
"x": -370.881803561134,
|
||||
"y": 161.41373998842477
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "Search KB"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "Retrieval:FastPlumsWish",
|
||||
"position": {
|
||||
"x": 389.1925431609217,
|
||||
"y": -53.66130634833843
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 389.1925431609217,
|
||||
"y": -53.66130634833843
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
@ -357,20 +223,100 @@
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 1024,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional medical consulting translation assistant\n\nTask: Translate user questions into Chinese, ensuring accuracy of medical terminology and appropriateness of context.\n\nRequirements:\n- Accurately translate medical terminology to convey the integrity and emotional color of the original message.\n- For unclear or uncertain medical terminology, the original text may be retained to ensure accuracy.\n- Respect the privacy and sensitivity of medical consultations and ensure that sensitive information is not disclosed during the translation process.\n- If the user's question is in Chinese, there is no need to translate, just output the user's question directly\n\nExample:\nOriginal (English): Doctor, I have been suffering from chest pain and shortness of breath for the past few days.\nTranslation (Chinese): 医生,我这几天一直胸痛和气短。\n\nNote:\nOnly the translated content needs to be output, no other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate to Chinese"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 86,
|
||||
"id": "Generate:QuietMelonsHear",
|
||||
"position": {
|
||||
"x": -2.756518132081453,
|
||||
"y": 38.86485966020132
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -2.756518132081453,
|
||||
"y": 38.86485966020132
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional Chinese-English medical question translation assistant\n\nTask: Accurately translate users' Chinese medical question content into English, ensuring accuracy of terminology and clarity of expression\n\nRequirements:\n- In-depth understanding of the terminology and disease descriptions in Chinese medical inquiries to ensure correct medical vocabulary is used in the English translation.\n- Maintain the semantic integrity and accuracy of the original text to avoid omitting important information or introducing errors.\n- Pay attention to the differences in expression habits between Chinese and English, and make appropriate adjustments to make the English translation more natural and fluent.\n- Respect the patient's privacy and the principle of medical confidentiality, and do not disclose any sensitive information during the translation process.\n\nExample:\nOriginal sentence: 我最近总是感觉胸闷,有时还会有心悸的感觉。\nTranslated: I've been feeling chest tightness recently, and sometimes I experience palpitations.\n\nNote:\nOnly the translated content should be given, do not output other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate to English"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 86,
|
||||
"id": "Generate:FortyBaboonsRule",
|
||||
"position": {
|
||||
"x": -3.825864707727135,
|
||||
"y": 253.2285157283701
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -3.825864707727135,
|
||||
"y": 253.2285157283701
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "PubMed:TwentyFansShake",
|
||||
"id": "2c063fef-5379-44ae-91f6-06e914e5ad2e",
|
||||
"id": "9fe5f82e-7be5-45d2-bc6c-1f9ba7e14b34",
|
||||
"key": "pm_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:FastPlumsWish",
|
||||
"id": "51fb537e-f68d-475f-93b3-d77c85e758a1",
|
||||
"component_id": "Retrieval:BeigeBagsDress",
|
||||
"id": "d2e7b0e2-e222-4776-988c-db239581a083",
|
||||
"key": "kb_input"
|
||||
}
|
||||
],
|
||||
@ -386,100 +332,336 @@
|
||||
"name": "LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "Generate:WholePansReply",
|
||||
"height": 172,
|
||||
"id": "Generate:SolidCrewsStare",
|
||||
"position": {
|
||||
"x": 632.6457249054133,
|
||||
"y": 243.99641016676225
|
||||
"x": 427.0382682049008,
|
||||
"y": -221.26975391424511
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 632.6457249054133,
|
||||
"y": 243.99641016676225
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional Chinese-English medical question translation assistant\n\nTask: Accurately translate users' Chinese medical question content into English, ensuring accuracy of terminology and clarity of expression\n\nRequirements:\n- In-depth understanding of the terminology and disease descriptions in Chinese medical inquiries to ensure correct medical vocabulary is used in the English translation.\n- Maintain the semantic integrity and accuracy of the original text to avoid omitting important information or introducing errors.\n- Pay attention to the differences in expression habits between Chinese and English, and make appropriate adjustments to make the English translation more natural and fluent.\n- Respect the patient's privacy and the principle of medical confidentiality, and do not disclose any sensitive information during the translation process.\n\nExample\uff1a\nOriginal sentence: \u6211\u6700\u8fd1\u603b\u662f\u611f\u89c9\u80f8\u95f7\uff0c\u6709\u65f6\u8fd8\u4f1a\u6709\u5fc3\u60b8\u7684\u611f\u89c9\u3002\nTranslated: I've been feeling chest tightness recently, and sometimes I experience palpitations.\n\nNote:\nOnly the translated content should be given, do not output other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate to English"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "Generate:BraveSnailsCheer",
|
||||
"position": {
|
||||
"x": 235.27003638545648,
|
||||
"y": 141.22382352447266
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 235.27003638545648,
|
||||
"y": 141.22382352447266
|
||||
"x": 427.0382682049008,
|
||||
"y": -221.26975391424511
|
||||
},
|
||||
"selected": true,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are a professional medical consulting translation assistant\n\nTask: Translate user questions into Chinese, ensuring accuracy of medical terminology and appropriateness of context.\n\nRequirements:\n- Accurately translate medical terminology to convey the integrity and emotional color of the original message.\n- For unclear or uncertain medical terminology, the original text may be retained to ensure accuracy.\n- Respect the privacy and sensitivity of medical consultations and ensure that sensitive information is not disclosed during the translation process.\n- If the user's question is in Chinese, there is no need to translate, just output the user's question directly\n\nExample:\nOriginal (English): Doctor, I have been suffering from chest pain and shortness of breath for the past few days.\nTranslation (Chinese): \u533b\u751f\uff0c\u6211\u8fd9\u51e0\u5929\u4e00\u76f4\u80f8\u75db\u548c\u6c14\u77ed\u3002\n\nNote:\nOnly the translated content needs to be output, no other irrelevant content!",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "Translate to Chinese"
|
||||
"label": "Retrieval",
|
||||
"name": "Search Q&A"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "Generate:UpsetCarrotsPoke",
|
||||
"height": 44,
|
||||
"id": "Retrieval:BeigeBagsDress",
|
||||
"position": {
|
||||
"x": 174.90602346154253,
|
||||
"y": -74.84373200722371
|
||||
"x": 382.25527986090765,
|
||||
"y": 35.38705653631584
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 174.90602346154253,
|
||||
"y": -74.84373200722371
|
||||
"x": 382.25527986090765,
|
||||
"y": 35.38705653631584
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
"type": "retrievalNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Receives the user's financial inquiries and displays the large model's response to financial questions."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Interface"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 162,
|
||||
"id": "Note:RedZebrasEnjoy",
|
||||
"position": {
|
||||
"x": -374.13983303471906,
|
||||
"y": 219.54112331790157
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -374.13983303471906,
|
||||
"y": 219.54112331790157
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 162,
|
||||
"width": 200
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Translate user's question to English by LLM."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Translate to English"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:DarkIconsClap",
|
||||
"position": {
|
||||
"x": -0.453362859534991,
|
||||
"y": 357.3687792184929
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -0.453362859534991,
|
||||
"y": 357.3687792184929
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 128,
|
||||
"width": 204
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 204
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Translate user's question to Chinese by LLM."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Translate to Chinese"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:SmallRiversTap",
|
||||
"position": {
|
||||
"x": -5.453362859535048,
|
||||
"y": -105.63122078150693
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -5.453362859535048,
|
||||
"y": -105.63122078150693
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 128,
|
||||
"width": 196
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 196
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "PubMed® comprises more than 37 million citations for biomedical literature from MEDLINE, life science journals, and online books. Citations may include links to full text content from PubMed Central and publisher web sites."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Search PubMed"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 220,
|
||||
"id": "Note:MightyDeerShout",
|
||||
"position": {
|
||||
"x": 718.5466371404648,
|
||||
"y": 275.36877921849293
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 718.5466371404648,
|
||||
"y": 275.36877921849293
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 220,
|
||||
"width": 287
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 287
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "You can download the Q&A dataset at\nhttps://huggingface.co/datasets/InfiniFlow/medical_QA"
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Search Q&A"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:VioletSuitsFlash",
|
||||
"position": {
|
||||
"x": 776.4332169584197,
|
||||
"y": 32.89802610798361
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 776.4332169584197,
|
||||
"y": 32.89802610798361
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 128,
|
||||
"width": 387
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 387
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "A prompt sumerize content from search result from PubMed and Q&A dataset."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: LLM"
|
||||
},
|
||||
"dragHandle": ".note-drag-handle",
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:BeigeCoinsBuild",
|
||||
"position": {
|
||||
"x": 756.9053449234701,
|
||||
"y": -212.92342186138177
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 756.9053449234701,
|
||||
"y": -212.92342186138177
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 269
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:FlatRavensPushc",
|
||||
"markerEnd": "logo",
|
||||
"source": "begin",
|
||||
"sourceHandle": null,
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:FlatRavensPush",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:FlatRavensPushb-Generate:QuietMelonsHearc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:FlatRavensPush",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:QuietMelonsHear",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:FlatRavensPushb-Generate:FortyBaboonsRulec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:FlatRavensPush",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:FortyBaboonsRule",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:FortyBaboonsRuleb-PubMed:TwentyFansShakec",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:FortyBaboonsRule",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "PubMed:TwentyFansShake",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-PubMed:TwentyFansShakeb-Generate:SolidCrewsStareb",
|
||||
"markerEnd": "logo",
|
||||
"source": "PubMed:TwentyFansShake",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:SolidCrewsStare",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:BeigeBagsDressb-Generate:SolidCrewsStareb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:BeigeBagsDress",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:SolidCrewsStare",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:QuietMelonsHearb-Retrieval:BeigeBagsDressc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:QuietMelonsHear",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:BeigeBagsDress",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:SolidCrewsStarec-Answer:FlatRavensPushc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:SolidCrewsStare",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:FlatRavensPush",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -6,134 +6,469 @@
|
||||
"dsl": {
|
||||
"answer": [],
|
||||
"components": {
|
||||
"Answer:SocialAdsWonder": {
|
||||
"begin": {
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"Retrieval:WetNewsHunt",
|
||||
"Retrieval:OpenWingsRepeat",
|
||||
"Retrieval:StrongDrinksShare"
|
||||
"Answer:SocialAdsWonder"
|
||||
],
|
||||
"upstream": []
|
||||
},
|
||||
"Answer:SocialAdsWonder": {
|
||||
"obj": {
|
||||
"component_name": "Answer",
|
||||
"params": {}
|
||||
},
|
||||
"downstream": [
|
||||
"Retrieval:TrueCornersJam",
|
||||
"Retrieval:EasyDryersShop",
|
||||
"Retrieval:LazyChefsWatch"
|
||||
],
|
||||
"upstream": [
|
||||
"begin",
|
||||
"Generate:OliveDotsInvent"
|
||||
"Generate:RareSymbolsGrin"
|
||||
]
|
||||
},
|
||||
"Generate:OliveDotsInvent": {
|
||||
"Retrieval:TrueCornersJam": {
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in DDL!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.02,
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
"Generate:RareSymbolsGrin"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"Retrieval:EasyDryersShop": {
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in Q-SQL!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:RareSymbolsGrin"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"Retrieval:LazyChefsWatch": {
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in DB-Description!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"downstream": [
|
||||
"Generate:RareSymbolsGrin"
|
||||
],
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"Generate:RareSymbolsGrin": {
|
||||
"obj": {
|
||||
"component_name": "Generate",
|
||||
"params": {
|
||||
"cite": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "Retrieval:StrongDrinksShare",
|
||||
"id": "36c09e33-bad2-42fe-9a56-f136677bb405",
|
||||
"component_id": "Retrieval:TrueCornersJam",
|
||||
"id": "78644673-9236-4605-8110-59705fc38784",
|
||||
"key": "ddl_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:OpenWingsRepeat",
|
||||
"id": "e4cfe15e-64cd-4351-b49e-0da2f5c8ec34",
|
||||
"component_id": "Retrieval:LazyChefsWatch",
|
||||
"id": "afbf91ce-6f58-4573-b02d-9a4973f124f4",
|
||||
"key": "db_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:WetNewsHunt",
|
||||
"id": "946d8272-fc98-4040-a75f-502df7e4a42e",
|
||||
"component_id": "Retrieval:EasyDryersShop",
|
||||
"id": "ee2b84f4-1cf5-43be-80e6-60bfaea3d834",
|
||||
"key": "sql_input"
|
||||
}
|
||||
],
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "Role: You are an intelligent DB assistant that can help humans generate SQL statements for problems.\n\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||||
"prompt": "##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.",
|
||||
"temperature": 0.1,
|
||||
"top_p": 0.3
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Retrieval:StrongDrinksShare",
|
||||
"Retrieval:WetNewsHunt",
|
||||
"Retrieval:OpenWingsRepeat"
|
||||
]
|
||||
},
|
||||
"Retrieval:OpenWingsRepeat": {
|
||||
"downstream": [
|
||||
"Generate:OliveDotsInvent"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in DB-Description!",
|
||||
"kb_ids": [
|
||||
"0ab5de985ba911efad9942010a8a0006"
|
||||
],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"Retrieval:StrongDrinksShare": {
|
||||
"downstream": [
|
||||
"Generate:OliveDotsInvent"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in DDL!",
|
||||
"kb_ids": [
|
||||
"b1a6a45e5ba811ef80dc42010a8a0006"
|
||||
],
|
||||
"keywords_similarity_weight": 0.1,
|
||||
"similarity_threshold": 0.02,
|
||||
"top_n": 18
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"Retrieval:WetNewsHunt": {
|
||||
"downstream": [
|
||||
"Generate:OliveDotsInvent"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Retrieval",
|
||||
"params": {
|
||||
"empty_response": "Nothing found in Q-SQL!",
|
||||
"kb_ids": [
|
||||
"31257b925b9f11ef9f0142010a8a0004"
|
||||
],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
}
|
||||
},
|
||||
"upstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
]
|
||||
},
|
||||
"begin": {
|
||||
"downstream": [
|
||||
"Answer:SocialAdsWonder"
|
||||
],
|
||||
"obj": {
|
||||
"component_name": "Begin",
|
||||
"params": {}
|
||||
},
|
||||
"upstream": []
|
||||
"upstream": [
|
||||
"Retrieval:TrueCornersJam",
|
||||
"Retrieval:EasyDryersShop",
|
||||
"Retrieval:LazyChefsWatch"
|
||||
]
|
||||
}
|
||||
},
|
||||
"embed_id": "",
|
||||
"graph": {
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
"label": "Begin",
|
||||
"name": "begin"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "begin",
|
||||
"position": {
|
||||
"x": -520.486587527275,
|
||||
"y": 117.87988995940702
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -520.486587527275,
|
||||
"y": 117.87988995940702
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {},
|
||||
"label": "Answer",
|
||||
"name": "interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "Answer:SocialAdsWonder",
|
||||
"position": {
|
||||
"x": -284.9289105495367,
|
||||
"y": 119.9282206409824
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -284.9289105495367,
|
||||
"y": 119.9282206409824
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in DDL!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.02,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "DDL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "Retrieval:TrueCornersJam",
|
||||
"position": {
|
||||
"x": 119.61927071085717,
|
||||
"y": -40.184181873335746
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 119.61927071085717,
|
||||
"y": -40.184181873335746
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "retrievalNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in Q-SQL!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "Q->SQL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "Retrieval:EasyDryersShop",
|
||||
"position": {
|
||||
"x": 81.2024576603057,
|
||||
"y": 94.16303322180948
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 81.2024576603057,
|
||||
"y": 94.16303322180948
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "retrievalNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in DB-Description!",
|
||||
"kb_ids": [],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "DB Description"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 44,
|
||||
"id": "Retrieval:LazyChefsWatch",
|
||||
"position": {
|
||||
"x": 51.228157704293324,
|
||||
"y": 252.77721891325103
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 51.228157704293324,
|
||||
"y": 252.77721891325103
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "retrievalNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat@DeepSeek",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameter": "Precise",
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "Retrieval:TrueCornersJam",
|
||||
"id": "78644673-9236-4605-8110-59705fc38784",
|
||||
"key": "ddl_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:LazyChefsWatch",
|
||||
"id": "afbf91ce-6f58-4573-b02d-9a4973f124f4",
|
||||
"key": "db_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:EasyDryersShop",
|
||||
"id": "ee2b84f4-1cf5-43be-80e6-60bfaea3d834",
|
||||
"key": "sql_input"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 212,
|
||||
"id": "Generate:RareSymbolsGrin",
|
||||
"position": {
|
||||
"x": 6.6098512156750076,
|
||||
"y": 405.0105548561454
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 6.6098512156750076,
|
||||
"y": 405.0105548561454
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "generateNode",
|
||||
"width": 200
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Receives a sentence that the user wants to convert into SQL and displays the result of the large model's SQL conversion."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 132,
|
||||
"id": "Note:GentleRabbitsWonder",
|
||||
"position": {
|
||||
"x": -287.3066094433631,
|
||||
"y": -30.808189185380513
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -287.3066094433631,
|
||||
"y": -30.808189185380513
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 132,
|
||||
"width": 324
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 324,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "The large model learns which tables may be available based on the responses from three knowledge bases and converts the user's input into SQL statements."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: LLM"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 147,
|
||||
"id": "Note:SixCitiesJoke",
|
||||
"position": {
|
||||
"x": 5.12121582244032,
|
||||
"y": 637.6539219843564
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 5.12121582244032,
|
||||
"y": 637.6539219843564
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 147,
|
||||
"width": 326
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 326,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Searches for description about meanings of tables and fields."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: DB description"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 128,
|
||||
"id": "Note:FamousCarpetsTaste",
|
||||
"position": {
|
||||
"x": 399.9267065852242,
|
||||
"y": 250.0329701879931
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 399.9267065852242,
|
||||
"y": 250.0329701879931
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 269,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "Searches for samples about question to SQL.\nPlease check this dataset: https://huggingface.co/datasets/InfiniFlow/text2sql"
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: Q->SQL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 130,
|
||||
"id": "Note:PoliteBeesArrive",
|
||||
"position": {
|
||||
"x": 489.0393427986917,
|
||||
"y": 96.58232093146341
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 489.0393427986917,
|
||||
"y": 96.58232093146341
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 130,
|
||||
"width": 451
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 451,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"text": "DDL(Data Definition Language).\n\nSearches for relevent database creation statements.\n\nIt should bind with a KB to which DDL is dumped in.\nYou could use 'General' as parsing method and ';' as delimiter."
|
||||
},
|
||||
"label": "Note",
|
||||
"name": "N: DDL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 258,
|
||||
"id": "Note:SmartWingsDouble",
|
||||
"position": {
|
||||
"x": 404.1930553966363,
|
||||
"y": -208.84980249039137
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 404.1930553966363,
|
||||
"y": -208.84980249039137
|
||||
},
|
||||
"resizing": false,
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"style": {
|
||||
"height": 258,
|
||||
"width": 283
|
||||
},
|
||||
"targetPosition": "left",
|
||||
"type": "noteNode",
|
||||
"width": 283,
|
||||
"dragHandle": ".note-drag-handle"
|
||||
}
|
||||
],
|
||||
"edges": [
|
||||
{
|
||||
"id": "reactflow__edge-begin-Answer:SocialAdsWonderc",
|
||||
@ -149,7 +484,7 @@
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:WetNewsHuntc",
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:TrueCornersJamc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"sourceHandle": "b",
|
||||
@ -157,12 +492,12 @@
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:WetNewsHunt",
|
||||
"target": "Retrieval:TrueCornersJam",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:OpenWingsRepeatc",
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:EasyDryersShopc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"sourceHandle": "b",
|
||||
@ -170,12 +505,12 @@
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:OpenWingsRepeat",
|
||||
"target": "Retrieval:EasyDryersShop",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:StrongDrinksSharec",
|
||||
"id": "reactflow__edge-Answer:SocialAdsWonderb-Retrieval:LazyChefsWatchc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Answer:SocialAdsWonder",
|
||||
"sourceHandle": "b",
|
||||
@ -183,257 +518,62 @@
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Retrieval:StrongDrinksShare",
|
||||
"target": "Retrieval:LazyChefsWatch",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:StrongDrinksShareb-Generate:OliveDotsInventa",
|
||||
"id": "reactflow__edge-Retrieval:TrueCornersJamb-Generate:RareSymbolsGrinb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:StrongDrinksShare",
|
||||
"source": "Retrieval:TrueCornersJam",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:OliveDotsInvent",
|
||||
"targetHandle": "a",
|
||||
"target": "Generate:RareSymbolsGrin",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:WetNewsHuntb-Generate:OliveDotsInventa",
|
||||
"id": "reactflow__edge-Retrieval:EasyDryersShopb-Generate:RareSymbolsGrinb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:WetNewsHunt",
|
||||
"source": "Retrieval:EasyDryersShop",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:OliveDotsInvent",
|
||||
"targetHandle": "a",
|
||||
"target": "Generate:RareSymbolsGrin",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Retrieval:OpenWingsRepeatb-Generate:OliveDotsInventa",
|
||||
"id": "reactflow__edge-Retrieval:LazyChefsWatchb-Generate:RareSymbolsGrinb",
|
||||
"markerEnd": "logo",
|
||||
"source": "Retrieval:OpenWingsRepeat",
|
||||
"source": "Retrieval:LazyChefsWatch",
|
||||
"sourceHandle": "b",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Generate:OliveDotsInvent",
|
||||
"targetHandle": "a",
|
||||
"target": "Generate:RareSymbolsGrin",
|
||||
"targetHandle": "b",
|
||||
"type": "buttonEdge"
|
||||
},
|
||||
{
|
||||
"id": "reactflow__edge-Generate:OliveDotsInventc-Answer:SocialAdsWonderd",
|
||||
"id": "reactflow__edge-Generate:RareSymbolsGrinc-Answer:SocialAdsWonderc",
|
||||
"markerEnd": "logo",
|
||||
"source": "Generate:OliveDotsInvent",
|
||||
"source": "Generate:RareSymbolsGrin",
|
||||
"sourceHandle": "c",
|
||||
"style": {
|
||||
"stroke": "rgb(202 197 245)",
|
||||
"strokeWidth": 2
|
||||
},
|
||||
"target": "Answer:SocialAdsWonder",
|
||||
"targetHandle": "d",
|
||||
"targetHandle": "c",
|
||||
"type": "buttonEdge"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
"label": "Begin",
|
||||
"name": "begin"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 50,
|
||||
"id": "begin",
|
||||
"position": {
|
||||
"x": -398.61441136019056,
|
||||
"y": 144.28672563400067
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -398.61441136019056,
|
||||
"y": 144.28672563400067
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "left",
|
||||
"targetPosition": "right",
|
||||
"type": "beginNode",
|
||||
"width": 50
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {},
|
||||
"label": "Answer",
|
||||
"name": "interface"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "Answer:SocialAdsWonder",
|
||||
"position": {
|
||||
"x": -271.9289105495367,
|
||||
"y": 120.9282206409824
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -271.9289105495367,
|
||||
"y": 120.9282206409824
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in Q-SQL!",
|
||||
"kb_ids": [
|
||||
"31257b925b9f11ef9f0142010a8a0004"
|
||||
],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "Q->SQL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "Retrieval:WetNewsHunt",
|
||||
"position": {
|
||||
"x": -44.1852870981603,
|
||||
"y": 130.77161580129524
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -44.1852870981603,
|
||||
"y": 130.77161580129524
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"cite": true,
|
||||
"frequencyPenaltyEnabled": true,
|
||||
"frequency_penalty": 0.7,
|
||||
"llm_id": "deepseek-chat",
|
||||
"maxTokensEnabled": true,
|
||||
"max_tokens": 256,
|
||||
"message_history_window_size": 12,
|
||||
"parameters": [
|
||||
{
|
||||
"component_id": "Retrieval:StrongDrinksShare",
|
||||
"id": "36c09e33-bad2-42fe-9a56-f136677bb405",
|
||||
"key": "ddl_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:OpenWingsRepeat",
|
||||
"id": "e4cfe15e-64cd-4351-b49e-0da2f5c8ec34",
|
||||
"key": "db_input"
|
||||
},
|
||||
{
|
||||
"component_id": "Retrieval:WetNewsHunt",
|
||||
"id": "946d8272-fc98-4040-a75f-502df7e4a42e",
|
||||
"key": "sql_input"
|
||||
}
|
||||
],
|
||||
"presencePenaltyEnabled": true,
|
||||
"presence_penalty": 0.4,
|
||||
"prompt": "##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {ddl_input}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {db_input}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {sql_input}.",
|
||||
"temperature": 0.1,
|
||||
"temperatureEnabled": true,
|
||||
"topPEnabled": true,
|
||||
"top_p": 0.3
|
||||
},
|
||||
"label": "Generate",
|
||||
"name": "FuzzyGoatsCover"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 150,
|
||||
"id": "Generate:OliveDotsInvent",
|
||||
"position": {
|
||||
"x": 127.63574050151522,
|
||||
"y": -209.30480702441503
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": 127.63574050151522,
|
||||
"y": -209.30480702441503
|
||||
},
|
||||
"selected": true,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 150
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in DB-Description!",
|
||||
"kb_ids": [
|
||||
"0ab5de985ba911efad9942010a8a0006"
|
||||
],
|
||||
"keywords_similarity_weight": 0.3,
|
||||
"similarity_threshold": 0.2,
|
||||
"top_n": 8
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "DB Description"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "Retrieval:OpenWingsRepeat",
|
||||
"position": {
|
||||
"x": -44.48969718602855,
|
||||
"y": 272.5769102113132
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -44.48969718602855,
|
||||
"y": 272.5769102113132
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"form": {
|
||||
"empty_response": "Nothing found in DDL!",
|
||||
"kb_ids": [
|
||||
"b1a6a45e5ba811ef80dc42010a8a0006"
|
||||
],
|
||||
"keywords_similarity_weight": 0.1,
|
||||
"similarity_threshold": 0.02,
|
||||
"top_n": 18
|
||||
},
|
||||
"label": "Retrieval",
|
||||
"name": "DDL"
|
||||
},
|
||||
"dragging": false,
|
||||
"height": 100,
|
||||
"id": "Retrieval:StrongDrinksShare",
|
||||
"position": {
|
||||
"x": -43.93396035294677,
|
||||
"y": -8.215558854318687
|
||||
},
|
||||
"positionAbsolute": {
|
||||
"x": -43.93396035294677,
|
||||
"y": -8.215558854318687
|
||||
},
|
||||
"selected": false,
|
||||
"sourcePosition": "right",
|
||||
"targetPosition": "left",
|
||||
"type": "logicNode",
|
||||
"width": 100
|
||||
}
|
||||
]
|
||||
},
|
||||
"history": [],
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user