Replies: 1 comment
-
I have been experimenting a bit longer with this, and by adding |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, and thanks for having created DSPy it looks very powerful and it seems a good fit for my project. I have been using it for a couple of weeks now, and with all simple and string based Signatures (of course depending on the LLM model used) it appears to provide good results, and most of the flows end with a reasonable answer.
When using TypedPredictor or TypedChainOfThought the processing stops with the error:
It appears that the creation of Signature(s) with types other than
str
is causing the serialization of the Pydantic model but somewhat fails to create a valid JSON. Or am I completely wrong?This is the code I have put together, to create a
TypedChainOfThought
that would take an abstract (str
) as input and should produce aList[str]
the topics contained in that abstract:And for the prediction I am using the following:
Can anyone help me understand how the custom types are supposed to work? I have some cases in which it works correctly and others in which the JSON deserialization fails.
Thanks in advance for any feedback you can provide.
Beta Was this translation helpful? Give feedback.
All reactions