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

Method all_relationships

app/objects/c_operation.py:205–211  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

203 return False
204
205 async def all_relationships(self):
206 knowledge_svc_handle = BaseService.get_service('knowledge_svc')
207 seeded_relationships = []
208 if self.source:
209 seeded_relationships = await knowledge_svc_handle.get_relationships(criteria=dict(origin=self.source.id))
210 learned_relationships = await knowledge_svc_handle.get_relationships(criteria=dict(origin=self.id))
211 return seeded_relationships + learned_relationships
212
213 def ran_ability_id(self, ability_id):
214 return ability_id in [link.ability.ability_id for link in self.chain if link.finish]

Callers

nothing calls this directly

Calls 2

get_serviceMethod · 0.80
get_relationshipsMethod · 0.45

Tested by

no test coverage detected