monarch-initiative / ontogpt

LLM-based ontological extraction tools, including SPIRES
https://monarch-initiative.github.io/ontogpt/
BSD 3-Clause "New" or "Revised" License
574 stars 72 forks source link

`recipe-extract` command fails with `AttributeError` #195

Open caufieldjh opened 1 year ago

caufieldjh commented 1 year ago

Calls to the recipe-extract command fail with the following:

Traceback (most recent call last):
  File "/home/harry/ontogpt/.venv/bin/ontogpt", line 6, in <module>
    sys.exit(main())
  File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/harry/ontogpt/src/ontogpt/cli.py", line 771, in recipe_extract
    results.extracted_object.url = url
AttributeError: 'NoneType' object has no attribute 'url'

Running in verbose shows that a response is returned from the model, it just isn't grounded. My suspicion is either:

caufieldjh commented 1 year ago

Looks like this command isn't getting the models parameter specified correctly, either (same solution as #192), which doesn't seem to be causing the error but isn't helping.