davsclaus opened a new pull request, #128:
URL: https://github.com/apache/camel-jbang-examples/pull/128

   Closes #91. Stacked on #126; retarget to `main` once that is merged.
   
   Camel 4.23 creates the `langchain4j-chat` model from a **provider** 
(CAMEL-24820), and `camel run` downloads the provider's LangChain4j module, so 
the `OllamaChatModel` builder beans go:
   
   - **ai/langchain4j-chat** and **ai/ticket-classifier**: `provider: ollama`, 
`baseUrl`, `modelName` and `temperature` on the endpoint. Their Citrus tests 
pass only `ollama.base.url` and `ollama.model`, not `application.properties`, 
so options on the endpoint keep the tests unchanged.
   - **ai/docling-langchain4j-rag** (four endpoints) and **security/ocsf**: 
`camel.component.langchain4j-chat.provider=ollama` and friends in 
`application.properties`.
   - The READMEs, the log line numbers they show, the catalog descriptions and 
the ai group table say the model is configured by provider. The RAG README 
explains switching to OpenAI with `provider=openai` and an `api-key`. The 
"Using OpenAI instead of Ollama" section with the Groovy bean, mentioned in the 
issue, was already gone.
   
   Since the issue was filed, #93 and #103 brought the bean back in the RAG and 
OCSF examples, so they were no longer broken; this replaces those beans too. 
ai/ticket-classifier was added after the issue (#119) and gets the same change.
   
   Tested locally with Camel 4.23.0 against a local Ollama (granite4:3b):
   - langchain4j-chat writes the three notifications. The route also works 
without `application.properties`, as its Citrus test runs it.
   - ticket-classifier files the three tickets.
   - ocsf's `/api/ocsf/detection-finding/summarize` answers with the model's 
summary.
   - The RAG example starts (the Docling service was not running, so documents 
were not processed).
   - `camel validate yaml --canonical` succeeds for all four route files.
   
   I did not run the two Citrus tests: they start their own Ollama container 
and pull a 2.5 GB model.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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