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
lower openai version in requirements.txt (#1747)
黄腾5cff780ec463
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex fb6fca8b21..e021b9ddae 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -180,13 +180,18 @@ class BaiChuanChat(Base):stream=True,**self._format_params(gen_conf))for resp in response:- if resp.choices[0].finish_reason == "stop":- if not resp.choices[0].delta.content:- continue- total_tokens = resp.usage.total_tokens+ if not resp.choices:continueif not resp.choices[0].delta.content:- continue+ resp.choices[0].delta.content = ""ans += resp.choices[0].delta.content+ total_tokens = (+ (+ total_tokens+ + num_tokens_from_string(resp.choices[0].delta.content)+ )+ if not hasattr(resp, "usage")+ else resp.usage["total_tokens"]+ )if resp.choices[0].finish_reason == "length":ans += "...\nFor the content length reason, it stopped, continue?" if is_english([ans]) else "······\n由于长度的原因,回答被截断了,要继续吗?"diff --git a/requirements.txt b/requirements.txtindex fa57cfdedf..b336f7df8d 100644--- a/requirements.txt+++ b/requirements.txt@@ -39,7 +39,7 @@ numpy==1.26.4ollama==0.2.1onnxruntime==1.17.3onnxruntime_gpu==1.17.1-openai==1.35.14+openai==1.12.0opencv_python==4.9.0.80opencv_python_headless==4.9.0.80openpyxl==3.1.2