delete unused codes

This commit is contained in:
shaobo 2024-07-11 23:24:15 +08:00
parent 81ff1bea82
commit 0963521071

View File

@ -10,8 +10,6 @@ from protocols.openai_api import ChatCompletionRequest, ChatCompletionStreamResp
from sseclient import Event
from transformers import AutoTokenizer, AutoModel
SYS_PROMPT = "你是一位智能编程助手你叫CodeGeeX。你会为用户回答关于编程、代码、计算机方面的任何问题并提供格式规范、可以执行、准确安全的代码并在必要时提供详细的解释。"
class CodegeexChatModel:
def __init__(self, args):
@ -71,8 +69,6 @@ class CodegeexChatModel:
resp = ChatCompletionResponse()
resp.choices[0].message.content = response
resp.choices[0].finish_reason = 'stop'
# event = Event(id=resp.id, data=resp.json(), event='message')
# return event.dump()
return resp.model_dump()
except Exception as e:
return f"请求报错,错误原因:{e}"