modelscope / agentscope

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

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

Closed zy1260957619 closed 2 weeks ago

zy1260957619 commented 2 weeks 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 weeks 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.