Open jimkring opened 3 months ago
hi @jimkring - thanks for the issue!
can you show the definition of the Recipe
type?
This is from the Marvin examples. https://www.askmarvin.ai/docs/text/functions/#parameters
class Recipe(BaseModel):
name: str
cook_time_minutes: int
ingredients: list[str]
steps: list[str]
@zzstoatzz lmk if this is enough info for you to reproduce. Thx.
hi @jimkring
thanks for the issue! i have reproduced, it looks like the import itself indeed causes this, which is interesting. will take a look as soon as I can
@zzstoatzz Thank you. I was able to work around this issue by keeping my model definitions separate (in a different module) from where I call marvin. So, if a fix is not easy, a suitable workaround might be to just generate an error if this condition is detected along with a message that helps point to a solution.
First check
Bug summary
I was having a strange issue where ai functions were returning string data instead of the type specified in my function signature. It turns out that having
from __future__ import annotations
was causing the issue.Reproduction
Error
No response
Versions
Additional context
No response