Great question — answering as the UphillTech team:
If you run mypy (a static type checker) on your code, you see: query.py:18: error: Argument 1 to "create_openapi_agent" has incompatible type "OllamaLLM"; expected "ReducedOpenAPISpec" [arg-type] query.py:19: error: Argument 2 to "create_openapi_agent" has incompatible type "ReducedOpenAPISpec"; expected "TextRequestsWrapper" [arg-type] query.py:20: error: Argument 3 to "create_openapi_agent" has incompatible type "TextRequestsWrapper"; expected "BaseLanguageModel[Any]" [arg-type] The problem comes from the call of the method planner.create_openapi_agent where the first parameter ( llm ) is misplaced. It should be: agent = planner.create_openapi_agent( openapi_spec, requests_wrapper, llm,...
Full answer by Ortomala Lokni: https://stackoverflow.stackexchange.com/a/79597339 (CC BY-SA 4.0).
Need it done for your business? UphillTech.