claudevdm commented on code in PR #37623: URL: https://github.com/apache/beam/pull/37623#discussion_r2818569615
########## sdks/python/apache_beam/ml/rag/types.py: ########## @@ -33,49 +40,90 @@ @dataclass class Content: - """Container for embeddable content. Add new types as when as necessary. + """Container for embeddable content. - Args: - text: Text content to be embedded - """ + Args: + text: Text content to be embedded. + """ text: Optional[str] = None @dataclass class Embedding: - """Represents vector embeddings. + """Represents vector embeddings with optional metadata. - Args: - dense_embedding: Dense vector representation - sparse_embedding: Optional sparse vector representation for hybrid - search - """ + Args: + dense_embedding: Dense vector representation. + sparse_embedding: Optional sparse vector representation for hybrid search. + metadata: Optional metadata associated with this embedding. + """ dense_embedding: Optional[List[float]] = None - # For hybrid search sparse_embedding: Optional[Tuple[List[int], List[float]]] = None + metadata: Dict[str, Any] = field(default_factory=dict) Review Comment: Removed for now. This field is unnecessary for this PR -- 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]
