modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
5.25k stars 322 forks source link

"AttributeError: can't set attribute..." #423

Closed zy1260957619 closed 2 months ago

zy1260957619 commented 2 months ago

https://github.com/modelscope/agentscope/blob/bc2e24ba6bab26108fd350fbbc1ad51472258ea5/src/agentscope/parsers/json_object_parser.py#L95

When dealing with TagNotFoundError, an error message "AttributeError: can't set attribute..." will be reported. Because response.text is' read-only '. 'response._text 'can be used instead when' response.text 'is assigned.

I found this issue while running 'werewolf. py' and LLMs can not provide the correct answer format. And it is just a suggestion for this code.

DavdGao commented 2 months ago

Thanks for your suggestion. We will fix this error in #422 , where we add @text.setter function to support attribute setting in model response.