[Enhancement] LMNR 초기화 로직 개선: HTTP 및 gRPC 포트 설정 추가

This commit is contained in:
imnyang 2025-06-15 03:04:36 +09:00
commit 6e74377028

10
main.py
View file

@ -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"): if os.getenv("LMNR_PROJECT_API_KEY") and os.getenv("LMNR_BASEURL"):
from lmnr import Laminar from lmnr import Laminar
# this line auto-instruments Browser Use and any browser you use (local or remote) # 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("🔧 환경 설정:") print("🔧 환경 설정:")
try: try: