Skip to content

Commit

Permalink
Define defaults for instructs task
Browse files Browse the repository at this point in the history
  • Loading branch information
volkerstampa committed Feb 29, 2024
1 parent 7d3cb60 commit d4db4b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions src/intelligence_layer/core/instruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/intelligence_layer/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d4db4b7

Please sign in to comment.