Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

remove presence_penalty for chatglm (#268)

KevinHuSh6748872b0b04
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py
index 4da841bd12..98f6ce641c 100644
--- a/rag/llm/chat_model.py
+++ b/rag/llm/chat_model.py
@@ -116,6 +116,7 @@ class ZhipuChat(Base):
if system:
history.insert(0, {"role": "system", "content": system})
try:
+ if "presence_penalty" in gen_conf: del gen_conf["presence_penalty"]
response = self.client.chat.completions.create(
model=self.model_name,
messages=history,