rzo1 opened a new pull request, #1559:
URL: https://github.com/apache/stormcrawler/pull/1559

   Thank you for contributing to Apache StormCrawler.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes
   
   - [x] Is there a issue associated with this PR? Is it referenced in the 
commit message?
   
   - [x] Does your PR title start with `#XXXX` where `XXXX` is the issue number 
you are trying to resolve?
   
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically main)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   - [x] Is the code properly formatted with `mvn git-code-format:format-code 
-Dgcf.globPattern="**/*" -Dskip.format.code=false`?
   
   ### For code changes
   
   - [x] Have you ensured that the full suite of tests is executed via `mvn 
clean verify`?
   - [x] Have you written or updated unit tests to verify your changes?
   - [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file?
   
   ### Note
   
   This PR introduces a new TextExtractor implementation — OpenAITextExtractor 
— which utilizes a Large Language Model (LLM) via an OpenAI-compatible API to 
extract meaningful content from HTML documents. This allows for semantically 
rich, context-aware extraction far beyond traditional rule-based methods. 
Traditional extraction using static rules is brittle and struggles with modern, 
dynamic layouts. Leveraging LLMs like GPT-4 or LLaMA 3 enables understanding of 
HTML semantics, resulting in improved text extraction quality.
   
   Key Features are:
   
   - Supports OpenAI-compatible endpoints (e.g., Ollama, OpenRouter, Azure 
OpenAI)
   - Configurable prompts for both system and user messages
   - Optional user-defined "request" for fine-grained control (e.g., "only 
extract article body")
   - Hook interface (LlmResponseListener) for logging, monitoring, or billing 
(which is needed if you rely on a 3rd party vendor for inference)
   
   #### Breaking Change (Potential)
   This change renames the previously default TextExtractor class and 
introduces a new TextExtractor interface, making the implementation pluggable. 
While this may be considered a breaking change, the existing implementation was 
used privately and not designed for public extensibility. Therefore, in 
practice, it should be safe — but feedback is welcome.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to