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

not support autocomplete from embed model, eg: ChatOpenAI #796

Closed
linpan opened this issue Sep 7, 2023 · 2 comments
Closed

not support autocomplete from embed model, eg: ChatOpenAI #796

linpan opened this issue Sep 7, 2023 · 2 comments

Comments

@linpan
Copy link

linpan commented Sep 7, 2023

from langchain.chat_models import ChatOpenAI

ChatOpenAI dont suport autocompelete.

ChatOpenAI-> BaseMessageChunk->Serializable->BaseModel

extra:
pydantic: v2.3.0
Build #PY-232.9559.58, built on August 23, 2023
plugins: v0.4.7

image image
@koxudaxi
Copy link
Owner

@linpan
Thank you for creating the issue.
I have related the new version 0.4.9
The changes ignore init() arguments as default.
I quote the part of the document.

https://koxudaxi.github.io/pydantic-pycharm-plugin/ignore-init-arguments/
#798
👇

This feature is in version 0.4.9 or later

If a third-party library provides a model that extends BaseModel, it may override the __init__ method, as in __init__(self, **kwargs).
If this is the case, the plugin user should set ignore-init-method-arguments = true to ignore the __init__ method argument.
But it is difficult to tell if the library is using BaseModel or not.

The plugin ignore the __init__ method if argument is only **kwargs. the option is provided as ignore-init-method-keyword-arguments.
This option is enabled by default, so if you create a model that inherits from BaseModel with a method like __init__(self, **kwargs) defined, ignore this init argument.

If you want to disable this option, please put the following setting in pyproject.toml.

[tool.pydantic-pycharm-plugin].
ignore-init-method-keyword-arguments = true

@linpan
Copy link
Author

linpan commented Oct 15, 2023

thks, now is okay. 🚀
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants