feat: add polling-based LLM support#333
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for polling-based Large Language Model (LLM) invocations. Key changes include the addition of StartPolling and CheckPolling actions to the ModelActions enum, new request and result entities (ModelStartPollingRequest, ModelCheckPollingRequest, and LLMPollingResult), and the implementation of start_llm_polling and check_llm_polling methods within the PluginExecutor. The LargeLanguageModel interface has also been updated with internal methods and a supports_polling check to facilitate this new feature. Feedback provided suggests using value equality (==) instead of identity comparison (is) for StrEnum status checks in the LLMPollingResult validator to ensure more robust logic.
Summary
Add SDK support for polling-based LLM invocations.
What Changed
start_pollingandcheck_polling.ModelFeature.POLLINGand explicit support checks before polling dispatch.LLMPollingResultwith state-specific payload validation.0.9.0and documented polling-based LLM invocation support inREADME.md.Validation
just checkuv run pytest tests/test_model_polling.pyCloses #332