jiriOndrusek-agent commented on code in PR #9339:
URL: https://github.com/apache/camel-quarkus/pull/9339#discussion_r4375813962
##########
extensions/langchain4j-ingest/runtime/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/IngestPipeline.java:
##########
@@ -26,7 +26,7 @@
public final class IngestPipeline {
/** The values {@link #parser(String)} and the {@code parser}
configuration property accept. */
- public static final Set<String> SUPPORTED_PARSERS =
IngestPipelineDefinition.SUPPORTED_PARSERS;
+ public static final Set<String> SUPPORTED_PARSERS =
IngestRoutes.SUPPORTED_PARSERS;
Review Comment:
Done: `Parser` is its own package-private enum now, and
`IngestPipeline.SUPPORTED_PARSERS` and `IngestRoutes.KAMELETS` both derive from
it, so the builder API and the `parser` validation no longer touch
`IngestRoutes`.
The native-resource build step still reads `IngestRoutes.KAMELETS`; moving
that list too would need a public type just for it, so I left it (build time
only).
_Generated with [Claude Code](https://claude.com/claude-code) on behalf of
@JiriOndrusek_
##########
extensions/langchain4j-ingest/runtime/src/main/java/org/apache/camel/quarkus/component/langchain4j/ingest/IngestRoutes.java:
##########
@@ -158,44 +213,256 @@ private IngestPipelineDefinition
builderPipeline(IngestBuilderPipelines.Entry en
* One creation path for both declaration styles, mirroring how a builder
pipeline provides
* the same runtime-configuration view the configuration path reads.
*/
- private IngestPipelineDefinition definition(String name, String uri,
+ private void compositionRoute(String name, String uri,
IngestRunTimeConfig.PipelineRunTimeConfig runtime,
EmbeddingStore<TextSegment> store, EmbeddingModel model,
int maxSegmentSize, int maxOverlapSize, int embeddingBatchSize,
int maxDocumentSize,
String documentSplitterName, String parser) {
- IngestPipelineDefinition definition;
+ // the name is substituted into Kamelet URIs and registry references,
so both declaration
+ // styles are held to one charset; @Ingest names are already checked
at build time
+ if (!name.matches("[A-Za-z0-9._-]+")) {
Review Comment:
Done: both checks use `IngestRoutes.NAME_PATTERN` (a String constant, so the
build step reading it does not initialise `IngestRoutes` either), and
`id(name)` / `id(name, suffix)` built on `LangChain4jIngest.SCHEME` replace the
spelled-out prefixes.
_Generated with [Claude Code](https://claude.com/claude-code) on behalf of
@JiriOndrusek_
--
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]