Skip to content

feat(worker): implement visual grounding api integration (phase 2.1)#5

Open
chrisyecora wants to merge 1 commit into
mainfrom
feature/migration-phase-2-1-visual-grounding
Open

feat(worker): implement visual grounding api integration (phase 2.1)#5
chrisyecora wants to merge 1 commit into
mainfrom
feature/migration-phase-2-1-visual-grounding

Conversation

@chrisyecora
Copy link
Copy Markdown
Owner

Description

This PR implements Phase 2.1 of the Vision-LLM hybrid migration: Visual Grounding API Integration.

Changes

  • Created worker/anthropic_service.py to handle communication with Claude 3.5 Sonnet.
  • Implemented the get_grounded_items() method utilizing Anthropic Tool Use for precise bounding box detection and rich metadata extraction.
  • Exposed a standalone get_grounded_items_from_claude() function for easy integration into the existing pipeline.
  • Added email-validator and pytest dependencies to the worker for API model support and unit testing.
  • Created worker/tests/test_anthropic_service.py and added unit tests for the visual grounding logic.

Related Links

  • Completes Phase 2.1 of the Double-Claude Orchestrated Pipeline migration plan.

Validation

  • Unit tests added and passing successfully with mocked Claude responses.
  • Tested parsing of returned JSON payload into the GroundedItem Pydantic model.

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.

1 participant