Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(chatMessages): Fix error on answering question #953

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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