mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-08-29 04:26:20 +00:00
docs: revert .content to .text in export guide examples
FileObject.content is raw bytes; AgentContext.store() only accepts str/list and raises ValueError on bytes, so the previous fix commit broke both domain examples.
This commit is contained in:
@@ -259,7 +259,7 @@ graph = ContextGraph()
|
||||
ctx = AgentContext(vector_store=vs, knowledge_graph=graph, graph_expansion=True)
|
||||
|
||||
apt_report = ingest_file("apt29_2024_campaign.pdf", method="file")
|
||||
ctx.store(apt_report.content, extract_entities=True, extract_relationships=True)
|
||||
ctx.store(apt_report.text, extract_entities=True, extract_relationships=True)
|
||||
|
||||
graph_data = graph.to_dict()
|
||||
os.makedirs("./exports/", exist_ok=True)
|
||||
@@ -402,7 +402,7 @@ regs = [
|
||||
ingest_file("bcbs239.pdf", method="file"),
|
||||
]
|
||||
ctx.store(
|
||||
[r.content for r in regs],
|
||||
[r.text for r in regs],
|
||||
extract_entities=True,
|
||||
extract_relationships=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user