Chat bug fix #40

Merged
Berack96 merged 3 commits from chat_bug_fix into main 2025-10-20 17:12:30 +02:00
Berack96 commented 2025-10-20 17:08:42 +02:00 (Migrated from github.com)

quickfix for regression caused by chat fixes

quickfix for regression caused by chat fixes
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-20 17:11:35 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR fixes a regression in the chat interface by correcting return type annotations and cleaning up commented-out code. The changes ensure proper type hints for Gradio interface methods that return tuple values.

Key Changes:

  • Removed obsolete commented-out code from gradio_respond method
  • Corrected return type annotations for gradio_load and gradio_clear methods

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview This PR fixes a regression in the chat interface by correcting return type annotations and cleaning up commented-out code. The changes ensure proper type hints for Gradio interface methods that return tuple values. **Key Changes:** - Removed obsolete commented-out code from `gradio_respond` method - Corrected return type annotations for `gradio_load` and `gradio_clear` methods --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/Berack96/upo-appAI/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-10-20 17:11:35 +02:00

The return type annotation is incorrect. The method returns [], [] which are empty lists of tuples (matching the history format), not lists of strings. The return type should be tuple[list[tuple[str, str]], list[tuple[str, str]]] to match the actual return value and be consistent with gradio_load.

    def gradio_clear(self) -> tuple[list[tuple[str, str]], list[tuple[str, str]]]:
The return type annotation is incorrect. The method returns `[], []` which are empty lists of tuples (matching the history format), not lists of strings. The return type should be `tuple[list[tuple[str, str]], list[tuple[str, str]]]` to match the actual return value and be consistent with `gradio_load`. ```suggestion def gradio_clear(self) -> tuple[list[tuple[str, str]], list[tuple[str, str]]]: ```
Sign in to join this conversation.