Open chrisgoddard opened 2 months ago
we encounter the same issue, also with the sync version: No overloads for "create" match the provided arguments
.
client = instructor.from_openai(
openai.OpenAI(),
mode=instructor.Mode.PARALLEL_TOOLS,
)
result = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"content": prompt, "role": "system"}],
response_model=Iterable[Schema],
)
weirdly the type hints seems to work once Iterable
is removed, but that in return breaks the actual logic.
Also seems like there are a bunch of warnings for the pyright checks, see e.g. https://github.com/jxnl/instructor/actions/runs/10179361479/job/28154928602
Instructor 1.3.7 Python 3.12.3
Here's my example code:
Pylance gives me these errors:
However this seems to happen even without the parallel tools option
Is there something different I'm supposed to do to get async type hints working correctly?