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

mermaid display failed #13

Open
acwwt opened this issue Apr 25, 2024 · 5 comments
Open

mermaid display failed #13

acwwt opened this issue Apr 25, 2024 · 5 comments

Comments

@acwwt
Copy link

acwwt commented Apr 25, 2024

预览的时候正常
image
但是发布以后的文章显示报错,所有东西都是默认的没有改过
image

@xinkeng0
Copy link
Member

有文章链接吗?

@acwwt
Copy link
Author

acwwt commented Apr 26, 2024

@xinkeng0
Copy link
Member

看报错的话初步判断是存储的文本换行有点问题,flowchart LR subgraph Lagent tool LR和subgraph之间应有一个换行符号呢。

{
    "str": "Parse error on line 1:\nflowchart LR subgraph Lagent tool\n-------------^\nExpecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'AMP', 'ALPHA', 'COLON', 'START_LINK', 'LINK', 'DOWN', 'DEFAULT', 'NUM', 'COMMA', 'MINUS', 'BRKT', 'DOT', 'PUNCTUATION', 'UNICODE_TEXT', 'PLUS', 'EQUALS', 'MULT', 'UNDERSCORE', got 'subgraph'",
    "message": "Parse error on line 1:\nflowchart LR subgraph Lagent tool\n-------------^\nExpecting 'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'AMP', 'ALPHA', 'COLON', 'START_LINK', 'LINK', 'DOWN', 'DEFAULT', 'NUM', 'COMMA', 'MINUS', 'BRKT', 'DOT', 'PUNCTUATION', 'UNICODE_TEXT', 'PLUS', 'EQUALS', 'MULT', 'UNDERSCORE', got 'subgraph'",
    "hash": "Error",
    "error": {
        "hash": {
            "text": "subgraph",
            "token": "subgraph",
            "line": 0,
            "loc": {
                "first_line": 1,
                "last_line": 1,
                "first_column": 12,
                "last_column": 13
            },
            "expected": [
                "'SEMI'",
                "'NEWLINE'",
                "'SPACE'",
                "'EOF'",
                "'AMP'",
                "'ALPHA'",
                "'COLON'",
                "'START_LINK'",
                "'LINK'",
                "'DOWN'",
                "'DEFAULT'",
                "'NUM'",
                "'COMMA'",
                "'MINUS'",
                "'BRKT'",
                "'DOT'",
                "'PUNCTUATION'",
                "'UNICODE_TEXT'",
                "'PLUS'",
                "'EQUALS'",
                "'MULT'",
                "'UNDERSCORE'"
            ]
        }
    }
}

@acwwt
Copy link
Author

acwwt commented Apr 29, 2024

但是这里面是有换行符的,而且预览的时候并没有问题

flowchart LR
    subgraph Lagent
        tool[调用工具]
        subgraph AgentLego
            tool_support[工具功能支持]
        end
        tool_output(工具输出)
        tool --> tool_support --> tool_output
    end

    input(输入) --> LLM[大语言模型]
    LLM --> IF{是否需要调用工具}
    IF -->|否| output(一般输出)
    IF -->|是| tool
    tool_output -->|处理| agent_output(智能体输出)
Loading

我是这样写的,佬要不试一下

@xinkeng0
Copy link
Member

等我抽空会看看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants