fix: Fix bug for merging

This commit is contained in:
leiwu30 2024-04-07 10:12:26 +08:00
parent db2ea905b4
commit a2484f6420
2 changed files with 14 additions and 28 deletions

View file

@ -12,8 +12,6 @@ from multiprocessing import Pipe
class StreamPipe:
parent_conn, child_conn = Pipe()
variable: list = {}
finish: bool = False
format_data = {
@ -45,12 +43,6 @@ class StreamPipe:
else:
return None
def set_k_message(self, k, msg):
self.variable[k] = msg
def get_k_message(self, k):
return self.variable[k]
def msg2stream(self, msg):
self.format_data['created'] = int(time.time())
self.format_data['choices'][0]['delta']['content'] = msg