prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  "no match response" button present in qna maker dialog when active learning is disabled
  Python tracking issue for repo code-owners
  
  See original issue for details: microsoft/botframework-sdk#6146
  
  </issue>
  <code>
  [start of libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py]
  1 # Copyright (c) Microsoft Corporation. All rights reserved.
  2 # Licensed under the MIT License.
  3 
  4 from typing import List
  5 from botbuilder.core import CardFactory
  6 from botbuilder.schema import Activity, ActivityTypes, CardAction, HeroCard
  7 
  8 from ..models import QueryResult
  9 
  10 
  11 class QnACardBuilder:
  12     """
  13     Message activity card builder for QnAMaker dialogs.
  14     """
  15 
  16     @staticmethod
  17     def get_suggestions_card(
  18         suggestions: List[str], card_title: str, card_no_match: str
  19     ) -> Activity:
  20         """
  21         Get active learning suggestions card.
  22         """
  23 
  24         if not suggestions:
  25             raise TypeError("suggestions list is required")
  26 
  27         if not card_title:
  28             raise TypeError("card_title is required")
  29 
  30         if not card_no_match:
  31             raise TypeError("card_no_match is required")
  32 
  33         # Add all suggestions
  34         button_list = [
  35             CardAction(value=suggestion, type="imBack", title=suggestion)
  36             for suggestion in suggestions
  37         ]
  38 
  39         # Add No match text
  40         button_list.append(
  41             CardAction(value=card_no_match, type="imBack", title=card_no_match)
  42         )
  43 
  44         attachment = CardFactory.hero_card(HeroCard(buttons=button_list))
  45 
  46         return Activity(
  47             type=ActivityTypes.message, text=card_title, attachments=[attachment]
  48         )
  49 
  50     @staticmethod
  51     def get_qna_prompts_card(result: QueryResult, card_no_match_text: str) -> Activity:
  52         """
  53         Get active learning suggestions card.
  54         """
  55 
  56         if not result:
  57             raise TypeError("result is required")
  58 
  59         if not card_no_match_text:
  60             raise TypeError("card_no_match_text is required")
  61 
  62         # Add all prompts
  63         button_list = [
  64             CardAction(
  65                 value=prompt.display_text, type="imBack", title=prompt.display_text,
  66             )
  67             for prompt in result.context.prompts
  68         ]
  69 
  70         # Add No match text
  71         button_list.append(
  72             CardAction(
  73                 value=card_no_match_text, type="imBack", title=card_no_match_text,
  74             )
  75         )
  76 
  77         attachment = CardFactory.hero_card(HeroCard(buttons=button_list))
  78 
  79         return Activity(
  80             type=ActivityTypes.message, text=result.answer, attachments=[attachment]
  81         )
  82
  [end of libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py b/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py
  --- a/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py
  +++ b/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py
  @@ -67,13 +67,6 @@
               for prompt in result.context.prompts
           ]
   
  -        # Add No match text
  -        button_list.append(
  -            CardAction(
  -                value=card_no_match_text, type="imBack", title=card_no_match_text,
  -            )
  -        )
  -
           attachment = CardFactory.hero_card(HeroCard(buttons=button_list))
   
           return Activity(
  
verification_info: {"golden_diff": "diff --git a/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py b/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py\n--- a/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py\n+++ b/libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py\n@@ -67,13 +67,6 @@\n             for prompt in result.context.prompts\r\n         ]\r\n \r\n-        # Add No match text\r\n-        button_list.append(\r\n-            CardAction(\r\n-                value=card_no_match_text, type=\"imBack\", title=card_no_match_text,\r\n-            )\r\n-        )\r\n-\r\n         attachment = CardFactory.hero_card(HeroCard(buttons=button_list))\r\n \r\n         return Activity(\n", "issue": "\"no match response\" button present in qna maker dialog when active learning is disabled\nPython tracking issue for repo code-owners\r\n\r\nSee original issue for details: microsoft/botframework-sdk#6146\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\r\n# Licensed under the MIT License.\r\n\r\nfrom typing import List\r\nfrom botbuilder.core import CardFactory\r\nfrom botbuilder.schema import Activity, ActivityTypes, CardAction, HeroCard\r\n\r\nfrom ..models import QueryResult\r\n\r\n\r\nclass QnACardBuilder:\r\n    \"\"\"\r\n    Message activity card builder for QnAMaker dialogs.\r\n    \"\"\"\r\n\r\n    @staticmethod\r\n    def get_suggestions_card(\r\n        suggestions: List[str], card_title: str, card_no_match: str\r\n    ) -> Activity:\r\n        \"\"\"\r\n        Get active learning suggestions card.\r\n        \"\"\"\r\n\r\n        if not suggestions:\r\n            raise TypeError(\"suggestions list is required\")\r\n\r\n        if not card_title:\r\n            raise TypeError(\"card_title is required\")\r\n\r\n        if not card_no_match:\r\n            raise TypeError(\"card_no_match is required\")\r\n\r\n        # Add all suggestions\r\n        button_list = [\r\n            CardAction(value=suggestion, type=\"imBack\", title=suggestion)\r\n            for suggestion in suggestions\r\n        ]\r\n\r\n        # Add No match text\r\n        button_list.append(\r\n            CardAction(value=card_no_match, type=\"imBack\", title=card_no_match)\r\n        )\r\n\r\n        attachment = CardFactory.hero_card(HeroCard(buttons=button_list))\r\n\r\n        return Activity(\r\n            type=ActivityTypes.message, text=card_title, attachments=[attachment]\r\n        )\r\n\r\n    @staticmethod\r\n    def get_qna_prompts_card(result: QueryResult, card_no_match_text: str) -> Activity:\r\n        \"\"\"\r\n        Get active learning suggestions card.\r\n        \"\"\"\r\n\r\n        if not result:\r\n            raise TypeError(\"result is required\")\r\n\r\n        if not card_no_match_text:\r\n            raise TypeError(\"card_no_match_text is required\")\r\n\r\n        # Add all prompts\r\n        button_list = [\r\n            CardAction(\r\n                value=prompt.display_text, type=\"imBack\", title=prompt.display_text,\r\n            )\r\n            for prompt in result.context.prompts\r\n        ]\r\n\r\n        # Add No match text\r\n        button_list.append(\r\n            CardAction(\r\n                value=card_no_match_text, type=\"imBack\", title=card_no_match_text,\r\n            )\r\n        )\r\n\r\n        attachment = CardFactory.hero_card(HeroCard(buttons=button_list))\r\n\r\n        return Activity(\r\n            type=ActivityTypes.message, text=result.answer, attachments=[attachment]\r\n        )\r\n", "path": "libraries/botbuilder-ai/botbuilder/ai/qna/utils/qna_card_builder.py"}]}