From f659b0735271bb6293c2b0fe512a71392a1d7753 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Tue, 8 Oct 2024 12:53:04 +0800 Subject: [PATCH] Add query parts to lamp (#2736) ### What problem does this PR solve? ### Type of change - [x] New Feature (non-breaking change which adds functionality) --- api/db/services/dialog_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/db/services/dialog_service.py b/api/db/services/dialog_service.py index 2944e5faa13..e2f513aa080 100644 --- a/api/db/services/dialog_service.py +++ b/api/db/services/dialog_service.py @@ -189,6 +189,7 @@ def chat(dialog, messages, stream=True, **kwargs): used_token_count, msg = message_fit_in(msg, int(max_tokens * 0.97)) assert len(msg) >= 2, f"message_fit_in has bug: {msg}" prompt = msg[0]["content"] + prompt += "\n\n### Query:\n%s" % " ".join(questions) if "max_tokens" in gen_conf: gen_conf["max_tokens"] = min(