New web interface, move llm engine to separate process
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from aiohttp import web, WSMsgType
|
||||
from dataclasses import asdict
|
||||
from typing import Dict, Set
|
||||
|
||||
from ..auto_approver import AutoApprover, AutoApproverConfig
|
||||
@@ -28,7 +29,7 @@ class AutoApproverWebSocket:
|
||||
async def _handle_config_change(self, config: AutoApproverConfig):
|
||||
"""Handle config changes from the AutoApprover."""
|
||||
await self._broadcast_message({
|
||||
"config": config
|
||||
"config": asdict(config)
|
||||
})
|
||||
|
||||
async def handle_connection(self, request: web.Request) -> web.WebSocketResponse:
|
||||
@@ -41,7 +42,7 @@ class AutoApproverWebSocket:
|
||||
try:
|
||||
# Send initial config
|
||||
await ws.send_json({
|
||||
"config": self._auto_approver.config
|
||||
"config": asdict(self._auto_approver.config)
|
||||
})
|
||||
|
||||
async for msg in ws:
|
||||
|
||||
Reference in New Issue
Block a user