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

No overloads for "create" match the provided arguments - Pylance complains on brand new project #533

Open
aaronvg opened this issue Mar 26, 2024 · 3 comments

Comments

@aaronvg
Copy link

aaronvg commented Mar 26, 2024

Any tips on how to setup pylance to work with instructor properly?

I set up a new poetry project, installed instructor, copied the code snippet from the README, but it seems the patch doesnt return the right type back.

  • Using python 3.11
image

I suppose we can't really fix No overloads for "create" match the provided arguments Argument types: (Literal['gpt-4'], type[UserInfo], list[dict[str, str]]) since OpenAI literally doesn't implement that property.

Interpreter is also set correctly:
image

VSCode settings are set to "basic" typechecking
"python.analysis.typeCheckingMode": "basic",

Is it expected to not have the type completion on the responses or did I setup something incorrectly?

@jxnl
Copy link
Owner

jxnl commented Mar 26, 2024

we ran into some issues we hope to fix in 1.0 with a new client thats just, but this is unforchunatly a known issue right now :(

@noxan
Copy link
Contributor

noxan commented Mar 28, 2024

similar issue when you patch the method (patch(create=...)) where all the default openai parameters trigger a error: Arguments for ParamSpec "T_ParamSpec@__call__" are missing (reportCallIssue) warning.

Screenshot 2024-03-28 at 6 46 10 PM

@jxnl
Copy link
Owner

jxnl commented Mar 29, 2024

hope to fix this in 1.0 with #544

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

3 participants