haruki-830 opened a new pull request, #4507:
URL: https://github.com/apache/flink-cdc/pull/4507

   This PR introduces a concrete OpenAI-compatible model client as a follow-up 
to the generic AI model client API:
   
   ```yaml
   transform:
     - source-table: db.users
       projection: ID, AI_COMPLETE('chat_model', CONTENT, 'Complete the text') 
AS COMPLETED
       
   
   pipeline:
     model:
       - name: chat_model
         type: openai-compatible
         options:
           model: your-model
           endpoint: https://example.com/v1
           api-key: your-api-key
           system-prompt: You are a helpful assistant
   ```
   
   The client is discovered through the common `Factory` SPI using the 
`openai-compatible` identifier and validated with `FactoryHelper`. It 
implements the text generation and embedding capabilities and follows the model 
client `open`/`close` lifecycle.
   
   This PR only adds the concrete OpenAI-compatible provider. The generic model 
API and runtime integration were introduced separately in #4504. The changes 
are limited to the following:
   
   - Added an independent `flink-cdc-pipeline-model-openai-compatible` module.
   - Added support for `model`, `endpoint`, and `api-key`, while retaining 
`model-name` as a deprecated compatibility alias.
   - Added configurable system and user prompts with support for both English 
and Chinese prompts and input text, along with common request parameters 
including temperature, top-p, token limits, penalties, response format, 
additional headers, and additional body properties.
   - Added text completion and text embedding support.
   - Added configurable retry, fallback error handling, and fixed or 
exponential backoff.
   - Added credential-free tests using a Mock HTTP server, covering completion, 
embedding, request parameters, retry behavior, error handling, factory 
discovery, and validation.
   - Added dependency shading and relocation for the OpenAI Java client and its 
bundled dependencies.
   - Added NOTICE, RAT, repository license, and shaded JAR validation.
   - Added the module to community CI and updated the English and Chinese 
documentation.
   - Excluded internal-only DashScope configuration, file-based credential 
providers, service configuration, and internal metric naming.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   Generated-by: Codex (gpt-5.6-sol)


-- 
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