Parcourir la source

Fix: search citation issue. (#5657)

### What problem does this PR solve?
#5649
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.17.1
Kevin Hu il y a 8 mois
Parent
révision
ec68ab1c8c
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2
    1
      api/db/services/dialog_service.py

+ 2
- 1
api/db/services/dialog_service.py Voir le fichier



if answer.lower().find("invalid key") >= 0 or answer.lower().find("invalid api") >= 0: if answer.lower().find("invalid key") >= 0 or answer.lower().find("invalid api") >= 0:
answer += " Please set LLM API-Key in 'User Setting -> Model Providers -> API-Key'" answer += " Please set LLM API-Key in 'User Setting -> Model Providers -> API-Key'"
return {"answer": answer, "reference": chunks_format(refs)}
refs["chunks"] = chunks_format(refs)
return {"answer": answer, "reference": refs}


answer = "" answer = ""
for ans in chat_mdl.chat_streamly(prompt, msg, {"temperature": 0.1}): for ans in chat_mdl.chat_streamly(prompt, msg, {"temperature": 0.1}):

Chargement…
Annuler
Enregistrer