generate error failure when summary failure reason (#3395)
This commit is contained in:
@@ -6,6 +6,7 @@ import structlog
|
||||
from litellm import ConfigDict
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from skyvern.errors.errors import UserDefinedError
|
||||
from skyvern.webeye.actions.action_types import ActionType
|
||||
|
||||
LOG = structlog.get_logger()
|
||||
@@ -19,15 +20,6 @@ class ActionStatus(StrEnum):
|
||||
completed = "completed"
|
||||
|
||||
|
||||
class UserDefinedError(BaseModel):
|
||||
error_code: str
|
||||
reasoning: str
|
||||
confidence_float: float = Field(..., ge=0, le=1)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"{self.reasoning}(error_code={self.error_code}, confidence_float={self.confidence_float})"
|
||||
|
||||
|
||||
class SelectOption(BaseModel):
|
||||
label: str | None = None
|
||||
value: str | None = None
|
||||
|
||||
@@ -6,8 +6,9 @@ from openai.types.responses.response import Response as OpenAIResponse
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from skyvern.config import settings
|
||||
from skyvern.errors.errors import UserDefinedError
|
||||
from skyvern.schemas.steps import AgentStepOutput
|
||||
from skyvern.webeye.actions.actions import Action, DecisiveAction, UserDefinedError
|
||||
from skyvern.webeye.actions.actions import Action, DecisiveAction
|
||||
from skyvern.webeye.actions.responses import ActionResult
|
||||
from skyvern.webeye.scraper.scraper import ScrapedPage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user