fix: temporal retriever return values (#1338)

<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
Vasilije 2025-09-07 08:44:23 -07:00 committed by GitHub
commit e0b4e4ee5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -114,7 +114,7 @@ class TemporalRetriever(GraphCompletionRetriever):
"No timestamps identified based on the query, performing retrieval using triplet search on events and entities." "No timestamps identified based on the query, performing retrieval using triplet search on events and entities."
) )
triplets = await self.get_triplets(query) triplets = await self.get_triplets(query)
return await self.resolve_edges_to_text(triplets) return await self.resolve_edges_to_text(triplets), triplets
if ids: if ids:
relevant_events = await graph_engine.collect_events(ids=ids) relevant_events = await graph_engine.collect_events(ids=ids)
@ -123,7 +123,7 @@ class TemporalRetriever(GraphCompletionRetriever):
"No events identified based on timestamp filtering, performing retrieval using triplet search on events and entities." "No events identified based on timestamp filtering, performing retrieval using triplet search on events and entities."
) )
triplets = await self.get_triplets(query) triplets = await self.get_triplets(query)
return await self.resolve_edges_to_text(triplets) return await self.resolve_edges_to_text(triplets), triplets
vector_engine = get_vector_engine() vector_engine = get_vector_engine()
query_vector = (await vector_engine.embedding_engine.embed_text([query]))[0] query_vector = (await vector_engine.embedding_engine.embed_text([query]))[0]