From 0963521071f1ad88fd10bdc703627c82cfbf1aa9 Mon Sep 17 00:00:00 2001 From: shaobo Date: Thu, 11 Jul 2024 23:24:15 +0800 Subject: [PATCH] delete unused codes --- local_mode/models/codegeex.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/local_mode/models/codegeex.py b/local_mode/models/codegeex.py index 1ca6eb6..8eda531 100644 --- a/local_mode/models/codegeex.py +++ b/local_mode/models/codegeex.py @@ -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}"