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

Remove option parameter for AIChat.__str__ #102

Open
minimaxir opened this issue Dec 19, 2023 · 0 comments
Open

Remove option parameter for AIChat.__str__ #102

minimaxir opened this issue Dec 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@minimaxir
Copy link
Owner

{
	"name": "TypeError",
	"message": "BaseModel.model_dump_json() got an unexpected keyword argument 'option'",
	"stack": "---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[36], line 1
----> 1 print(ai)

File /opt/homebrew/lib/python3.11/site-packages/simpleaichat/simpleaichat.py:220, in AIChat.__str__(self)
    218 def __str__(self) -> str:
    219     if self.default_session:
--> 220         return self.default_session.model_dump_json(
    221             exclude={\"api_key\", \"api_url\"},
    222             exclude_none=True,
    223             option=orjson.OPT_INDENT_2,
    224         )


TypeError: BaseModel.model_dump_json() got an unexpected keyword argument 'option'"
}

Should have been removed in the Pydantic 2.0 migration.

@minimaxir minimaxir added the bug Something isn't working label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant