mirror of
https://github.com/j93es/browser-use-oauth.git
synced 2026-06-04 06:01:51 +09:00
[Update] agent 호출 구조 변경
This commit is contained in:
parent
495b3a52da
commit
b7e6afb227
12 changed files with 267 additions and 343 deletions
|
|
@ -8,7 +8,6 @@ def check_env_variables():
|
|||
"BACKEND_URL",
|
||||
"GOOGLE_API_KEY",
|
||||
"GOOGLE_MODEL",
|
||||
"GOOGLE_PLANNER_MODEL"
|
||||
]
|
||||
|
||||
for var in required_vars:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,26 @@ from pathlib import Path
|
|||
|
||||
progress_file = Path("data/scan_progress.json")
|
||||
|
||||
class ProgressChecker:
|
||||
def __init__(self, filepath):
|
||||
self.filepath = filepath
|
||||
self.progress = self.load_progress()
|
||||
|
||||
def save(self):
|
||||
"""현재 진행 상황을 파일에 저장"""
|
||||
with open(self.filepath, 'w', encoding='utf-8') as f:
|
||||
json.dump(self.progress, f, ensure_ascii=False, indent=2)
|
||||
|
||||
def load(self):
|
||||
"""이전 진행 상황을 파일에서 불러오기"""
|
||||
if os.path.exists(self.filepath):
|
||||
try:
|
||||
with open(self.filepath, 'r', encoding='utf-8') as f:
|
||||
return json.load(f)
|
||||
except:
|
||||
return None
|
||||
return None
|
||||
|
||||
|
||||
def save_progress(current_progress):
|
||||
"""현재 진행 상황을 파일에 저장"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue