mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 04:11:52 +09:00
[Enhancement] LMNR 초기화 로직 개선: HTTP 및 gRPC 포트 설정 추가
This commit is contained in:
parent
546d9c061a
commit
6e74377028
1 changed files with 9 additions and 1 deletions
10
main.py
10
main.py
|
|
@ -43,7 +43,15 @@ backend_url = os.getenv("BACKEND_URL", "http://localhost:11081")
|
|||
if os.getenv("LMNR_PROJECT_API_KEY") and os.getenv("LMNR_BASEURL"):
|
||||
from lmnr import Laminar
|
||||
# this line auto-instruments Browser Use and any browser you use (local or remote)
|
||||
Laminar.initialize(project_api_key=os.getenv("LMNR_PROJECT_API_KEY"), base_url=os.getenv("LMNR_BASEURL")) # you can also pass project api key here
|
||||
if os.getenv("LMNR_HTTP_PORT") and os.getenv("LMNR_GRPC_PORT"):
|
||||
Laminar.initialize(
|
||||
project_api_key=os.getenv("LMNR_PROJECT_API_KEY"),
|
||||
base_url=os.getenv("LMNR_BASEURL"),
|
||||
http_port=int(os.getenv("LMNR_HTTP_PORT", "0")),
|
||||
grpc_port=int(os.getenv("LMNR_GRPC_PORT", "0"))
|
||||
)
|
||||
else:
|
||||
Laminar.initialize(project_api_key=os.getenv("LMNR_PROJECT_API_KEY"), base_url=os.getenv("LMNR_BASEURL")) # you can also pass project api key here
|
||||
|
||||
print("🔧 환경 설정:")
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue