oscerd commented on code in PR #27439:
URL: https://github.com/apache/camel/pull/27439#discussion_r4194629177


##########
components/camel-ai/camel-a2a/src/main/docs/a2a-producer.adoc:
##########
@@ -111,10 +113,15 @@ YAML::
 steps:
   - setHeader:
       name: CamelA2AOperation
-      constant: MESSAGE_STREAM
-  - to: a2a:https://agent.example.com
+      expression:
+        constant:
+          expression: MESSAGE_STREAM
+  - to:
+      uri: a2a:https://agent.example.com
   - split:
-      simple: "${body}"
+      expression:
+        simple:
+          expression: "${body}"
       streaming: true
       steps:
         - choice:

Review Comment:
   **Two `when` branches in this example are still in compact notation**
   
   The two `when` branches just below (lines 129 and 133) are still in the 
compact `- simple: "..."` form, so this example is only half converted while 
the rest of the block uses the canonical form. The loader still accepts it, but 
`camel validate yaml --canonical` flags it once the fragment is wrapped in a 
route. Those lines are outside the diff hunk, so the canonical form here 
instead of a suggestion:
   
   ```yaml
           - choice:
               when:
                 - expression:
                     simple:
                       expression: "${body.statusUpdate} != null"
                   steps:
                     - log:
                         message: "Progress: ${body.statusUpdate.status.state}"
                 - expression:
                     simple:
                       expression: "${body.message} != null"
                   steps:
                     - log:
                         message: "Final message received"
   ```



##########
components/camel-ai/src/main/docs/ai-llm-integration-guide.adoc:
##########
@@ -203,13 +208,17 @@ Load prompts from the classpath or file system and pass 
them as the body or via
 
 [source,yaml]
 ----
-- from:
-    uri: file:prompts/extract-resume.txt?noop=true
-    steps:
-      - setHeader:
-          name: CamelOpenAIUserMessage
-          simple: "${body}\n\nDocument to 
parse:\n${exchangeProperty.documentText}"
-      - to: 
openai:chat-completion?jsonSchema=resource:classpath:schemas/resume.schema.json
+- route:
+    from:
+        uri: file:prompts/extract-resume.txt?noop=true

Review Comment:
   **The `file:` URI names a file, so this route fails to start**
   
   Pre-existing, but this line is edited here: the `file` endpoint path is the 
directory to poll, and since CAMEL-24839 `FileEndpoint.createConsumer` fails 
with `prompts/extract-resume.txt is a file, not a directory ... To read this 
one file use file:prompts?fileName=extract-resume.txt` when the file exists 
(and with `autoCreate` a missing file becomes a directory that is never 
consumed). Separately, `${exchangeProperty.documentText}` is never set on an 
exchange started by this file consumer, so the "Document to parse" part is 
always empty; that part needs a small restructure (e.g. start from the document 
route and load the prompt with `pollEnrich`). The URI part is a one-line fix:
   
   ```suggestion
           uri: file:prompts?fileName=extract-resume.txt&noop=true
   ```



##########
core/camel-core-engine/src/main/docs/modules/eips/pages/ai-patterns.adoc:
##########
@@ -212,6 +212,44 @@ See also the full 
xref:enterprise-integration-patterns.adoc[Enterprise Integrati
 |xref:languages:semantic-language.adoc[Semantic], xref:switch-eip.adoc[Switch]
 |Evaluate a Semantic choice question once and dispatch its category string 
through literal Switch cases.
 
+|Guardrail / Guard decision
+|xref:languages:semantic-language.adoc[Semantic], 
xref:ROOT:typesafe-ai-component.adoc[TypeSafe AI],
+xref:filter-eip.adoc[Filter], xref:validate-eip.adoc[Validate]
+|Ask a yes/no question about the message (is this request actionable, does 
this action fit the task) and filter or
+validate on the answer. A System One model such as Jev answers with a fast, 
structured decision instead of
+generated text.
+
+|Tool / Function calling
+|xref:ROOT:ai-tool-component.adoc[AI Tool]
+|Expose a route as a tool an AI agent can call. The same route works with the 
LangChain4j, Spring AI and OpenAI
+agents.
+
+|MCP server
+|xref:others:mcp-server.adoc[MCP Server], 
xref:ROOT:ai-resource-component.adoc[AI Resource]
+|Expose `ai-tool` routes as MCP tools and `ai-resource` routes as MCP 
resources to any MCP client.
+
+|MCP client
+|xref:others:langchain4j-agent-mcp.adoc[LangChain4j Agent MCP], 
xref:others:openai-mcp.adoc[OpenAI MCP]
+|Let an agent in a route call the tools of remote MCP servers.
+
+|Tool authorization / Agent permissions
+|xref:ROOT:ai-tool-component.adoc#_authorizing_tool_calls[AI Tool 
authorization],
+xref:ROOT:opa-component.adoc[OPA], xref:ROOT:openfga-component.adoc[OpenFGA]
+|Authorize every tool call before it runs, on the caller identity and the tool 
name, never on model output.
+
+|Agent identity / Workload identity
+|xref:ROOT:spiffe-component.adoc[SPIFFE]
+|Give each workload a cryptographic identity and mutual TLS, so a tool call 
can be authorized on who is calling.
+
+|LLM observability
+|xref:others:ai-observability.adoc[AI Observability]
+|Record an OpenTelemetry span and Micrometer metrics (model, tokens, duration) 
for every LLM call, inside the route's

Review Comment:
   **AI Observability does not cover every LLM call**
   
   `camel-ai-observability` only instruments the `langchain4j-chat`, 
`langchain4j-agent`, `langchain4j-embeddings`, `openai` and `spring-ai-chat` 
producers (its page lists exactly these), and only when `camel-opentelemetry2` 
and/or `camel-micrometer` is present. Other model calls, including the TypeSafe 
AI / Semantic guard decisions recommended a few rows above, produce no GenAI 
span or metric, so "for every LLM call" over-promises:
   
   ```suggestion
   |Record an OpenTelemetry span and Micrometer metrics (model, tokens, 
duration) for each call of the LangChain4j, OpenAI and Spring AI chat 
producers, inside the route's
   ```



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