feat: (0.6)New UI (#1855)

Co-authored-by: 夏姜 <wenfengjiang.jwf@digital-engine.com>
Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: wb-lh513319 <wb-lh513319@alibaba-inc.com>
Co-authored-by: csunny <cfqsunny@163.com>
This commit is contained in:
明天
2024-08-21 17:37:45 +08:00
committed by GitHub
parent 3fc82693ba
commit b124ecc10b
824 changed files with 93371 additions and 2515 deletions

View File

@@ -3,29 +3,10 @@ from datetime import datetime
from sqlalchemy import Column, DateTime, Integer, String, Text
from dbgpt.app.openapi.api_v1.feedback.feed_back_model import FeedBackBody
from dbgpt.serve.feedback.models.models import ServeEntity
from dbgpt.storage.metadata import BaseDao, Model
class ChatFeedBackEntity(Model):
__tablename__ = "chat_feed_back"
id = Column(Integer, primary_key=True)
conv_uid = Column(String(128))
conv_index = Column(Integer)
score = Column(Integer)
ques_type = Column(String(32))
question = Column(Text)
knowledge_space = Column(String(128))
messages = Column(Text)
user_name = Column(String(128))
gmt_created = Column(DateTime)
gmt_modified = Column(DateTime)
def __repr__(self):
return (
f"ChatFeekBackEntity(id={self.id}, conv_index='{self.conv_index}', conv_index='{self.conv_index}', "
f"score='{self.score}', ques_type='{self.ques_type}', question='{self.question}', knowledge_space='{self.knowledge_space}', "
f"messages='{self.messages}', user_name='{self.user_name}', gmt_created='{self.gmt_created}', gmt_modified='{self.gmt_modified}')"
)
ChatFeedBackEntity = ServeEntity
class ChatFeedBackDao(BaseDao):

View File

@@ -6,19 +6,19 @@ from dbgpt._private.pydantic import BaseModel
class FeedBackBody(BaseModel):
"""conv_uid: conversation id"""
conv_uid: str
conv_uid: Optional[str]
"""conv_index: conversation index"""
conv_index: int
conv_index: Optional[int]
"""question: human question"""
question: str
question: Optional[str]
"""score: rating of the llm's answer"""
score: int
score: Optional[int]
"""ques_type: question type"""
ques_type: str
ques_type: Optional[str]
user_name: Optional[str] = None