Skip to content

Commit aac0eb9

Browse files
committed
droped synthesis and removed encoding_instructions
1 parent 553450f commit aac0eb9

2 files changed

Lines changed: 12 additions & 35 deletions

File tree

effectful/handlers/llm/encoding.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from PIL import Image
2020

2121
import effectful.handlers.llm.evaluation as evaluation
22-
from effectful.handlers.llm.synthesis import SynthesizedFunction
2322
from effectful.ops.semantics import _simple_type
2423
from effectful.ops.syntax import _CustomSingleDispatchCallable
2524
from effectful.ops.types import Operation, Term
@@ -284,6 +283,18 @@ def _format_callable_type(callable_type: type[Callable]) -> str:
284283
return str(callable_type)
285284

286285

286+
class SynthesizedFunction(pydantic.BaseModel):
287+
"""Structured output for function synthesis.
288+
289+
Pydantic model representing synthesized code with function name and module code.
290+
"""
291+
292+
module_code: str = pydantic.Field(
293+
...,
294+
description="Complete Python module code (no imports needed)",
295+
)
296+
297+
287298
def _create_typed_synthesized_function(
288299
callable_type: type[Callable],
289300
) -> type[SynthesizedFunction]:
@@ -477,12 +488,6 @@ def serialize(
477488
def deserialize(self, serialized_value: str) -> SynthesizedFunction:
478489
return SynthesizedFunction.model_validate_json(serialized_value)
479490

480-
@Operation.define
481-
@classmethod
482-
def encoding_instructions(cls) -> str | None:
483-
"""Instructions to be prefixed onto synthesis prompts to tune the encoding of the result."""
484-
return None
485-
486491

487492
@Encodable.define.register(object)
488493
def _encodable_object[T, U](

effectful/handlers/llm/synthesis.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)