瀏覽代碼

Add query parts to lamp (#2736)

### What problem does this PR solve?


### Type of change

- [x] New Feature (non-breaking change which adds functionality)
tags/v0.13.0
Kevin Hu 1 年之前
父節點
當前提交
b3b54680e7
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. 1
    0
      api/db/services/dialog_service.py

+ 1
- 0
api/db/services/dialog_service.py 查看文件

used_token_count, msg = message_fit_in(msg, int(max_tokens * 0.97)) used_token_count, msg = message_fit_in(msg, int(max_tokens * 0.97))
assert len(msg) >= 2, f"message_fit_in has bug: {msg}" assert len(msg) >= 2, f"message_fit_in has bug: {msg}"
prompt = msg[0]["content"] prompt = msg[0]["content"]
prompt += "\n\n### Query:\n%s" % " ".join(questions)


if "max_tokens" in gen_conf: if "max_tokens" in gen_conf:
gen_conf["max_tokens"] = min( gen_conf["max_tokens"] = min(

Loading…
取消
儲存