Skip to content

Commit 5af3568

Browse files
committed
removed the future support inside providers
1 parent 5c6f3c4 commit 5af3568

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

effectful/handlers/llm/providers.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import string
77
import typing
88
from collections.abc import Hashable, Iterable, Mapping, Sequence
9-
from concurrent.futures import Future
109
from typing import Any, get_type_hints
1110

1211
import pydantic
@@ -23,7 +22,6 @@
2322

2423
from openai.types.responses import FunctionToolParam
2524

26-
from effectful.handlers.futures import Executor
2725
from effectful.handlers.llm import Template
2826
from effectful.ops.semantics import fwd
2927
from effectful.ops.syntax import ObjectInterpretation, defop, implements
@@ -378,16 +376,4 @@ def _call[**P, T](
378376
ret_type = template.__signature__.return_annotation
379377
bound_args = template.__signature__.bind(*args, **kwargs)
380378
bound_args.apply_defaults()
381-
382-
# Check if return type is Future[T]
383-
origin = typing.get_origin(ret_type)
384-
if origin is Future:
385-
inner_type = typing.get_args(ret_type)[0]
386-
return Executor.submit(
387-
self._openai_api_call, # type: ignore
388-
template, # type: ignore
389-
bound_args, # type: ignore
390-
inner_type,
391-
)
392-
393379
return self._openai_api_call(template, bound_args, ret_type)

0 commit comments

Comments
 (0)