Add top_k for create_chat and update_chat api (#4294)

### What problem does this PR solve?

Add top_k for create_chat and update_chat api #4157

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-12-30 19:22:57 +08:00
committed by GitHub
parent d42e78bce2
commit b52b0f68fc
5 changed files with 6 additions and 2 deletions

View File

@ -28,6 +28,7 @@ class Chat(Base):
self.similarity_threshold = 0.2
self.keywords_similarity_weight = 0.7
self.top_n = 8
self.top_k = 1024
self.variables = [{"key": "knowledge", "optional": True}]
self.rerank_model = None
self.empty_response = None