-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathverify_claude.py
More file actions
60 lines (46 loc) · 1.49 KB
/
verify_claude.py
File metadata and controls
60 lines (46 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import os
import sys
import time
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
# Add src to path
sys.path.append(str(Path(__file__).parent / "python" / "src"))
sys.path.append(str(Path(__file__).parent / "src"))
from llm_session import Automator
import logging
logging.basicConfig(level=logging.INFO)
def main():
print("--- Starting Claude Verification ---")
# Use environment variables or hardcode for testing
email = os.getenv("LLM_EMAIL", "your_email@gmail.com")
password = os.getenv("LLM_PASSWORD", "your_password")
try:
print("Initializing Automator (claude)...")
# RUN HEADLESS=FALSE FOR FIRST LOGIN
bot = Automator(
provider="claude",
headless=False,
credentials={
"email": email,
"password": password
}
)
print("\n[Test] Single Prompt")
prompt = "Explain quantum entanglement in 10 words."
print(f"Sending: {prompt}")
response = bot.process_prompt(prompt)
print(f"\nResponse received:\n{response}")
if len(response) > 5:
print("\n>> Verification PASSED")
else:
print("\n>> Verification FAILED (Empty response)")
time.sleep(2)
bot.close()
print("\n--- Verification Complete ---")
except Exception as e:
print(f"\nERROR: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
main()