davsclaus opened a new issue, #91:
URL: https://github.com/apache/camel-jbang-examples/issues/91

   Camel 4.23 lets `langchain4j-chat`, `langchain4j-agent` and 
`langchain4j-embeddings` create their model from a **provider** and the options 
every provider has, with no bean of the model class 
([CAMEL-24820](https://issues.apache.org/jira/browse/CAMEL-24820), 
apache/camel#26611 and apache/camel#26613). The dependency follows the 
provider, so `camel run` downloads `langchain4j-ollama` (or `-open-ai`, …) on 
its own.
   
   ```properties
   camel.component.langchain4j-chat.provider = ollama
   camel.component.langchain4j-chat.model-name = {{ollama.model}}
   camel.component.langchain4j-chat.base-url = {{ollama.base.url}}
   camel.component.langchain4j-chat.temperature = 0.2
   ```
   
   or on the endpoint:
   
   ```yaml
   - to:
       uri: langchain4j-chat
       parameters:
         provider: ollama
         modelName: "{{ollama.model}}"
         baseUrl: "{{ollama.base.url}}"
   ```
   
   Options: `provider`, `modelName`, `baseUrl`, `apiKey`, `temperature`, 
`timeout`, and `model.*` for a provider-specific builder property. Providers: 
`ollama`, `openai`, `anthropic`, `azure-openai`, `mistral`, `gemini`, 
`vertex-ai`, `github`, `hugging-face`, or a class name.
   
   Update once 4.23.0 is released and the examples move to it (#86):
   
   - **ai/langchain4j-chat**: replace the `chatModel` bean (`type`, 
`builderClass`, `builderMethod`, `properties`) with the component options 
above, drop `chatModel: "#chatModel"` from the endpoint, and rewrite the "How 
it works" paragraph that explains the builder bean. Keep the Citrus test as is; 
it only sees the route.
   - **ai/docling-langchain4j-rag** and **security/ocsf**: these two reference 
`chatModel: "#chatModel"` but no longer declare the bean. The Groovy-script 
bean was dropped by the YAML normalisation in 60a70d8 (May 21) and both have 
been broken since; neither runs in CI (`bundled: false`, they need Ollama and 
Docling). The provider options fix them without bringing the bean back. Also 
replace the "Using OpenAI instead of Ollama" section in the RAG README, which 
shows the Groovy bean, with `provider = openai` and an `apiKey`.
   - **README of the ai group** and the examples catalog descriptions: where 
they say the model is a bean, say it is configured by provider.
   
   Not in scope: `showcase/smart-log-analyzer` uses `camel-openai` against 
Ollama's OpenAI-compatible API, not LangChain4j, and stays as it is.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj


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