mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复【API 接口】应用对话接口 stream false ,提问报错
This commit is contained in:
parent
583a9c62d3
commit
8c32125c56
|
|
@ -208,7 +208,7 @@ class OpenAIChatSerializer(serializers.Serializer):
|
|||
'stream': stream,
|
||||
'application_id': application_id,
|
||||
'client_id': client_id,
|
||||
'client_type': client_type}).chat(
|
||||
'client_type': client_type, 'form_data': instance.get('form_data', {})}).chat(
|
||||
base_to_response=OpenaiToResponse())
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,8 @@ class ChatView(APIView):
|
|||
'application_id': (request.auth.keywords.get(
|
||||
'application_id') if request.auth.client_type == AuthenticationType.APPLICATION_ACCESS_TOKEN.value else None),
|
||||
'client_id': request.auth.client_id,
|
||||
'form_data': (request.data.get('form_data') if 'form_data' in request.data else []),
|
||||
'form_data': (request.data.get(
|
||||
'form_data') if 'form_data' in request.data else {}),
|
||||
'client_type': request.auth.client_type}).chat()
|
||||
|
||||
@action(methods=['GET'], detail=False)
|
||||
|
|
|
|||
Loading…
Reference in New Issue