| |
| """ |
| 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() |