Skip to content

Commit

Permalink
Resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
moria97 committed Sep 6, 2024
1 parent d7b22ff commit dda3ed6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pai_rag/app/web/tabs/chat_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def respond(input_elements: List[Any]):
chatbot = update_dict["chatbot"]
is_streaming = update_dict["is_streaming"]

if chatbot is not None:
chatbot.append((msg, ""))

try:
if query_type == "LLM":
response_gen = rag_client.query_llm(
Expand All @@ -69,6 +72,8 @@ def respond(input_elements: List[Any]):
raise gr.Error(f"HTTP {api_error.code} Error: {api_error.msg}")
except Exception as e:
raise gr.Error(f"Error: {e}")
finally:
yield chatbot


def create_chat_tab() -> Dict[str, Any]:
Expand Down

0 comments on commit dda3ed6

Please sign in to comment.