🐛 fix(chat.py): fix the issue where the params variable is not converted to a string before slicing it in the log message to avoid TypeError

This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-07-10 17:48:48 -03:00
commit 00c1734fb8

View file

@ -126,7 +126,7 @@ async def stream_build(flow_id: str):
params = vertex._built_object_repr()
valid = True
logger.debug(
f"Building node {params[:50]}{'...' if len(params) > 50 else ''}"
f"Building node {str(params)[:50]}{'...' if len(str(params)) > 50 else ''}"
)
if vertex.artifacts:
# The artifacts will be prompt variables