From 6ed195f6d0da523f3dabd4a093da1678b27cc0b1 Mon Sep 17 00:00:00 2001 From: Dawood Date: Wed, 14 Jun 2023 13:10:27 -0400 Subject: [PATCH 1/9] katex --- gradio/components/chatbot.py | 8 ++++++++ js/app/src/components/Chatbot/Chatbot.svelte | 4 ++++ js/chatbot/src/ChatBot.svelte | 15 ++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index 7965aebc424d..55b48aad2012 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -38,6 +38,8 @@ def __init__( | Callable | None = None, color_map: dict[str, str] | None = None, # Parameter moved to Chatbot.style() + enable_latex: bool = True, + latex_delimiters: list[dict[str, str | bool]] | None = [{"left": "$$", "right": "$$", "display": True}], *, label: str | None = None, every: float | None = None, @@ -54,6 +56,8 @@ def __init__( """ Parameters: value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component. + enable_latex: If True, will render LaTeX expressions enclosed in $$ delimiters or custom delimiters passed in `latex_delimiters` parameter. True by default. + latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. By default this is set to `[{ left: "$$", right: "$$", display: true }]`, so LaTeX expressions enclosed in $$ delimiters will be rendered. label: component name in interface. every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. show_label: if True, will display label. @@ -76,6 +80,8 @@ def __init__( See EventData documentation on how to use this event data. """ self.height = height + self.enable_latex = enable_latex + self.latex_delimiters = latex_delimiters IOComponent.__init__( self, @@ -95,6 +101,8 @@ def __init__( def get_config(self): return { "value": self.value, + "enable_latex": self.enable_latex, + "latex_delimiters": self.latex_delimiters, "selectable": self.selectable, "height": self.height, **IOComponent.get_config(self), diff --git a/js/app/src/components/Chatbot/Chatbot.svelte b/js/app/src/components/Chatbot/Chatbot.svelte index 1a6d806ad175..c1e1dcc75b74 100644 --- a/js/app/src/components/Chatbot/Chatbot.svelte +++ b/js/app/src/components/Chatbot/Chatbot.svelte @@ -15,6 +15,8 @@ [string | FileData | null, string | FileData | null] > = []; let _value: Array<[string | FileData | null, string | FileData | null]>; + export let enable_latex: boolean = true; + export let latex_delimiters: Array<{left: string, right: string, display: boolean}> = [{ left: "$$", right: "$$", display: true }]; export let container: boolean = false; export let scale: number = 1; export let min_width: number | undefined = undefined; @@ -74,6 +76,8 @@ {selectable} {theme_mode} value={_value} + {enable_latex} + {latex_delimiters} pending_message={loading_status?.status === "pending"} on:change on:select diff --git a/js/chatbot/src/ChatBot.svelte b/js/chatbot/src/ChatBot.svelte index eeb5a92e763b..81ca9400d8b7 100644 --- a/js/chatbot/src/ChatBot.svelte +++ b/js/chatbot/src/ChatBot.svelte @@ -19,6 +19,8 @@ let old_value: Array< [string | FileData | null, string | FileData | null] > | null = null; + export let enable_latex: boolean = true; + export let latex_delimiters: Array<{left: string, right: string, display: boolean}> = [{ left: "$$", right: "$$", display: true }]; export let pending_message: boolean = false; export let feedback: Array | null = null; export let selectable: boolean = false; @@ -53,13 +55,12 @@ }); } - render_math_in_element(div, { - delimiters: [ - { left: "$$", right: "$$", display: true }, - { left: "$", right: "$", display: false } - ], - throwOnError: false - }); + if (enable_latex) { + render_math_in_element(div, { + delimiters: latex_delimiters, + throwOnError: false + }); + } }); $: { From beb125f5879f064ba475ec02bb2f44f33da4324b Mon Sep 17 00:00:00 2001 From: Dawood Date: Wed, 14 Jun 2023 16:22:33 -0400 Subject: [PATCH 2/9] changes --- CHANGELOG.md | 2 ++ gradio/components/chatbot.py | 6 +----- js/app/src/components/Chatbot/Chatbot.svelte | 4 +--- js/chatbot/src/ChatBot.svelte | 5 ++--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d527b101a4ae..2b3bcc4701e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ demo.launch() - Add `autoplay` kwarg to `Video` and `Audio` components by [@pngwn](https://github.com/pngwn) in [PR 4453](https://github.com/gradio-app/gradio/pull/4453) - Add `allow_preview` parameter to `Gallery` to control whether a detailed preview is displayed on click by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4470](https://github.com/gradio-app/gradio/pull/4470) +- Add `latex_delimiters` parameter to `Chatbot` to control the delimiters used for LaTeX and to disable LaTeX in the `Chatbot` by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4516](https://github.com/gradio-app/gradio/pull/4516) ## Bug Fixes: @@ -48,6 +49,7 @@ demo.launch() - The behavior of the `Clear` button has been changed for `Slider`, `CheckboxGroup`, `Radio`, `Dropdown` components by [@abidlabs](https://github.com/abidlabs) in [PR 4456](https://github.com/gradio-app/gradio/pull/4456). The Clear button now sets the value of these components to be empty as opposed to the original default set by the developer. This is to make them in line with the rest of the Gradio components. - Python 3.7 end of life is June 27 2023. Gradio will no longer support python 3.7 by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4484](https://github.com/gradio-app/gradio/pull/4484) +- Removed `$` as a default LaTeX delimiter for the `Chatbot` by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4516](https://github.com/gradio-app/gradio/pull/4516) # 3.34.0 diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index 55b48aad2012..9abef6e1a855 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -38,7 +38,6 @@ def __init__( | Callable | None = None, color_map: dict[str, str] | None = None, # Parameter moved to Chatbot.style() - enable_latex: bool = True, latex_delimiters: list[dict[str, str | bool]] | None = [{"left": "$$", "right": "$$", "display": True}], *, label: str | None = None, @@ -56,8 +55,7 @@ def __init__( """ Parameters: value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component. - enable_latex: If True, will render LaTeX expressions enclosed in $$ delimiters or custom delimiters passed in `latex_delimiters` parameter. True by default. - latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. By default this is set to `[{ left: "$$", right: "$$", display: true }]`, so LaTeX expressions enclosed in $$ delimiters will be rendered. + latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. Display set to `False` means LaTeX will be rendered inline. By default `latex_delimiters` is set to `[{ left: "$$", right: "$$", display: true }]`, so LaTeX expressions enclosed in $$ delimiters will be rendered. Pass in `None` or an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). label: component name in interface. every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. show_label: if True, will display label. @@ -80,7 +78,6 @@ def __init__( See EventData documentation on how to use this event data. """ self.height = height - self.enable_latex = enable_latex self.latex_delimiters = latex_delimiters IOComponent.__init__( @@ -101,7 +98,6 @@ def __init__( def get_config(self): return { "value": self.value, - "enable_latex": self.enable_latex, "latex_delimiters": self.latex_delimiters, "selectable": self.selectable, "height": self.height, diff --git a/js/app/src/components/Chatbot/Chatbot.svelte b/js/app/src/components/Chatbot/Chatbot.svelte index c1e1dcc75b74..85294ad1bc37 100644 --- a/js/app/src/components/Chatbot/Chatbot.svelte +++ b/js/app/src/components/Chatbot/Chatbot.svelte @@ -15,8 +15,7 @@ [string | FileData | null, string | FileData | null] > = []; let _value: Array<[string | FileData | null, string | FileData | null]>; - export let enable_latex: boolean = true; - export let latex_delimiters: Array<{left: string, right: string, display: boolean}> = [{ left: "$$", right: "$$", display: true }]; + export let latex_delimiters: Array<{left: string, right: string, display: boolean}> | null = [{ left: "$$", right: "$$", display: true }]; export let container: boolean = false; export let scale: number = 1; export let min_width: number | undefined = undefined; @@ -76,7 +75,6 @@ {selectable} {theme_mode} value={_value} - {enable_latex} {latex_delimiters} pending_message={loading_status?.status === "pending"} on:change diff --git a/js/chatbot/src/ChatBot.svelte b/js/chatbot/src/ChatBot.svelte index 421c86a8b4b0..fbddd54c41e5 100644 --- a/js/chatbot/src/ChatBot.svelte +++ b/js/chatbot/src/ChatBot.svelte @@ -19,8 +19,7 @@ let old_value: Array< [string | FileData | null, string | FileData | null] > | null = null; - export let enable_latex: boolean = true; - export let latex_delimiters: Array<{left: string, right: string, display: boolean}> = [{ left: "$$", right: "$$", display: true }]; + export let latex_delimiters: Array<{left: string, right: string, display: boolean}> | null = [{ left: "$$", right: "$$", display: true }]; export let pending_message: boolean = false; export let feedback: Array | null = null; export let selectable: boolean = false; @@ -55,7 +54,7 @@ }); } - if (enable_latex) { + if (latex_delimiters !== null && latex_delimiters.length > 0) { render_math_in_element(div, { delimiters: latex_delimiters, throwOnError: false From 810e89c2ba3e127bde7ee3a11279bc977a954838 Mon Sep 17 00:00:00 2001 From: Dawood Date: Wed, 14 Jun 2023 16:35:34 -0400 Subject: [PATCH 3/9] format --- gradio/components/chatbot.py | 3 ++- js/app/src/components/Chatbot/Chatbot.svelte | 6 +++++- js/chatbot/src/ChatBot.svelte | 6 +++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index 9abef6e1a855..3414f52984d5 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -38,7 +38,8 @@ def __init__( | Callable | None = None, color_map: dict[str, str] | None = None, # Parameter moved to Chatbot.style() - latex_delimiters: list[dict[str, str | bool]] | None = [{"left": "$$", "right": "$$", "display": True}], + latex_delimiters: list[dict[str, str | bool]] + | None = [{"left": "$$", "right": "$$", "display": True}], *, label: str | None = None, every: float | None = None, diff --git a/js/app/src/components/Chatbot/Chatbot.svelte b/js/app/src/components/Chatbot/Chatbot.svelte index 85294ad1bc37..1b5a156936c4 100644 --- a/js/app/src/components/Chatbot/Chatbot.svelte +++ b/js/app/src/components/Chatbot/Chatbot.svelte @@ -15,7 +15,11 @@ [string | FileData | null, string | FileData | null] > = []; let _value: Array<[string | FileData | null, string | FileData | null]>; - export let latex_delimiters: Array<{left: string, right: string, display: boolean}> | null = [{ left: "$$", right: "$$", display: true }]; + export let latex_delimiters: Array<{ + left: string; + right: string; + display: boolean; + }> | null = [{ left: "$$", right: "$$", display: true }]; export let container: boolean = false; export let scale: number = 1; export let min_width: number | undefined = undefined; diff --git a/js/chatbot/src/ChatBot.svelte b/js/chatbot/src/ChatBot.svelte index fbddd54c41e5..c0a370322288 100644 --- a/js/chatbot/src/ChatBot.svelte +++ b/js/chatbot/src/ChatBot.svelte @@ -19,7 +19,11 @@ let old_value: Array< [string | FileData | null, string | FileData | null] > | null = null; - export let latex_delimiters: Array<{left: string, right: string, display: boolean}> | null = [{ left: "$$", right: "$$", display: true }]; + export let latex_delimiters: Array<{ + left: string; + right: string; + display: boolean; + }> | null = [{ left: "$$", right: "$$", display: true }]; export let pending_message: boolean = false; export let feedback: Array | null = null; export let selectable: boolean = false; From a03d6919c57c5a6e8ee46379e3cb332013b761c2 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 15 Jun 2023 06:38:35 -0500 Subject: [PATCH 4/9] fix test --- test/test_components.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_components.py b/test/test_components.py index 74853d43ee3b..f9a7978c5cdf 100644 --- a/test/test_components.py +++ b/test/test_components.py @@ -1922,6 +1922,7 @@ def test_component_functions(self): "height": None, "root_url": None, "selectable": False, + 'latex_delimiters': [{'display': True, 'left': '$$', 'right': '$$'}] } From 385fb2b3ae0b3f24c0a3884975e236168f5ade33 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 15 Jun 2023 06:46:53 -0500 Subject: [PATCH 5/9] remove None --- gradio/components/chatbot.py | 9 +++++---- js/app/src/components/Chatbot/Chatbot.svelte | 2 +- js/chatbot/src/ChatBot.svelte | 4 ++-- test/test_components.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index 3414f52984d5..fc16a26220ac 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -37,9 +37,7 @@ def __init__( value: list[list[str | tuple[str] | tuple[str, str] | None]] | Callable | None = None, - color_map: dict[str, str] | None = None, # Parameter moved to Chatbot.style() - latex_delimiters: list[dict[str, str | bool]] - | None = [{"left": "$$", "right": "$$", "display": True}], + color_map: dict[str, str] | None = None, *, label: str | None = None, every: float | None = None, @@ -51,12 +49,12 @@ def __init__( elem_id: str | None = None, elem_classes: list[str] | str | None = None, height: int | None = None, + latex_delimiters: list[dict[str, str | bool]] | None = None, **kwargs, ): """ Parameters: value: Default value to show in chatbot. If callable, the function will be called whenever the app loads to set the initial value of the component. - latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. Display set to `False` means LaTeX will be rendered inline. By default `latex_delimiters` is set to `[{ left: "$$", right: "$$", display: true }]`, so LaTeX expressions enclosed in $$ delimiters will be rendered. Pass in `None` or an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). label: component name in interface. every: If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. Queue must be enabled. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute. show_label: if True, will display label. @@ -67,6 +65,7 @@ def __init__( elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles. height: height of the component in pixels. + latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. Display set to `False` means LaTeX will be rendered inline. If not provided, `latex_delimiters` is set to `[{ left: "$$", right: "$$", display: true }]`, so only LaTeX expressions enclosed in $$ delimiters will be rendered. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). """ if color_map is not None: warnings.warn( @@ -79,6 +78,8 @@ def __init__( See EventData documentation on how to use this event data. """ self.height = height + if latex_delimiters is None: + latex_delimiters = [{"left": "$$", "right": "$$", "display": True}] self.latex_delimiters = latex_delimiters IOComponent.__init__( diff --git a/js/app/src/components/Chatbot/Chatbot.svelte b/js/app/src/components/Chatbot/Chatbot.svelte index 1b5a156936c4..91976846c4bd 100644 --- a/js/app/src/components/Chatbot/Chatbot.svelte +++ b/js/app/src/components/Chatbot/Chatbot.svelte @@ -19,7 +19,7 @@ left: string; right: string; display: boolean; - }> | null = [{ left: "$$", right: "$$", display: true }]; + }> = [{ left: "$$", right: "$$", display: true }]; export let container: boolean = false; export let scale: number = 1; export let min_width: number | undefined = undefined; diff --git a/js/chatbot/src/ChatBot.svelte b/js/chatbot/src/ChatBot.svelte index c0a370322288..a21b3bc449c7 100644 --- a/js/chatbot/src/ChatBot.svelte +++ b/js/chatbot/src/ChatBot.svelte @@ -23,7 +23,7 @@ left: string; right: string; display: boolean; - }> | null = [{ left: "$$", right: "$$", display: true }]; + }> = [{ left: "$$", right: "$$", display: true }]; export let pending_message: boolean = false; export let feedback: Array | null = null; export let selectable: boolean = false; @@ -58,7 +58,7 @@ }); } - if (latex_delimiters !== null && latex_delimiters.length > 0) { + if (latex_delimiters.length > 0) { render_math_in_element(div, { delimiters: latex_delimiters, throwOnError: false diff --git a/test/test_components.py b/test/test_components.py index f9a7978c5cdf..9f5b2d212ccf 100644 --- a/test/test_components.py +++ b/test/test_components.py @@ -1922,7 +1922,7 @@ def test_component_functions(self): "height": None, "root_url": None, "selectable": False, - 'latex_delimiters': [{'display': True, 'left': '$$', 'right': '$$'}] + "latex_delimiters": [{"display": True, "left": "$$", "right": "$$"}], } From a03bc913ada838e0eaecb959fb79a5fe83500b7e Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 15 Jun 2023 06:48:10 -0500 Subject: [PATCH 6/9] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c475c24e589..f06404ad96f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,7 +49,7 @@ demo.launch() - The behavior of the `Clear` button has been changed for `Slider`, `CheckboxGroup`, `Radio`, `Dropdown` components by [@abidlabs](https://github.com/abidlabs) in [PR 4456](https://github.com/gradio-app/gradio/pull/4456). The Clear button now sets the value of these components to be empty as opposed to the original default set by the developer. This is to make them in line with the rest of the Gradio components. - Python 3.7 end of life is June 27 2023. Gradio will no longer support python 3.7 by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4484](https://github.com/gradio-app/gradio/pull/4484) -- Removed `$` as a default LaTeX delimiter for the `Chatbot` by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4516](https://github.com/gradio-app/gradio/pull/4516) +- Removed `$` as a default LaTeX delimiter for the `Chatbot` by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4516](https://github.com/gradio-app/gradio/pull/4516). The specific LaTeX delimeters can be set using the new `latex_delimiters` parameter in `Chatbot`. # 3.34.0 From 96430744b27eb3bbe8af55c5e75b242fd8fd1200 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 15 Jun 2023 06:52:51 -0500 Subject: [PATCH 7/9] Update gradio/components/chatbot.py --- gradio/components/chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index fc16a26220ac..75ad7dd12c79 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -65,7 +65,7 @@ def __init__( elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles. height: height of the component in pixels. - latex_delimiters: A list of dicts of the form {open_delimiter, close_delimiter, display} that will be used to render LaTeX expressions. Display set to `False` means LaTeX will be rendered inline. If not provided, `latex_delimiters` is set to `[{ left: "$$", right: "$$", display: true }]`, so only LaTeX expressions enclosed in $$ delimiters will be rendered. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). + latex_delimiters: A list of dicts of the form {"left": open_delimiter, "right": close_delimiter, "display": display_in_newline} that will be used to render LaTeX expressions. Setting "display" to `False` means LaTeX will be rendered inline instead of in a newline. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only LaTeX expressions enclosed in $$ delimiters will be rendered, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). """ if color_map is not None: warnings.warn( From 1f98cb932a68e49bd209387f893e49d948a596ba Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Thu, 15 Jun 2023 06:54:13 -0500 Subject: [PATCH 8/9] Update gradio/components/chatbot.py --- gradio/components/chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradio/components/chatbot.py b/gradio/components/chatbot.py index 75ad7dd12c79..c41c70c8cd8d 100644 --- a/gradio/components/chatbot.py +++ b/gradio/components/chatbot.py @@ -65,7 +65,7 @@ def __init__( elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles. elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles. height: height of the component in pixels. - latex_delimiters: A list of dicts of the form {"left": open_delimiter, "right": close_delimiter, "display": display_in_newline} that will be used to render LaTeX expressions. Setting "display" to `False` means LaTeX will be rendered inline instead of in a newline. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only LaTeX expressions enclosed in $$ delimiters will be rendered, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). + latex_delimiters: A list of dicts of the form {"left": open delimiter (str), "right": close delimiter (str), "display": whether to display in newline (bool)} that will be used to render LaTeX expressions. If not provided, `latex_delimiters` is set to `[{ "left": "$$", "right": "$$", "display": True }]`, so only expressions enclosed in $$ delimiters will be rendered as LaTeX, and in a new line. Pass in an empty list to disable LaTeX rendering. For more information, see the [KaTeX documentation](https://katex.org/docs/autorender.html). """ if color_map is not None: warnings.warn( From 59fe55d8c68996b6440611822a56476cdeb3a07e Mon Sep 17 00:00:00 2001 From: pngwn Date: Thu, 15 Jun 2023 14:02:45 +0100 Subject: [PATCH 9/9] tweak --- js/app/src/components/Chatbot/Chatbot.svelte | 2 +- js/chatbot/src/ChatBot.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/app/src/components/Chatbot/Chatbot.svelte b/js/app/src/components/Chatbot/Chatbot.svelte index 91976846c4bd..594a3ce5e986 100644 --- a/js/app/src/components/Chatbot/Chatbot.svelte +++ b/js/app/src/components/Chatbot/Chatbot.svelte @@ -19,7 +19,7 @@ left: string; right: string; display: boolean; - }> = [{ left: "$$", right: "$$", display: true }]; + }>; export let container: boolean = false; export let scale: number = 1; export let min_width: number | undefined = undefined; diff --git a/js/chatbot/src/ChatBot.svelte b/js/chatbot/src/ChatBot.svelte index a21b3bc449c7..b5e941dbdf46 100644 --- a/js/chatbot/src/ChatBot.svelte +++ b/js/chatbot/src/ChatBot.svelte @@ -23,7 +23,7 @@ left: string; right: string; display: boolean; - }> = [{ left: "$$", right: "$$", display: true }]; + }>; export let pending_message: boolean = false; export let feedback: Array | null = null; export let selectable: boolean = false;