CAMEL-24330: Add LLM integration guide for AI component documentation - #25313
Conversation
Introduce ai-llm-integration-guide.adoc covering component selection, structured output, temperature, streaming/SSE, dynamic prompts, and prompt management. Cross-link from ai-summary, OpenAI, and LangChain4j Chat docs. Sync regenerated catalog component pages. Co-authored-by: Cursor <cursoragent@cursor.com>
gnodet
left a comment
There was a problem hiding this comment.
🤖 AI-assisted review — Claude Code on behalf of @gnodet
Review: CAMEL-24330 — Add LLM integration guide for AI component documentation
The guide itself is well-organized and covers useful topics (component selection, structured output, streaming, prompt management). However, there are several issues that need to be fixed before this can be merged.
1. [CRITICAL] All xref fragment anchors are malformed
All 7 xref fragment anchors use space-separated mixed-case text instead of AsciiDoc auto-generated section IDs. AsciiDoc generates IDs by lowercasing, replacing spaces with underscores, and prepending _. All these links will be broken:
| Current (broken) | Correct |
|---|---|
#Streaming responses |
#_streaming_responses |
#Structured output (recommended for extraction) |
#_structured_output_recommended_for_extraction |
#Structured Output with JSON Schema |
#_structured_output_with_json_schema |
#Basic Chat Completion with String Input |
#_basic_chat_completion_with_string_input |
#Using a specific Chat Model |
#_using_a_specific_chat_model |
#Send a prompt with variables |
#_send_a_prompt_with_variables |
#Raw Passthrough (RAW mode) |
#_raw_passthrough_raw_mode |
2. [CRITICAL] Missing navigation entry — page won't appear in sidebar
The new ai-llm-integration-guide.adoc page has no entry in the navigation template. Additionally, the build's PrepareDocSymlinksMojo only symlinks files matching *-component.adoc and *-summary.adoc into docs/components/modules/ROOT/pages/. The clean() method deletes all files in the destination before recreating symlinks, so the manually committed symlink would be deleted during a build. The file would instead be picked up by the others group and symlinked to docs/components/modules/others/pages/, which would also break all the unqualified xref:ai-llm-integration-guide.adoc[...] links from component pages in ROOT (they'd need the others: module prefix).
This needs a proper integration into the doc build — either adjusting the symlink patterns or placing the file in a location the build expects.
3. [MAJOR] Non-compiling SSE streaming Java example
The SSE streaming code example won't compile:
.split(body().isInstanceOf(Iterator.class)).streaming()ValueBuilder.isInstanceOf() returns a Predicate, but split() requires an Expression. This should be changed to:
.split(body()).streaming()4. [MAJOR] Missing others: module prefix on a2a-producer xref
The xref xref:a2a-producer.adoc#Raw Passthrough (RAW mode)[...] is missing the others: module prefix. The file a2a-producer.adoc lives in docs/components/modules/others/pages/, not ROOT. Correct form:
xref:others:a2a-producer.adoc#_raw_passthrough_raw_mode[A2A RAW passthrough]
5. [MINOR] Misleading additionalBodyProperty example
The example uses temperature as the additionalBodyProperty example, but temperature already has a dedicated @UriParam. Since the NOTE below correctly says to prefer first-class options, showing temperature via additionalBodyProperty is contradictory. Use a field that genuinely lacks a first-class option (e.g., seed alone).
The guide content is solid — these are fixable issues. Looking forward to the updated version! 👍
Correct AsciiDoc section anchors, register *-guide.adoc in doc symlinks, fix SSE split example, use seed-only additionalBodyProperty demo, and add WATSONX-style a2a others: xref per review feedback. Co-authored-by: Cursor <cursoragent@cursor.com>
|
AI-generated comment on behalf of atiaomar1978-hub Review follow-up (
|
All review items addressed in d1db30c — xref anchors fixed, nav entry + symlink pattern added, SSE split example corrected, additionalBodyProperty example improved, a2a xref with others: prefix. Dismissing to unblock.
gnodet
left a comment
There was a problem hiding this comment.
🤖 AI-assisted review — Claude Code on behalf of @gnodet
Thanks for the quick follow-up! All review items addressed in d1db30c:
- ✅ All 7 xref fragment anchors fixed to use AsciiDoc auto-generated IDs
- ✅ Nav entry added +
PrepareDocSymlinksMojo.javaupdated to register*-guide.adocpattern - ✅ SSE streaming example fixed (
split(body()).streaming()) - ✅
additionalBodyPropertyexample changed to seed-only - ✅ a2a xref with
others:module prefix
Dismissed the previous REQUEST_CHANGES. No further observations from my side.
|
See also #25314 maybe there is something in that PR that is good to include here also |
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
Use pass:c[] for inline {{variable}} syntax so AsciiDoc doc validation
does not treat them as missing attributes.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
AI-generated comment on behalf of atiaomar1978-hub CI fix (
|
Merge useful content from apache#25314: OpenAI production tips (including model output error handling and MCP streaming note), ai-summary quick comparison table, and langchain4j cross-links to OpenAI features. Co-authored-by: Cursor <cursoragent@cursor.com>
|
AI-generated comment on behalf of atiaomar1978-hub Thanks @davsclaus for pointing to #25314 — incorporated the useful parts in
The dedicated |
|
AI-generated comment on behalf of atiaomar1978-hub PR status summaryLatest commit: Deliverables:
Review follow-ups addressed:
Local validation: Ready for another review pass when CI is green. |
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 572 tested, 27 compile-only — current: 76 all testedMaveniverse Scalpel detected 599 affected modules (current approach: 76).
|
Summary
AI-generated on behalf of atiaomar1978-hub
Addresses CAMEL-24330 — documentation gaps reported by a user building LLM-powered resume processing pipelines (blog reference).
ai-llm-integration-guide.adoc— decision matrix (OpenAI vs LangChain4j Chat vs Agent), structured output (jsonSchema/outputClass), chat temperature, streaming/SSE with platform-http, dynamic prompts, prompt management at scale, and an end-to-end extraction pipeline exampleai-summary.adocwith a getting-started link to the guideopenai-component.adoc— temperature, dynamic prompts, structured-output tips, cross-linkslangchain4j-chat-component.adocTest plan
openai-component.adoc,langchain4j-chat-component.adoc)Made with Cursor