bclswl0827 / ChatGemini

✨ ChatGemini 是一个基于 Google Gemini 的网页客户端,对标 ChatGPT 3.5,操作逻辑同 ChatGPT 3.5 一致,同时支持在聊天中上传图片,应用会自动调用 Gemini-Pro-Vision 模型进行识图。
http://ibcl.us/ChatGemini/
MIT License
904 stars 247 forks source link

When the content generated contains HTML that triggers errors. #18

Open ZoneTwelve opened 5 months ago

ZoneTwelve commented 5 months ago

When the AI outputs HTML without unquote, it can cause issues with rendering.

For example:

以下是依據您所提供的要求所編寫的使用者對談記錄顯示網頁之HTML、JavaScript及CSS程式碼。請注意,此範例只包含基本結構和功能,若您需要更複雜的設計或額外的功能,可再行修改。

HTML(index.html):
<!DOCTYPE html>
<html lang="en">
<head>
    <meta

Afterwards, the interface displays an error page.

I only modified GetAiChat.tsx to bridge the local LLM API.

Uncaught runtime errors:

ERROR

Failed to execute 'createElement' on 'Document': The tag name provided ('head<div') is not a valid name.
    at createElement (https://development.zonetwelve.io/static/js/bundle.js:40301:38)
    at createInstance (https://development.zonetwelve.io/static/js/bundle.js:41290:24)
    at completeWork (https://development.zonetwelve.io/static/js/bundle.js:50905:32)
    at completeUnitOfWork (https://development.zonetwelve.io/static/js/bundle.js:54664:20)
    at performUnitOfWork (https://development.zonetwelve.io/static/js/bundle.js:54640:9)
    at workLoopSync (https://development.zonetwelve.io/static/js/bundle.js:54554:9)
    at renderRootSync (https://development.zonetwelve.io/static/js/bundle.js:54527:11)
    at recoverFromConcurrentError (https://development.zonetwelve.io/static/js/bundle.js:54019:24)
    at performConcurrentWorkOnRoot (https://development.zonetwelve.io/static/js/bundle.js:53932:26)
    at workLoop (https://development.zonetwelve.io/static/js/bundle.js:71275:38)

If you need the entire output, here's the link: https://gist.github.com/ZoneTwelve/42714f7bdf171b920b742890fadc8ffa.

bclswl0827 commented 5 months ago

Can you provide a screenshot showing the error, and your prompts?