Bugfix: Only answer
This commit is contained in:
parent
9b3a48401f
commit
f1365c378e
14
app.py
14
app.py
|
@ -159,20 +159,20 @@ def FinderDb(query,dbs,filtred=False):
|
|||
|
||||
|
||||
def QARequest(message, history):
|
||||
text="""Hola este chatbot esta en un periodo de prueba, si encuentras alguna falla Notificala y muchas gracias por usarlo.
|
||||
Respecto a tu pregunta la respuesta es: """
|
||||
text=""
|
||||
|
||||
query = message
|
||||
context,d=FinderDb(query,db,filtred=True)
|
||||
prompt=prompt_template.format(
|
||||
user_query=query,
|
||||
relevant_context=context
|
||||
)
|
||||
print("#############",prompt,"#############",)
|
||||
#print("#############",prompt,"#############",)
|
||||
text2=""
|
||||
for i in text:
|
||||
time.sleep(0.7)
|
||||
text2=text2+i
|
||||
yield text2
|
||||
# for i in text:
|
||||
# time.sleep(0.7)
|
||||
# text2=text2+i
|
||||
# yield text2
|
||||
for i in llm.generate(prompt, max_tokens=200, streaming=True,temp=0.01, top_k=40, top_p=0.4):
|
||||
time.sleep(0.7)
|
||||
text2=text2+i
|
||||
|
|
Loading…
Reference in New Issue