add webhook support for observer (#1546)

This commit is contained in:
Shuchang Zheng
2025-01-14 08:59:53 -08:00
committed by GitHub
parent 950a4a54f3
commit 0392763998
8 changed files with 160 additions and 13 deletions

View File

@@ -91,5 +91,16 @@ class ObserverMetadata(BaseModel):
class CruiseRequest(BaseModel):
user_prompt: str
url: HttpUrl | None = None
url: str | None = None
browser_session_id: str | None = None
webhook_callback_url: str | None = None
totp_verification_url: str | None = None
totp_identifier: str | None = None
@field_validator("url", "webhook_callback_url", "totp_verification_url")
@classmethod
def validate_urls(cls, url: str | None) -> str | None:
if url is None:
return None
return validate_url(url)