Skip to content

AttributeError in examples/query_planner_execution #1582

Open
@johnwlockwood

Description

@johnwlockwood
  • This is actually a bug report.
  • I am not getting good LLM Results
  • I have tried asking for help in the community on discord or discussions and have not received a response.
  • I have tried searching the documentation and have not found an answer.

What Model are you using?

  • gpt-3.5-turbo
  • gpt-4-turbo
  • gpt-4
  • Other (please specify)

Describe the bug

AttributeError in query_planner_execution.py

% python examples/query_planner_execution/query_planner_execution.py
Traceback (most recent call last):
  File "/Users/john/repos/instructor/examples/query_planner_execution/query_planner_execution.py", line 162, in <module>
    plan = query_planner(
        "What is the difference in populations of Canada and the Jason's home country?",
        plan=False,
    )
  File "/Users/john/repos/instructor/examples/query_planner_execution/query_planner_execution.py", line 150, in query_planner
    functions=[QueryPlan.openai_schema],
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/john/repos/instructor/.venv/lib/python3.13/site-packages/pydantic/_internal/_model_construction.py", line 320, in __getattr__
    raise AttributeError(item)
AttributeError: openai_schema

To Reproduce
Steps to reproduce the behavior, including code snippets of the model and the input data and openai response.

python examples/query_planner_execution/query_planner_execution.py

Expected behavior

Expect no AttributeError

Screenshots
If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpythonPull requests that update python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions