File size: 1,929 Bytes
42bba47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
63
64
65
66
#!/usr/bin/env python3
"""
Elizabeth Raw CLI - Direct vLLM access with no modifications
"""

import requests
import sys

class ElizabethRawCLI:
    def __init__(self):
        self.api_url = "http://localhost:8000"
        self.api_key = "elizabeth-secret-key-2025"
        self.model_name = "qwen3-8b-elizabeth"
        self.headers = {
            "Authorization": f"Bearer {self.api_key}",
            "Content-Type": "application/json"
        }
    
    def send_raw_message(self, message):
        """Send direct message with minimal parameters"""
        try:
            payload = {
                "model": self.model_name,
                "messages": [{"role": "user", "content": message}],
                "max_tokens": 256,
                "temperature": 0.7
            }
            
            response = requests.post(
                f"{self.api_url}/v1/chat/completions",
                headers=self.headers,
                json=payload,
                timeout=30
            )
            
            if response.status_code == 200:
                return response.json()['choices'][0]['message']['content'].strip()
            else:
                return f"Error {response.status_code}"
                
        except Exception as e:
            return f"Error: {str(e)}"
    
    def run(self):
        print("🤖 Elizabeth CLI - Raw Mode")
        print("Type 'exit' to quit")
        print("-" * 40)
        
        while True:
            try:
                prompt = input("> ").strip()
                if prompt.lower() == 'exit':
                    break
                if not prompt:
                    continue
                
                response = self.send_raw_message(prompt)
                print(response)
                print()
                
            except KeyboardInterrupt:
                break

if __name__ == "__main__":
    cli = ElizabethRawCLI()
    cli.run()