Open LiamK opened 1 year ago
In simpleaichat.py line 224, in the str() method, I was getting an error:
File "/Users/liam/.virtualenvs/comedybot/lib/python3.10/site-packages/simpleaichat/simpleaichat.py", line 220, in __str__ return self.default_session.model_dump_json( TypeError: BaseModel.model_dump_json() got an unexpected keyword argument 'option'
def __str__(self) -> str: if self.default_session: return self.default_session.model_dump_json( exclude={"api_key", "api_url"}, exclude_none=True, option=orjson.OPT_INDENT_2, )
I couldn't find any version of Pydantic that had a 'option' keyword argument for the model_dump_json method. So, I replaced it with indent=2 and that works.
indent=2
In simpleaichat.py line 224, in the str() method, I was getting an error:
I couldn't find any version of Pydantic that had a 'option' keyword argument for the model_dump_json method. So, I replaced it with
indent=2
and that works.