Andrea Cosentino created CAMEL-27099:
----------------------------------------

             Summary: camel-ai vector stores - share the missing embedding 
vector check of the embeddings transformers
                 Key: CAMEL-27099
                 URL: https://issues.apache.org/jira/browse/CAMEL-27099
             Project: Camel
          Issue Type: Improvement
          Components: camel-ai
            Reporter: Andrea Cosentino


Follow-up of CAMEL-26300 ([PR 
#29214|https://github.com/apache/camel/pull/29214]), suggested in its review.

The embeddings data type transformers of camel-milvus, camel-neo4j, 
camel-pgvector, camel-pinecone, camel-qdrant and camel-weaviate each read the 
{{CamelLangChain4jEmbeddingsVector}} header and throw the same 
{{IllegalArgumentException}} when it is missing ("Missing embedding vector 
header ... Ensure the langchain4j-embeddings component is called before this 
transformer.").

Proposed: keep the check in one place. The header name is a constant of 
{{CamelLangchain4jAttributes}} in camel-api, which does not depend on 
LangChain4j and so cannot return its {{Embedding}}. So either a helper next to 
the constant that builds the exception, or a shared helper in a module the six 
depend on (today they share only langchain4j-core).

_Claude Code on behalf of Andrea Cosentino (oscerd)_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to