feat: fix completion log error (#692)

This commit is contained in:
takatost 2023-07-31 15:38:13 +08:00 committed by GitHub
parent a0bd15245a
commit 12ecf89a87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ class CompletionConversationApi(Resource):
'status': fields.String,
'from_source': fields.String,
'from_end_user_id': fields.String,
'from_end_user_session_id': fields.String(attribute='end_user.session_id'),
'from_end_user_session_id': fields.String(),
'from_account_id': fields.String,
'read_at': TimestampField,
'created_at': TimestampField,
@ -136,8 +136,6 @@ class CompletionConversationApi(Resource):
query = db.select(Conversation).where(Conversation.app_id == app.id, Conversation.mode == 'completion')
query = query.options(joinedload(Conversation.end_user))
if args['keyword']:
query = query.join(
Message, Message.conversation_id == Conversation.id