mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 01:15:51 +08:00
fix no resualt bugs (#1448)
### What problem does this PR solve? ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
fb66b1e726
commit
30b88e2b91
@ -220,6 +220,7 @@ class Canvas(ABC):
|
|||||||
prepare2run([p])
|
prepare2run([p])
|
||||||
break
|
break
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
break
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -231,6 +232,7 @@ class Canvas(ABC):
|
|||||||
prepare2run([p])
|
prepare2run([p])
|
||||||
break
|
break
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
break
|
||||||
|
|
||||||
if self.answer:
|
if self.answer:
|
||||||
cpn_id = self.answer[0]
|
cpn_id = self.answer[0]
|
||||||
|
@ -57,6 +57,6 @@ class Baidu(ComponentBase, ABC):
|
|||||||
in zip(url_res, title_res, body_res)]
|
in zip(url_res, title_res, body_res)]
|
||||||
del body_res, url_res, title_res
|
del body_res, url_res, title_res
|
||||||
|
|
||||||
br = pd.DataFrame(baidu_res, columns=['content'])
|
print(baidu_res, ":::::::::::::::::::::::::::::::::")
|
||||||
print(">>>>>>>>>>>>>>>>>>>>>>>>>>\n", br)
|
return Baidu.be_output(baidu_res)
|
||||||
return br
|
|
||||||
|
@ -57,6 +57,5 @@ class DuckDuckGoSearch(ComponentBase, ABC):
|
|||||||
duck_res = ['<a href="' + i["url"] + '">' + i["title"] + '</a> ' + i["body"] for i in
|
duck_res = ['<a href="' + i["url"] + '">' + i["title"] + '</a> ' + i["body"] for i in
|
||||||
ddgs.news(ans, max_results=self._param.top_n)]
|
ddgs.news(ans, max_results=self._param.top_n)]
|
||||||
|
|
||||||
dr = pd.DataFrame(duck_res, columns=['content'])
|
print(duck_res, ":::::::::::::::::::::::::::::::::")
|
||||||
print(">>>>>>>>>>>>>>>>>>>>>>>>>>\n", dr)
|
return DuckDuckGoSearch.be_output(duck_res)
|
||||||
return dr
|
|
@ -46,7 +46,11 @@ class Message(ComponentBase, ABC):
|
|||||||
return Message.be_output(random.choice(self._param.messages))
|
return Message.be_output(random.choice(self._param.messages))
|
||||||
|
|
||||||
def stream_output(self):
|
def stream_output(self):
|
||||||
|
res = None
|
||||||
if self._param.messages:
|
if self._param.messages:
|
||||||
yield {"content": random.choice(self._param.messages)}
|
res = {"content": random.choice(self._param.messages)}
|
||||||
|
yield res
|
||||||
|
|
||||||
|
self.set_output(res)
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
"component_name": "Message",
|
"component_name": "Message",
|
||||||
"params": {
|
"params": {
|
||||||
"messages": [
|
"messages": [
|
||||||
"我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
|
"我简单介绍一下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -448,7 +448,7 @@
|
|||||||
"data": {
|
"data": {
|
||||||
"form": {
|
"form": {
|
||||||
"messages": [
|
"messages": [
|
||||||
"我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
|
"我简单介绍一下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"label": "Message",
|
"label": "Message",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user