This commit is contained in:
CakeCN
2025-12-08 11:35:09 +08:00
parent 42549bb32a
commit aae10819ca

View File

@@ -6,6 +6,7 @@ from datetime import datetime
from typing import Dict, Callable, Any, Optional
from functools import partial
from threading import Event
from flask import current_app
class ASEngineClient:
def __init__(self, server_url: str, namespace: str, id:str):
@@ -380,6 +381,9 @@ class HSAEngineClient(ASEngineClient):
super().__init__(server_url, namespace, id)
self.chatmanager = chatmanager
def loadmarkdown(self, fmd, fmdp, fsp):
self.send_text('markdown-in', fmd, self.id)
self.send_text('markdown-prompt-in', fmdp, self.id)
self.send_text('score-prompt-in', fsp, self.id)
self.send_text('markdown-in', fmd, self.id, wait_for_ack=True)
current_app.logger.debug(f"Sent markdown: {fmd}")
self.send_text('markdown-prompt-in', fmdp, self.id, wait_for_ack=True)
current_app.logger.debug(f"Sent markdown-prompt: {fmdp}")
self.send_text('score-prompt-in', fsp, self.id, wait_for_ack=True)
current_app.logger.debug(f"Sent score-prompt: {fsp}")