-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update examples for new models #80
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@boqiny can you fix the build failure. |
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.
PR Overview
This PR updates several Jupyter notebook examples to support new configuration options for extracting figures and charts, while also refining markdown output formatting and standardizing execution counts. Key changes include:
- Adding dotenv configuration and extract_args for improved extraction parameters.
- Changing markdown output handling by joining list elements into a single string.
- Downgrading the Python version metadata to 3.10.15 for consistency.
Reviewed Changes
File | Description |
---|---|
examples/parse_pdf2.ipynb | Added dotenv and extract_args, refined markdown joining, and updated execution counts and version. |
examples/parse_img.ipynb | Updated execution counts and modified the markdown output display to index the joined output list. |
examples/parse_docx.ipynb | Refactored markdown formatting and execution counts, along with minor text corrections. |
examples/async_parse_pdf2.ipynb | Enhanced async PDF parsing with extract_args, added waiting messages, and updated metadata version. |
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
examples/parse_pdf2.ipynb:222
- The Python version downgrade to 3.10.15 should be confirmed to be compatible with all dependencies; ensure that this change doesn't inadvertently break any functionality.
"version": "3.10.15"
examples/parse_img.ipynb:175
- [nitpick] Standardize the handling of markdown output across notebooks; if markdown_string is always a list, consider renaming the variable or documenting its structure for clarity.
display(Markdown(markdown_string[0]))
@@ -48,6 +59,10 @@ | |||
"name": "stdout", | |||
"output_type": "stream", | |||
"text": [ | |||
"Waiting for response...\n", |
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.
[nitpick] The repeated 'Waiting for response...' messages might clutter the output; consider reducing the repetition or implementing a dynamic progress indicator.
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
fixed, preprocess to remove special characters and line breaks, this aligns with the testcases in cdk now. |
User description
Description
Since we were turning the chart and figure off by default in the extract_args in cdk, we need to ensure the figure output are still returned in the examples, so here. I added the config for the extract_args. Also update the result markdown_list to be properly rendered, previously the examples was not able to run, since the output is a list instead of strings now.
Related Issue
Type of Change
How Has This Been Tested?
Screenshots (if applicable)
Checklist
Additional Notes
PR Type
Description
Updated notebook cell execution counts.
Added extract_args and dotenv configurations.
Joined markdown list into single string.
Downgraded Python version in examples.
Changes walkthrough 📝
parse_img.ipynb
Update execution counts and display call.
examples/parse_img.ipynb
parse_pdf2.ipynb
Improve PDF example with config and formatting.
examples/parse_pdf2.ipynb
async_parse_pdf2.ipynb
Improve async PDF parsing and output display.
examples/async_parse_pdf2.ipynb
parse_docx.ipynb
Refactor DOCX example execution and formatting.
examples/parse_docx.ipynb