mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-22 13:52:21 +00:00
cool
This commit is contained in:
parent
46a368c29c
commit
ddd6090982
@ -1 +1 @@
|
||||
Subproject commit 593cb246715c4f7c7db189530c3db527e015f705
|
||||
Subproject commit 971b4e89cd40fba2f6d1f46e2d4428ae193bb10b
|
@ -106,7 +106,7 @@ def execute_graphviz(code, client:Client, message_id, build_file=False):
|
||||
tmp_file = root_folder/f"ai_code_{message_id}.html"
|
||||
with open(tmp_file,"w",encoding="utf8") as f:
|
||||
f.write(build_graphviz_output(code)["output"])
|
||||
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(tmp_file)}"
|
||||
link = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(tmp_file)}"
|
||||
execution_time = time.time() - start_time
|
||||
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
|
||||
return output_json
|
||||
|
@ -56,7 +56,7 @@ def execute_html(code, client:Client, message_id, build_file=False):
|
||||
tmp_file = root_folder/f"ai_code_{message_id}.html"
|
||||
with open(tmp_file,"w",encoding="utf8") as f:
|
||||
f.write(code)
|
||||
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(tmp_file)}"
|
||||
link = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(tmp_file)}"
|
||||
# Stop the timer.
|
||||
execution_time = time.time() - start_time
|
||||
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
|
||||
|
@ -75,7 +75,7 @@ def execute_javascript(code, client:Client, message_id, build_file=False):
|
||||
tmp_file = root_folder/f"ai_code_{message_id}.html"
|
||||
with open(tmp_file,"w",encoding="utf8") as f:
|
||||
f.write(build_javascript_output(code)["output"])
|
||||
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(tmp_file)}"
|
||||
link = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(tmp_file)}"
|
||||
execution_time = time.time() - start_time
|
||||
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
|
||||
return output_json
|
||||
|
@ -105,6 +105,6 @@ def execute_latex(code, client:Client, message_id):
|
||||
else:
|
||||
host = lollmsElfServer.config.host
|
||||
|
||||
url = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(pdf_file)}"
|
||||
url = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(pdf_file)}"
|
||||
output_json = {"output": f"Pdf file generated at: {pdf_file}\n<a href='{url}' target='_blank'>Click here to show</a>", "execution_time": execution_time}
|
||||
return output_json
|
||||
|
@ -139,7 +139,7 @@ def execute_mermaid(code, client:Client, message_id, build_file=False):
|
||||
tmp_file = root_folder/f"ai_code_{message_id}.html"
|
||||
with open(tmp_file,"w",encoding="utf8") as f:
|
||||
f.write(build_mermaid_output(code)["output"])
|
||||
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(tmp_file)}"
|
||||
link = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(tmp_file)}"
|
||||
# Stop the timer.
|
||||
execution_time = time.time() - start_time
|
||||
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
|
||||
|
@ -139,7 +139,7 @@ def execute_svg(code, client:Client, message_id, build_file=False):
|
||||
tmp_file = root_folder/f"ai_svg_{message_id}.svg"
|
||||
with open(tmp_file,"w",encoding="utf8") as f:
|
||||
f.write(code)
|
||||
link = f"{host}:{lollmsElfServer.config.port}/{discussion_path_to_url(tmp_file)}"
|
||||
link = f"{host}:{lollmsElfServer.config.port}{discussion_path_to_url(tmp_file)}"
|
||||
# Stop the timer.
|
||||
execution_time = time.time() - start_time
|
||||
output_json = {"output": f'<b>Page built successfully</b><br><a href="{link}" target="_blank">Press here to view the page</a>', "execution_time": execution_time}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 08e1f607cf439a509dc4742b5b32cacdbe2cff3e
|
||||
Subproject commit d036a6c69c35dbb1487857151a53a4c890a17a0d
|
Loading…
Reference in New Issue
Block a user