fix: type num of variable converted to str (#3758)
This commit is contained in:
parent
f257f2c396
commit
2ea8c73cd8
5 changed files with 17 additions and 47 deletions
|
|
@ -32,6 +32,8 @@ class AdvancedPromptTransform(PromptTransform):
|
|||
memory_config: Optional[MemoryConfig],
|
||||
memory: Optional[TokenBufferMemory],
|
||||
model_config: ModelConfigWithCredentialsEntity) -> list[PromptMessage]:
|
||||
inputs = {key: str(value) for key, value in inputs.items()}
|
||||
|
||||
prompt_messages = []
|
||||
|
||||
model_mode = ModelMode.value_of(model_config.mode)
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ class SimplePromptTransform(PromptTransform):
|
|||
memory: Optional[TokenBufferMemory],
|
||||
model_config: ModelConfigWithCredentialsEntity) -> \
|
||||
tuple[list[PromptMessage], Optional[list[str]]]:
|
||||
inputs = {key: str(value) for key, value in inputs.items()}
|
||||
|
||||
model_mode = ModelMode.value_of(model_config.mode)
|
||||
if model_mode == ModelMode.CHAT:
|
||||
prompt_messages, stops = self._get_chat_model_prompt_messages(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue