Extract loading and closing bergamot into a helper script.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2023-12-27 23:30:16 -08:00
parent 7e8870de6c
commit d7d7254a7b
2 changed files with 41 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
<div id="{{ .Get "id" }}"></div>
<script>
runBergamot('{{ .Get "id" }}', '{{ .Get "prompt" }}', '{{ .Inner }}', renderRules, '{{ .Get "query" }}');
window.Bergamot.run(null, '{{ .Get "id" }}', '{{ .Get "prompt" }}', '{{ .Inner }}', renderRules, '{{ .Get "query" }}');
</script>