Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 开启Artifacts时,若回复中有多个代码块则显示异常 #5135

Open
naimehao opened this issue Dec 22, 2024 · 6 comments
Open
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@naimehao
Copy link

📦 部署环境

Official Preview

📌 软件版本

最新

💻 系统环境

macOS

🌐 浏览器

Chrome

🐛 问题描述

当回复中带有多个代码块时,显示异常
image

📷 复现步骤

  1. claude 3.5
  2. 选择Artifacts组件
  3. 提问:给出java中单例模式的多种实现,分别在多个代码块中展示
  4. 等待回复完毕,但回复框中的代码块显示异常,仍然在转圈。

🚦 期望结果

No response

📝 补充信息

题外话,总感觉这里面的Claude3.5笨笨的,我是之前账号被封了,才开了lobe,但总感觉不对劲,就淘宝上找了那种Claude镜像站,虽然有频次使用限制,但确实原汁原味,因为隐私原因无法提供原始问题给你们测试,不过我很负责任的说,原生的Claude如果有95分,那么lobe里面的应该只有85-89分。现在搞得我一个月得花300,两头都得开:( 可能和你们没关系,API就是这样吧

@naimehao naimehao added the 🐛 Bug Something isn't working | 缺陷 label Dec 22, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Dec 22, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Official Preview

📌 Software version

up to date

💻 System environment

macOS

🌐 Browser

Chrome

🐛 Problem description

Exception displayed when reply with multiple code blocks
image

📷 Steps to reproduce

1.claude 3.5
2. Select the Artifacts component
3. Question: Give multiple implementations of the singleton pattern in Java and display them in multiple code blocks.
4. Waiting for the reply to be completed, but the code block in the reply box displays abnormally and is still spinning.

🚦 Expected results

No response

📝 Supplementary information

Off topic, I always feel that Claude 3.5 here is stupid. I opened the lobe after my account was blocked before, but it always felt wrong, so I found the Claude mirror site on Taobao. Although there is a frequency limit, But it is indeed authentic. Due to privacy reasons, I cannot provide the original questions for you to test. However, I can responsibly say that if the original Claude has a score of 95, then the one in the lobe should only have a score of 85-89. Now I have to spend 300 a month, and I have to open both ends :( It may have nothing to do with you, the API is like this

@lobehubbot
Copy link
Member

👀 @naimehao

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

Copy link

dosubot bot commented Dec 22, 2024

@naimehao 你好!我是Dosu,一个可以帮你解决bug、回答问题并成为贡献者的机器人。我会在这里帮助你,等待人类维护者的到来。

I found a similar closed issue that might be relevant to your problem: [Bug] 回复样式问题. This issue was resolved by a pull request that fixed an error with chat stream output by pinning to ai@3.0.19 [1].

For your specific issue with multiple code blocks displaying abnormally, it might be related to how the ArtifactsUI component handles code block rendering. The component uses a Highlighter to render code blocks based on certain conditions, such as the artifact type and display mode [2]. If the issue persists, it might be worth checking if the conditions for displaying code blocks are being met correctly in your setup.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@naimehao naimehao changed the title [Bug] 回复中有多个代码块时显示异常 [Bug] 开启Artifacts时,若回复中有多个代码块则显示异常 Dec 22, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Dec 22, 2024

原生的Claude如果有95分,那么lobe里面的应该只有85-89分

可能的原因是上下文的限制,默认开启了8条上下文约束。超过8条以上的就遗忘了。你可以把这个限制拉大,但对应的token消耗就会加大,需要你自己权衡。个人建议可以多试试多开话题和分支对话。

image

另外图上展示的问题我收到了,后面会修复的~

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If the original Claude has a score of 95, then the one in the lobe should only have a score of 85-89

The possible reason is context restrictions. 8 context constraints are enabled by default. Anything with more than 8 entries will be forgotten. You can increase this limit, but the corresponding token consumption will increase, and you need to weigh it yourself. Personally, I suggest you try more topics and branch conversations.

image

In addition, I received the problem shown in the picture and will fix it later~

@naimehao
Copy link
Author

原生的Claude如果有95分,那么lobe里面的应该只有85-89分

可能的原因是上下文的限制,默认开启了8条上下文约束。超过8条以上的就遗忘了。你可以把这个限制拉大,但对应的token消耗就会加大,需要你自己权衡。个人建议可以多试试多开话题和分支对话。

image 另外图上展示的问题我收到了,后面会修复的~

谢谢。那个限制我一直是关闭的。然后催更无限分支~ :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants