KevinHuSh
commited on
Commit
·
4bf8e84
1
Parent(s):
982788f
remove presence_penalty for chatglm (#268)
Browse files### What problem does this PR solve?
Issue link:#265
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- rag/llm/chat_model.py +1 -0
rag/llm/chat_model.py
CHANGED
@@ -116,6 +116,7 @@ class ZhipuChat(Base):
|
|
116 |
if system:
|
117 |
history.insert(0, {"role": "system", "content": system})
|
118 |
try:
|
|
|
119 |
response = self.client.chat.completions.create(
|
120 |
model=self.model_name,
|
121 |
messages=history,
|
|
|
116 |
if system:
|
117 |
history.insert(0, {"role": "system", "content": system})
|
118 |
try:
|
119 |
+
if "presence_penalty" in gen_conf: del gen_conf["presence_penalty"]
|
120 |
response = self.client.chat.completions.create(
|
121 |
model=self.model_name,
|
122 |
messages=history,
|