set content to empty after episode extractions have happened (#191)
* set content to empty after episode extractions have happened * format * bump version
This commit is contained in:
parent
7c15b729a9
commit
194ecf5eb4
3 changed files with 30 additions and 29 deletions
|
|
@ -319,8 +319,6 @@ class Graphiti:
|
||||||
valid_at=reference_time,
|
valid_at=reference_time,
|
||||||
)
|
)
|
||||||
episode.uuid = uuid if uuid is not None else episode.uuid
|
episode.uuid = uuid if uuid is not None else episode.uuid
|
||||||
if not self.store_raw_episode_content:
|
|
||||||
episode.content = ''
|
|
||||||
|
|
||||||
# Extract entities as nodes
|
# Extract entities as nodes
|
||||||
|
|
||||||
|
|
@ -442,6 +440,9 @@ class Graphiti:
|
||||||
episode.entity_edges = [edge.uuid for edge in entity_edges]
|
episode.entity_edges = [edge.uuid for edge in entity_edges]
|
||||||
|
|
||||||
# Future optimization would be using batch operations to save nodes and edges
|
# Future optimization would be using batch operations to save nodes and edges
|
||||||
|
if not self.store_raw_episode_content:
|
||||||
|
episode.content = ''
|
||||||
|
|
||||||
await episode.save(self.driver)
|
await episode.save(self.driver)
|
||||||
await asyncio.gather(*[node.save(self.driver) for node in nodes])
|
await asyncio.gather(*[node.save(self.driver) for node in nodes])
|
||||||
await asyncio.gather(*[edge.save(self.driver) for edge in episodic_edges])
|
await asyncio.gather(*[edge.save(self.driver) for edge in episodic_edges])
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "graphiti-core"
|
name = "graphiti-core"
|
||||||
version = "0.3.10"
|
version = "0.3.11"
|
||||||
description = "A temporal graph building library"
|
description = "A temporal graph building library"
|
||||||
authors = [
|
authors = [
|
||||||
"Paul Paliychuk <paul@getzep.com>",
|
"Paul Paliychuk <paul@getzep.com>",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue