This commit is contained in:
ACBBZ
2024-05-14 08:14:05 +00:00
committed by superobk
parent 2bcb9d990f
commit 7f59147768
5 changed files with 38 additions and 27 deletions

View File

@ -33,13 +33,11 @@ class ChromaChat(Blackbox):
collection_id = DEFAULT_COLLECTION_ID
else:
collection_id = setting.ChromaSetting.collection_ids[0]
print("collection_id: ",collection_id)
# query it
chroma_result = self.chroma_query(question, collection_id)
print("chroma_result: ",type(chroma_result),chroma_result)
fast_question = "问题: "+ question + "。根据问题,总结以下内容和来源:" + chroma_result
response = self.fastchat(model_name="Qwen1.5-14B-Chat", prompt=fast_question, template='回答限制50字', context=None)
response = self.fastchat(model_name="Qwen1.5-14B-Chat", prompt=fast_question, template='回答限制50字.', context=None, temperature=0.8, top_p=0.8, top_k=-1, n=1, max_tokens=1024)
return response