mirror of
https://github.com/langgenius/dify.git
synced 2026-10-24 12:04:30 +08:00
feat(api): LLM polling support (#37462)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WH-2099 <wh2099@pm.me>
This commit is contained in:
co-authored by
autofix-ci[bot]
WH-2099
parent
19838972dc
commit
f0b34bdeb4
@@ -5,6 +5,13 @@ from pydantic import TypeAdapter
|
||||
|
||||
from extensions.ext_logging import get_request_id
|
||||
|
||||
# NOTE: Avoid renaming exception classes in this file, since
|
||||
# the `_handle_plugin_daemon_error` in api/core/plugin/impl/base.py
|
||||
# build exception instances based on the class name.
|
||||
#
|
||||
# Renaming of exception classes could result in incorrect exception
|
||||
# being raised.
|
||||
|
||||
|
||||
class PluginDaemonError(Exception):
|
||||
"""Base class for all plugin daemon errors."""
|
||||
@@ -75,6 +82,10 @@ class PluginInvokeError(PluginDaemonClientSideError, ValueError):
|
||||
)
|
||||
|
||||
|
||||
class PluginLLMPollingUnsupportedError(PluginInvokeError):
|
||||
"""Plugin-backed LLM polling is unavailable for the requested model."""
|
||||
|
||||
|
||||
class PluginUniqueIdentifierError(PluginDaemonClientSideError):
|
||||
description: str = "Unique Identifier Error"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user