Commit Graph

5 Commits

Author SHA1 Message Date
af4114969a feat: migrate from Anthropic API to OpenRouter
Replace direct Anthropic API integration with OpenRouter to enable
more flexible LLM provider access while maintaining Claude 3.5 Sonnet.

Changes:
- Replace anthropic package with openai in requirements.txt
- Update config to use OPENROUTER_API_KEY instead of ANTHROPIC_API_KEY
- Migrate LLMAnalyzer from Anthropic client to OpenAI client with
  OpenRouter base URL (https://openrouter.ai/api/v1)
- Update model identifier to OpenRouter format: anthropic/claude-3.5-sonnet
- Convert API calls from messages.create() to chat.completions.create()
- Update response parsing to match OpenAI format
- Rename API key parameter in CompanyAnalyzer from anthropic_api_key
  to openrouter_api_key
- Update all tests to mock OpenAI client instead of Anthropic
- Fix client initialization to accept direct API key parameter

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-22 12:26:56 -05:00
d7cf80f02f feat: add LLM integration for patent analysis
Implemented LLMAnalyzer class using Anthropic's Claude API for:
- Single patent content analysis
- Portfolio-wide analysis across multiple patents
- Configurable API key management via environment variables

Key features:
- Uses Claude 3.5 Sonnet for high-quality analysis
- Structured prompts for innovation assessment
- Token limits optimized per use case (1024 for single, 2048 for portfolio)
- Analyzes: innovation quality, market potential, strategic direction

Updated config.py to support ANTHROPIC_API_KEY environment variable.

Added comprehensive test suite (6 tests) covering:
- Initialization from config and direct API key
- Single patent analysis
- Portfolio analysis
- Token limit validation

All 19 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:55:35 -05:00
6533cef56f test: add pytest framework and initial test suite
Added pytest and pytest-mock to requirements.txt for testing infrastructure.

Created tests/ directory with comprehensive test coverage for:
- Text cleaning functions (figure references, whitespace, line numbers)
- Section extraction logic (abstract, claims, case sensitivity)

All 8 tests passing. This provides a foundation for test-driven
development as we continue building the LLM integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-19 18:52:54 -05:00
63a9889e5b feat: patent retrival and semi-processed 2025-12-08 19:33:02 -05:00
8ca435a78a chore: include local files 2025-11-15 22:13:31 -05:00