mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-26 00:46:22 +02:00
Return empty embeddings list as empty list through gateway (#514)
This commit is contained in:
parent
0f1d3ce8cf
commit
0e4fcb87de
1 changed files with 2 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ class GraphEmbeddingsResponseTranslator(MessageTranslator):
|
|||
def from_pulsar(self, obj: GraphEmbeddingsResponse) -> Dict[str, Any]:
|
||||
result = {}
|
||||
|
||||
if obj.entities:
|
||||
if obj.entities is not None:
|
||||
result["entities"] = [
|
||||
self.value_translator.from_pulsar(entity)
|
||||
for entity in obj.entities
|
||||
|
|
@ -91,4 +91,4 @@ class GraphEmbeddingsResponseTranslator(MessageTranslator):
|
|||
|
||||
def from_response_with_completion(self, obj: GraphEmbeddingsResponse) -> Tuple[Dict[str, Any], bool]:
|
||||
"""Returns (response_dict, is_final)"""
|
||||
return self.from_pulsar(obj), True
|
||||
return self.from_pulsar(obj), True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue