Kevin Hu
commited on
Commit
·
43cb979
1
Parent(s):
44bea96
Add query parts to lamp (#2736)
Browse files### What problem does this PR solve?
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
api/db/services/dialog_service.py
CHANGED
@@ -189,6 +189,7 @@ def chat(dialog, messages, stream=True, **kwargs):
|
|
189 |
used_token_count, msg = message_fit_in(msg, int(max_tokens * 0.97))
|
190 |
assert len(msg) >= 2, f"message_fit_in has bug: {msg}"
|
191 |
prompt = msg[0]["content"]
|
|
|
192 |
|
193 |
if "max_tokens" in gen_conf:
|
194 |
gen_conf["max_tokens"] = min(
|
|
|
189 |
used_token_count, msg = message_fit_in(msg, int(max_tokens * 0.97))
|
190 |
assert len(msg) >= 2, f"message_fit_in has bug: {msg}"
|
191 |
prompt = msg[0]["content"]
|
192 |
+
prompt += "\n\n### Query:\n%s" % " ".join(questions)
|
193 |
|
194 |
if "max_tokens" in gen_conf:
|
195 |
gen_conf["max_tokens"] = min(
|