-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extraction Engine Improvements #1097
Conversation
griptape/artifacts/json_artifact.py
Outdated
Json = Union[dict[str, "Json"], list["Json"], str, int, float, bool, None] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows us to access via JsonArtifact.Json
which may be useful in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, could you provide a hypothetical example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the near future we may offer some sort of structured output functionality that would allow users to pass in a JSON schema they'd like the LLM to output their answer in.
The type could be something like: output_format: JsonArtifact.Json
317ec50
to
0c788ef
Compare
0c788ef
to
004e36a
Compare
1c7f97d
to
a7f10d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
griptape/artifacts/json_artifact.py
Outdated
Json = Union[dict[str, "Json"], list["Json"], str, int, float, bool, None] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, could you provide a hypothetical example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple tiny things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one typo!
Gonna hold off on merging this until some of the artifact changes are settled. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
fa52568
to
89a800a
Compare
@vachillo bump on this since it's an oldie |
Describe your changes
Changed
BaseExtractionEngine.extract
intoextract
andextract_artifacts
for consistency withBaseSummaryEngine
.BaseExtractionEngine
no longer catches exceptions and returnsErrorArtifact
s.JsonExtractionEngine.template_schema
is now required.CsvExtractionEngine.column_names
is now required.JsonExtractionEngine.extract_artifacts
now returns aListArtifact[JsonArtifact]
.CsvExtractionEngine.extract_artifacts
now returns aListArtifact[CsvRowArtifact]
.Issue ticket number and link
NA
📚 Documentation preview 📚: https://griptape--1097.org.readthedocs.build//1097/