-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The length of the tag does not match the actual error reported #8187
Comments
I found a similar unsolved discussion that might be relevant to your issue: Why this not work, which was last updated on September 5, 2024 [1]. Regarding the tag length validation, it is implemented in two places in the codebase:
def _validate_name(name):
if not name or len(name) < 1 or len(name) > 50:
raise ValueError("Name must be between 1 to 50 characters.")
return name
const handleKeyDown = (e: KeyboardEvent) => {
if (isSpecialMode && e.key === 'Enter')
setValue(`${value}↵`)
if (e.key === customizedConfirmKey) {
if (isSpecialMode)
e.preventDefault()
const valueTrimmed = value.trim()
if (!valueTrimmed || (items.find(item => item === valueTrimmed)))
return
if (valueTrimmed.length > 20) {
notify({ type: 'error', message: t('datasetDocuments.segment.keywordError') })
return
}
onChange([...items, valueTrimmed])
setTimeout(() => {
setValue('')
})
}
} It seems there might be a discrepancy between the backend and frontend validations. The backend allows up to 50 characters, while the frontend restricts it to 20 characters [2][3]. |
* commit 'dabfd74622a613c7198f06791ad70424ac94f54f': (222 commits) feat: Parallel Execution of Nodes in Workflows (langgenius#8192) docs: replace docker-compose with docker compose (langgenius#8195) refactor(api/core): Improve type hints and apply ruff formatter in agent runner and model manager. (langgenius#8166) filter excel empty sheet (langgenius#8194) fix: The length of the tag should between 1 and 50 (langgenius#8187) (langgenius#8188) nvidia rerank top n missed (langgenius#8185) fix: Version '2.6.2-2' for 'expat' was not found (langgenius#8182) code merge error (langgenius#8183) add volcengine tos storage (langgenius#8164) chore: bump super-linter to v7 (langgenius#8148) feat(api/core/model_runtime/entities/defaults.py): Add TOP_K in default parameters. (langgenius#8167) Fix variable typo (cont) (langgenius#8161) update qwen-long (langgenius#8157) Update LICENSE - remove 'SaaS' from restriction term definition (langgenius#8143) fix: html raw render (langgenius#8138) chore: translate i18n files (langgenius#8135) fix: user-select style and pre-create iframe in embed.js (langgenius#8093) Modify model parameters in Spark LLMs and zhipuai LLMs (langgenius#8078) chore: offline n to 1 retrieval (langgenius#8134) fix: ollama text embedding 500 error (langgenius#8131) ... # Conflicts: # api/configs/app_config.py # api/configs/feature/__init__.py # api/core/helper/code_executor/code_executor.py # api/services/conversation_service.py # web/yarn.lock
Self Checks
Dify version
0.7.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
1.add tag with 1testtesttesttesttesttesttesttesttesttest for workflow.
✔️ Expected Behavior
create tag successful
❌ Actual Behavior
The text was updated successfully, but these errors were encountered: