allow extract result to be non dict (#4069)

This commit is contained in:
LawyZheng
2025-11-22 10:36:43 +08:00
committed by GitHub
parent 8fb46ef1ca
commit 7c189818d9
5 changed files with 29 additions and 11 deletions

View File

@@ -101,7 +101,8 @@ class LLMAPIHandler(Protocol):
use_message_history: bool = False,
raw_response: bool = False,
window_dimension: Resolution | None = None,
) -> Awaitable[dict[str, Any]]: ...
force_dict: bool = True,
) -> Awaitable[dict[str, Any] | Any]: ...
async def dummy_llm_api_handler(
@@ -118,5 +119,6 @@ async def dummy_llm_api_handler(
use_message_history: bool = False,
raw_response: bool = False,
window_dimension: Resolution | None = None,
) -> dict[str, Any]:
force_dict: bool = True,
) -> dict[str, Any] | Any:
raise NotImplementedError("Your LLM provider is not configured. Please configure it in the .env file.")