From d4db4b7ca979059363fc4f47aff32d3c73d6bece Mon Sep 17 00:00:00 2001 From: Volker Stampa Date: Thu, 29 Feb 2024 10:52:59 +0100 Subject: [PATCH] Define defaults for instructs task --- src/intelligence_layer/core/instruct.py | 12 +++++++++--- src/intelligence_layer/core/model.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/intelligence_layer/core/instruct.py b/src/intelligence_layer/core/instruct.py index 25fdd0cd8..52033b686 100644 --- a/src/intelligence_layer/core/instruct.py +++ b/src/intelligence_layer/core/instruct.py @@ -2,7 +2,12 @@ from pydantic import BaseModel -from intelligence_layer.core.model import CompleteInput, CompleteOutput, ControlModel +from intelligence_layer.core.model import ( + CompleteInput, + CompleteOutput, + ControlModel, + LuminousControlModel, +) from intelligence_layer.core.task import Task from intelligence_layer.core.tracer.tracer import TaskSpan @@ -15,9 +20,10 @@ class InstructInput(BaseModel): class Instruct(Task[InstructInput, CompleteOutput]): - def __init__(self, model: ControlModel) -> None: + + def __init__(self, model: ControlModel | None = None) -> None: super().__init__() - self._model = model + self._model = model or LuminousControlModel() def do_run(self, input: InstructInput, task_span: TaskSpan) -> CompleteOutput: prompt = self._model.to_instruct_prompt( diff --git a/src/intelligence_layer/core/model.py b/src/intelligence_layer/core/model.py index c89d9a5d0..541a82476 100644 --- a/src/intelligence_layer/core/model.py +++ b/src/intelligence_layer/core/model.py @@ -209,7 +209,7 @@ def __init__( "luminous-base-control-20240215", "luminous-extended-control-20240215", "luminous-supreme-control-20240215", - ], + ] = "luminous-base-control", client: Optional[AlephAlphaClientProtocol] = None, ) -> None: super().__init__(name, client)