mirror of https://github.com/langgenius/dify.git
fix: truncate auto-populated description to prevent 400-char limit error (#28681)
This commit is contained in:
parent
87c4b4c576
commit
61ee1b9094
|
|
@ -111,7 +111,11 @@ class App(Base):
|
|||
else:
|
||||
app_model_config = self.app_model_config
|
||||
if app_model_config:
|
||||
return app_model_config.pre_prompt
|
||||
pre_prompt = app_model_config.pre_prompt or ""
|
||||
# Truncate to 200 characters with ellipsis if using prompt as description
|
||||
if len(pre_prompt) > 200:
|
||||
return pre_prompt[:200] + "..."
|
||||
return pre_prompt
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue