fix: 修改工作流中模型参数为非必填参数
This commit is contained in:
parent
96ac12ea31
commit
644bb61c4e
@ -38,6 +38,6 @@ class IChatNode(INode):
|
|||||||
|
|
||||||
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id,
|
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id,
|
||||||
chat_record_id,
|
chat_record_id,
|
||||||
model_params_setting,
|
model_params_setting=None,
|
||||||
**kwargs) -> NodeResult:
|
**kwargs) -> NodeResult:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -74,7 +74,7 @@ def get_default_model_params_setting(model_id):
|
|||||||
|
|
||||||
class BaseChatNode(IChatNode):
|
class BaseChatNode(IChatNode):
|
||||||
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
||||||
model_params_setting,
|
model_params_setting=None,
|
||||||
**kwargs) -> NodeResult:
|
**kwargs) -> NodeResult:
|
||||||
if model_params_setting is None:
|
if model_params_setting is None:
|
||||||
model_params_setting = get_default_model_params_setting(model_id)
|
model_params_setting = get_default_model_params_setting(model_id)
|
||||||
|
|||||||
@ -36,6 +36,6 @@ class IQuestionNode(INode):
|
|||||||
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
|
return self.execute(**self.node_params_serializer.data, **self.flow_params_serializer.data)
|
||||||
|
|
||||||
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
||||||
model_params_setting,
|
model_params_setting=None,
|
||||||
**kwargs) -> NodeResult:
|
**kwargs) -> NodeResult:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -74,7 +74,7 @@ def get_default_model_params_setting(model_id):
|
|||||||
|
|
||||||
class BaseQuestionNode(IQuestionNode):
|
class BaseQuestionNode(IQuestionNode):
|
||||||
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
def execute(self, model_id, system, prompt, dialogue_number, history_chat_record, stream, chat_id, chat_record_id,
|
||||||
model_params_setting,
|
model_params_setting=None,
|
||||||
**kwargs) -> NodeResult:
|
**kwargs) -> NodeResult:
|
||||||
if model_params_setting is None:
|
if model_params_setting is None:
|
||||||
model_params_setting = get_default_model_params_setting(model_id)
|
model_params_setting = get_default_model_params_setting(model_id)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user