RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
fix bug in api (#1088)
KevinHuSh923c3b8cac9d
diff --git a/api/apps/api_app.py b/api/apps/api_app.pyindex e7ffcdeac3..324ff93eab 100644--- a/api/apps/api_app.py+++ b/api/apps/api_app.py@@ -208,7 +208,7 @@ def completion():try:for ans in chat(dia, msg, True, **req):fillin_conv(ans)- rename_field(rename_field)+ rename_field(ans)yield "data:" + json.dumps({"retcode": 0, "retmsg": "", "data": ans}, ensure_ascii=False) + "\n\n"API4ConversationService.append_message(conv.id, conv.to_dict())except Exception as e:diff --git a/rag/llm/embedding_model.py b/rag/llm/embedding_model.pyindex 328e43bac8..91c2e77eeb 100644--- a/rag/llm/embedding_model.py+++ b/rag/llm/embedding_model.py@@ -140,7 +140,7 @@ class QWenEmbed(Base):token_count += resp["usage"]["total_tokens"]return np.array(res), token_countexcept Exception as e:- raise Exception("Account abnormal. Please ensure it's on good standing.")+ raise Exception("Account abnormal. Please ensure it's on good standing to use QWen's "+self.model_name)return np.array([]), 0def encode_queries(self, text):@@ -153,7 +153,7 @@ class QWenEmbed(Base):return np.array(resp["output"]["embeddings"][0]["embedding"]), resp["usage"]["total_tokens"]except Exception as e:- raise Exception("Account abnormal. Please ensure it's on good standing.")+ raise Exception("Account abnormal. Please ensure it's on good standing to use QWen's "+self.model_name)return np.array([]), 0