Skip to content

Commit d40ddf4

Browse files
committed
Add credentials in web_login connections
1 parent 77d14c9 commit d40ddf4

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llmstack/connections/handlers/web_login.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import asyncio
22
import logging
3-
from typing import Iterator, Union
3+
from typing import Iterator, List, Union
44

55
import grpc
66
from django.conf import settings
@@ -24,11 +24,21 @@ class WebLoginBaseConfiguration(BaseSchema):
2424
_storage_state: str
2525

2626

27+
class WebLoginCredentials(BaseSchema):
28+
domain: str = Field(description="Domain of the website")
29+
username: str = Field(description="Username")
30+
password: str = Field(description="Password", json_schema_extra={"widget": "password"})
31+
32+
2733
class WebLoginConfiguration(WebLoginBaseConfiguration):
2834
start_url: str = Field(
2935
description="URL to login to",
3036
default="https://google.com",
3137
)
38+
credentials: List[WebLoginCredentials] = Field(
39+
description="Credentials to login to the website",
40+
default=[],
41+
)
3242

3343

3444
class WebLogin(ConnectionTypeInterface[WebLoginConfiguration]):

0 commit comments

Comments
 (0)