Skip to content
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

Adding gpt4o vision example #702

Merged
merged 3 commits into from
May 27, 2024
Merged

Adding gpt4o vision example #702

merged 3 commits into from
May 27, 2024

Conversation

karbon0x
Copy link
Contributor

@karbon0x karbon0x commented May 25, 2024

Summary:
Adds an example of vision using gpt4o

Key points:

  • Adds vision example using gpt4o
  • Currently utilizes two receipts. One of them is parsed correctly, the second one isn't highlighting the limitations of these models for OCR.
  • Model validator helps us ensure sum of items = total in the receipt.

🚀 This description was created by Ellipsis for commit 18b5c96

Summary:

Introduces a new example script for demonstrating OCR capabilities of GPT-4o using receipts, with data validation.

Key points:

  • Adds run_vision_gpt4o.py under examples/extract-table/
  • Utilizes openai and pydantic for OCR and data validation
  • Demonstrates model's OCR capabilities with two receipt images
  • Includes a model validator to ensure accuracy of extracted data

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 18b5c96 in 39 seconds

More details
  • Looked at 72 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_dSZ3efBx0qzaOErv


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

examples/extract-table/run_vision_gpt4o.py Outdated Show resolved Hide resolved
@karbon0x karbon0x changed the title Adding gpt40 vision example Adding gpt4o vision example May 26, 2024
Copy link
Contributor

ellipsis-dev bot commented May 26, 2024

Sorry, I don't know how to help with that. If you tag me (@ellipsis-dev) in a comment, I can do one of these things (but not multiple at once):

  • review and summarize this pull request
  • make changes to this pull request
  • answer questions about this PR, or about the codebase in general
  • hide my old reviews on this PR (to reduce clutter)

@jxnl jxnl merged commit c2458fb into jxnl:main May 27, 2024
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants