AttributeError: 'Markdown' object has no attribute 'content'
Traceback:
File "D:\Anaconda3\envs\py310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 541, in _run_script
exec(code, module.dict)
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui.py", line 66, in
pages[selected_page]"func"
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 145, in dialogue_page
history = get_messages_history(history_len)
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 36, in get_messages_history
return chat_box.filter_history(history_len=history_len, filter=filter)
File "D:\Anaconda3\envs\py310\lib\site-packages\streamlit_chatbox\messages.py", line 120, in filter_history
filtered = filter(msg)
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 29, in filter
content = [x.content for x in content]
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 29, in
content = [x.content for x in content]
**问题描述 webui页面每次发送第二个问题 报错以下问题
AttributeError: 'Markdown' object has no attribute 'content' Traceback: File "D:\Anaconda3\envs\py310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 541, in _run_script exec(code, module.dict) File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui.py", line 66, in
pages[selected_page]"func"
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 145, in dialogue_page
history = get_messages_history(history_len)
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 36, in get_messages_history
return chat_box.filter_history(history_len=history_len, filter=filter)
File "D:\Anaconda3\envs\py310\lib\site-packages\streamlit_chatbox\messages.py", line 120, in filter_history
filtered = filter(msg)
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 29, in filter
content = [x.content for x in content]
File "D:\mypyfiles\llm_code\Langchain-Chatchat-new\webui_pages\dialogue\dialogue.py", line 29, in
content = [x.content for x in content]
accelerate 0.21.0 aiohttp 3.8.4 aiosignal 1.3.1 altair 5.1.1 antlr4-python3-runtime 4.9.3 anyio 3.7.1 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-lru 2.0.2 async-timeout 4.0.2 attrs 23.1.0 Babel 2.12.1 backcall 0.2.0 backoff 2.2.1 backports.functools-lru-cache 1.6.4 beautifulsoup4 4.12.2 bleach 6.0.0 blinker 1.6.2 blis 0.7.11 Bottleneck 1.3.5 cachetools 5.3.1 catalogue 2.0.9 certifi 2023.5.7 cffi 1.15.1 chardet 5.1.0 charset-normalizer 3.1.0 click 8.1.3 colorama 0.4.6 coloredlogs 15.0.1 commonmark 0.9.1 confection 0.1.3 contourpy 1.0.7 controlnet-aux 0.0.6 cryptography 41.0.1 cycler 0.11.0 cymem 2.0.8 dashscope 1.11.0 dataclasses 0.6 dataclasses-json 0.5.7 debugpy 1.5.1 decorator 5.1.1 defusedxml 0.7.1 Deprecated 1.2.14 diffusers 0.18.2 dnspython 2.4.2 EbookLib 0.18 effdet 0.4.1 einops 0.6.1 email-validator 2.0.0.post2 emoji 2.8.0 entrypoints 0.4 environs 9.5.0 et-xmlfile 1.1.0 exceptiongroup 1.1.1 executing 1.2.0 faiss-cpu 1.7.4 fastapi 0.103.2 fastjsonschema 2.17.1 filelock 3.12.0 filetype 1.2.0 Flask 2.2.5 flatbuffers 23.5.26 flit_core 3.9.0 fonttools 4.39.4 fqdn 1.5.1 frozenlist 1.3.3 fschat 0.2.29 fsspec 2023.5.0 gensim 4.3.1 gitdb 4.0.10 GitPython 3.1.37 greenlet 2.0.2 grpcio 1.47.5 grpcio-tools 1.47.5 h11 0.14.0 httpcore 0.16.3 httpx 0.24.1 huggingface-hub 0.17.2 humanfriendly 10.0 idna 3.4 imageio 2.31.1 importlib-metadata 6.6.0 importlib-resources 5.12.0 iniconfig 2.0.0 iopath 0.1.10 ipykernel 6.15.0 ipython 8.14.0 ipython-genutils 0.2.0 ipywidgets 8.0.6 isoduration 20.11.0 itsdangerous 2.1.2 jedi 0.18.2 Jinja2 3.1.2 joblib 1.2.0 json5 0.9.5 jsonpointer 2.3 jsonschema 4.17.3 jupyter 1.0.0 jupyter_client 8.2.0 jupyter-console 6.6.3 jupyter-contrib-core 0.4.2 jupyter-contrib-nbextensions 0.7.0 jupyter_core 5.3.0 jupyter-events 0.6.3 jupyter-highlight-selected-word 0.2.0 jupyter-lsp 2.2.0 jupyter-nbextensions-configurator 0.6.3 jupyter_server 2.6.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.1 jupyterlab-pygments 0.2.2 jupyterlab_server 2.22.1 jupyterlab-widgets 3.0.7 kiwisolver 1.4.4 langchain 0.0.287 langcodes 3.3.0 langsmith 0.0.40 layoutparser 0.3.4 lazy_loader 0.3 lxml 4.9.2 Markdown 3.4.3 markdown2 2.4.10 MarkupSafe 2.1.1 marshmallow 3.19.0 marshmallow-enum 1.5.1 matplotlib 3.7.1 matplotlib-inline 0.1.6 mistune 2.0.5 mkl-service 2.4.0 mmh3 3.0.0 monotonic 1.6 mpmath 1.3.0 msg-parser 1.2.0 multidict 6.0.4 murmurhash 1.0.10 mypy-extensions 1.0.0 nbclassic 1.0.0 nbclient 0.8.0 nbconvert 7.4.0 nbformat 5.9.0 nest-asyncio 1.5.6 networkx 3.1 nh3 0.2.14 nltk 3.8.1 notebook 6.5.4 notebook_shim 0.2.3 numexpr 2.8.4 numpy 1.24.4 olefile 0.46 omegaconf 2.3.0 onnxruntime 1.15.1 openai 0.28.0 openapi-schema-pydantic 1.2.4 opencv-contrib-python 4.8.0.74 opencv-python 4.8.0.74 openpyxl 3.0.9 overrides 7.3.1 packaging 23.1 pandas 2.0.3 pandas-stubs 2.0.1.230501 pandocfilters 1.5.0 parso 0.8.3 pathlib 1.0.1 pathy 0.10.2 pdf2image 1.16.3 pdfminer.six 20221105 pdfplumber 0.9.0 peft 0.5.0 pgvector 0.2.2 pickleshare 0.7.5 Pillow 9.5.0 pip 23.0.1 pkgutil_resolve_name 1.3.10 platformdirs 3.5.1 plotly 5.14.1 pluggy 1.3.0 portalocker 2.7.0 preshed 3.0.9 prometheus-client 0.17.0 prompt-toolkit 3.0.38 protobuf 3.20.3 psutil 5.9.0 psycopg2 2.9.7 pure-eval 0.2.2 pyarrow 13.0.0 pybind11 2.10.4 pyclipper 1.3.0.post5 pycocotools 2.0.6 pycparser 2.21 pydantic 1.10.12 pydeck 0.8.1b0 Pygments 2.15.1 PyJWT 2.8.0 pymilvus 2.1.3 PyMuPDF 1.22.5 pypandoc 1.11 pyparsing 3.0.9 pyre-extensions 0.0.29 pyreadline3 3.4.1 pyrsistent 0.18.0 PySocks 1.7.1 pytesseract 0.3.10 pytest 7.4.2 python-dateutil 2.8.2 python-decouple 3.8 python-docx 0.8.11 python-dotenv 1.0.0 python-iso639 2023.6.15 python-json-logger 2.0.7 python-magic 0.4.27 python-magic-bin 0.4.14 python-multipart 0.0.6 python-pptx 0.6.21 pytz 2023.3 PyWavelets 1.4.1 pywin32 305.1 pywinpty 2.0.10 PyYAML 6.0 pyzmq 25.0.2 qtconsole 5.4.3 QtPy 2.3.1 rapidocr-onnxruntime 1.3.7 regex 2023.5.5 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986 1.5.0 rfc3986-validator 0.1.1 rich 13.0.1 safetensors 0.3.1 scikit-image 0.21.0 scikit-learn 1.2.2 scipy 1.10.1 Send2Trash 1.8.2 sentence-transformers 2.2.2 sentencepiece 0.1.99 setuptools 67.8.0 shapely 2.0.1 shortuuid 1.0.11 simplejson 3.19.1 six 1.16.0 sklearn 0.0.post5 smart-open 6.3.0 smmap 5.0.1 sniffio 1.3.0 soupsieve 2.3.2.post1 spacy 3.6.1 spacy-legacy 3.0.12 spacy-loggers 1.0.5 SQLAlchemy 2.0.19 srsly 2.4.8 stack-data 0.6.2 starlette 0.27.0 streamlit 1.27.0 streamlit-aggrid 0.3.4.post3 streamlit-antd-components 0.2.1 streamlit-chatbox 1.1.9 streamlit-option-menu 0.3.6 svgwrite 1.4.3 sympy 1.12 tabulate 0.9.0 tenacity 8.2.2 terminado 0.15.0 thinc 8.1.12 threadpoolctl 3.1.0 tifffile 2023.7.18 tiktoken 0.4.0 timm 0.9.2 tinycss2 1.2.1 tokenizers 0.13.3 toml 0.10.2 tomli 2.0.1 toolz 0.12.0 torch 2.0.0+cu117 torchaudio 2.0.0+cu117 torchvision 0.15.1+cu117 tornado 6.2 tqdm 4.65.0 traitlets 5.9.0 transformers 4.33.2 transformers-stream-generator 0.0.4 typer 0.7.0 types-pytz 2023.3.0.0 typing_extensions 4.6.3 typing-inspect 0.8.0 typing-utils 0.1.0 tzdata 2023.3 tzlocal 5.0.1 ujson 5.4.0 unstructured 0.10.16 unstructured-inference 0.5.4 unstructured.pytesseract 0.3.12 uri-template 1.2.0 urllib3 2.0.2 uvicorn 0.23.2 validators 0.22.0 Wand 0.6.11 wasabi 1.1.2 watchdog 3.0.0 wavedrom 2.0.3.post3 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.5.2 wheel 0.38.4 widgetsnbextension 4.0.7 win-inet-pton 1.1.0 wrapt 1.14.1 xlrd 2.0.1 XlsxWriter 3.1.2 yarl 1.9.2 zhipuai 1.0.7 zipp 3.15.0