[Feature] adding code for groq support #44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for Groq Vision API and Vertex AI (Google Cloud) in the vision-parse library, enabling users to leverage multiple powerful vision models for processing images and PDFs.
Features Added
Groq Integration: Implemented full support for Groq's vision models (
meta-llama/llama-4-scout-17b-16e-instructandmeta-llama/llama-4-maverick-17b-128e-instruct)Vertex AI Integration: Added support for Google Cloud's Vertex AI platform with Gemini models (
gemini-1.5-pro-002andgemini-1.5-flash-002)Flexible Configuration Options:
groq_configparameter to bothLLMandVisionParserclassesvertex_configparameter with support for multiple authentication methods (API key, service account JSON, service account key file)Robust Error Handling:
Documentation & Examples:
Performance Optimization: Added guidance for proper image resolution settings to stay within API limitations
Page-Level Visual Analysis: Implemented a new workflow to send entire page images to LLMs for detecting and summarizing embedded visuals like images, diagrams, charts, and visualizations
Configurable Visual Summary: Added
enable_image_summaryparameter to toggle visual element detection and summary generationImplementation Details
Groq Integration:
Vertex AI Integration:
Page-Level Visual Analysis:
Configurable Visual Summary:
Before submitting
Testing
Groq Testing
Vertex AI Testing