MCPcopy
hub / github.com/apache/caldera / add_fact

Method add_fact

app/service/knowledge_svc.py:22–25  ·  view source on GitHub ↗
(self, fact, constraints=None)

Source from the content-addressed store, hash-verified

20 return getattr(module, module_type)(module_info)
21
22 async def add_fact(self, fact, constraints=None):
23 if isinstance(fact, Fact):
24 await self.get_service('event_svc').fire_event(exchange='fact', queue='added', fact=fact.display, constraints=constraints)
25 return await self.__loaded_knowledge_module._add_fact(fact, constraints)
26
27 async def update_fact(self, criteria, updates):
28 await self.get_service('event_svc').fire_event(exchange='fact', queue='updated', criteria=criteria, updates=updates)

Callers 11

taskMethod · 0.45
_init_sourceMethod · 0.45
save_factMethod · 0.45
add_factsMethod · 0.45
add_relationshipsMethod · 0.45
test_get_linksMethod · 0.45
test_remove_factMethod · 0.45
test_update_factMethod · 0.45
test_retrieve_factMethod · 0.45
test_fact_originMethod · 0.45

Calls 3

get_serviceMethod · 0.80
_add_factMethod · 0.80
fire_eventMethod · 0.45

Tested by 6

test_get_linksMethod · 0.36
test_remove_factMethod · 0.36
test_update_factMethod · 0.36
test_retrieve_factMethod · 0.36
test_fact_originMethod · 0.36