update blackbox chroma and chat

This commit is contained in:
ACBBZ
2024-05-28 08:23:10 +00:00
parent 347eea2f9c
commit ca34962376
4 changed files with 113 additions and 48 deletions

View File

@ -33,20 +33,20 @@ class ChromaChat(Blackbox):
# chroma_chat settings
# {
# "chroma_embedding_model": "bge-large-zh-v1.5",
# "chroma_embedding_model": "/model/Weight/BAAI/bge-large-zh-v1.5",
# "chroma_host": "10.6.82.192",
# "chroma_port": "8000",
# "chroma_collection_id": "123",
# "chroma_collection_id": "g2e",
# "chroma_n_results": 3,
# "model_name": "Qwen1.5-14B-Chat",
# "context": [],
# "template": "",
# "temperature": 0.8,
# "top_p": 0.8,
# "temperature": 0,
# "top_p": 0,
# "n": 1,
# "max_tokens": 1024,
# "frequency_penalty": 0.5,
# "presence_penalty": 0.8,
# "frequency_penalty": 0,
# "presence_penalty": 0,
# "stop": 100,
# "model_url": "http://120.196.116.194:48892/v1/chat/completions",
# "model_key": "YOUR_API_KEY"
@ -87,5 +87,4 @@ class ChromaChat(Blackbox):
setting: dict = data.get("settings")
return JSONResponse(
content={"response": self.processing(user_question, user_context, setting)},
status_code=status.HTTP_200_OK)
content={"response": self.processing(user_question, user_context, setting)}, status_code=status.HTTP_200_OK)