mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-23 11:23:00 +03:00
chore(docker): increased number of replicas
This commit is contained in:
parent
3c11e03764
commit
15ba223f9c
@ -313,8 +313,6 @@ class KnowledgeBrainQA(BaseModel, QAInterface):
|
||||
|
||||
# Combine all response tokens to form the final assistant message
|
||||
assistant = "".join(response_tokens)
|
||||
logger.info("💋💋💋💋")
|
||||
logger.info(streamed_chat_history)
|
||||
|
||||
try:
|
||||
if save_answer:
|
||||
|
@ -246,7 +246,6 @@ class HeadlessQA(BaseModel, QAInterface):
|
||||
)
|
||||
|
||||
async for token in callback.aiter():
|
||||
logger.info("Token: %s", token)
|
||||
response_tokens.append(token)
|
||||
streamed_chat_history.assistant = token
|
||||
yield f"data: {json.dumps(streamed_chat_history.dict())}"
|
||||
|
@ -66,22 +66,14 @@ class BrainfulChat(ChatInterface):
|
||||
supabase_client, embeddings, table_name="vectors"
|
||||
)
|
||||
# Get the first question from the chat_question
|
||||
logger.info(f"Finding brain closest to {chat_question}")
|
||||
logger.info("🔥🔥🔥🔥🔥")
|
||||
|
||||
question = chat_question.question
|
||||
logger.info(f"Question is {question}")
|
||||
history = chat_service.get_chat_history(chat_id)
|
||||
if history:
|
||||
question = history[0].user_message
|
||||
logger.info(f"Question is {question}")
|
||||
brain_id_to_use = vector_store.find_brain_closest_query(question)
|
||||
logger.info(f"Found brain {brain_id_to_use}")
|
||||
logger.info("🧠🧠🧠")
|
||||
|
||||
brain = brain_service.get_brain_by_id(brain_id_to_use)
|
||||
logger.info(f"Brain type: {brain.brain_type}")
|
||||
logger.info(f"Id is {brain.brain_id}")
|
||||
logger.info(f"Type of brain_id is {type(brain.brain_id)}")
|
||||
if (
|
||||
brain
|
||||
and brain.brain_type == BrainType.DOC
|
||||
|
@ -43,9 +43,6 @@ class CustomSupabaseVectorStore(SupabaseVectorStore):
|
||||
).execute()
|
||||
|
||||
# Get the brain_id of the brain that is most similar to the query
|
||||
logger.info(f"Found {len(res.data)} brains")
|
||||
logger.info(res.data)
|
||||
logger.info("🔥🔥🔥🔥🔥")
|
||||
brain_id = res.data[0].get("id", None)
|
||||
if not brain_id:
|
||||
return None
|
||||
|
@ -23,7 +23,7 @@ services:
|
||||
- "--port"
|
||||
- "5050"
|
||||
- "--workers"
|
||||
- "2"
|
||||
- "6"
|
||||
restart: always
|
||||
|
||||
ports:
|
||||
|
@ -41,7 +41,7 @@ services:
|
||||
- "--port"
|
||||
- "5050"
|
||||
- "--workers"
|
||||
- "1"
|
||||
- "6"
|
||||
restart: always
|
||||
volumes:
|
||||
- ./backend/:/code/
|
||||
|
Loading…
Reference in New Issue
Block a user