Skip to content

Commit

Permalink
fix(chatMessages): Fix error on answering question (#953)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZongZiWang authored Aug 15, 2023
1 parent 37f132c commit 0700aea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/core/llm/qa_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def generate_answer(
**{
"chat_id": chat_id,
"user_message": question.question,
"assistant": "",
"assistant": answer,
"message_time": new_chat.message_time,
"prompt_title": prompt.title if prompt else None,
"brain_name": brain.name if brain else None,
Expand Down
2 changes: 1 addition & 1 deletion backend/core/repository/brain/get_brain_prompt_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

def get_brain_prompt_id(brain_id: UUID) -> UUID | None:
brain = get_brain_by_id(brain_id)
prompt_id = brain.brain_id if brain else None
prompt_id = brain.prompt_id if brain else None

return prompt_id
2 changes: 1 addition & 1 deletion backend/core/repository/brain/get_default_user_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def get_user_default_brain(user_id: UUID) -> BrainEntity | None:
supabase_db = get_supabase_db()
brain_id = supabase_db.get_default_user_brain_id(user_id)

logger.info("Default brain response:", brain_id)
logger.info(f"Default brain response: {brain_id}")

if brain_id is None:
return None
Expand Down

0 comments on commit 0700aea

Please sign in to comment.