Skip to content

Commit

Permalink
Update init of SPIRESEngine for engine resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Jan 10, 2024
1 parent d59d0df commit c6fc24c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ontogpt/engines/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ontogpt.engines.halo_engine import HALOEngine # type: ignore
from ontogpt.engines.knowledge_engine import KnowledgeEngine
from ontogpt.engines.spires_engine import SPIRESEngine
from ontogpt.io.template_loader import get_template_details

resolver = ClassResolver([SPIRESEngine, HALOEngine], base=KnowledgeEngine)

Expand All @@ -15,7 +16,7 @@ def create_engine(
) -> Union[KnowledgeEngine, SPIRESEngine]:
"""Create a knowledge engine."""
if engine is None:
engine = SPIRESEngine
engine = SPIRESEngine(template_details=get_template_details(template=template))
if isinstance(engine, str):
engine = resolver.get_class(engine)(**kwargs)
if engine is not None and not isinstance(engine, str):
Expand Down

0 comments on commit c6fc24c

Please sign in to comment.