Skip to content
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

[Bug] Milvus_v 2.3.7,cannot delete knowledge space which name is chinese #1150

Closed
3 of 15 tasks
darius-gs opened this issue Feb 6, 2024 · 5 comments · Fixed by #1212
Closed
3 of 15 tasks

[Bug] Milvus_v 2.3.7,cannot delete knowledge space which name is chinese #1150

darius-gs opened this issue Feb 6, 2024 · 5 comments · Fixed by #1212
Labels
bug Something isn't working Waiting for reply

Comments

@darius-gs
Copy link
Contributor

Search before asking

  • I had searched in the issues and found no similar issues.

Operating system information

Windows

Python version information

3.10

DB-GPT version

main

Related scenes

  • Chat Data
  • Chat Excel
  • Chat DB
  • Chat Knowledge
  • Model Management
  • Dashboard
  • Plugins

Installation Information

Device information

gpu

Models information

LLM_MODEL=chatglm3_6b_32k
EMBEDDING_MODEL=text2vec
VECTOR_STORE_TYPE=Milvus_v 2.3.7

What happened

连接Milvus_v 2.3.7作为向量数据库后,知识库的名称要是为中文的,就会提示the first character of a collection name must be an underscore or letter: invalid parameter删不掉;

What you expected to happen

Milvus创建Collection名称只允许数字,字母和下划线。dbgpt建的知识库名若为中文,Milvus库中对应的Collection名称为随机字符

How to reproduce

1、连接Milvus作为向量数据库
2、新建知识库的名称要是为中文的
3、删除就会提示the first character of a collection name must be an underscore or letter: invalid parameter删不掉;

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@darius-gs darius-gs added bug Something isn't working Waiting for reply labels Feb 6, 2024
@darius-gs
Copy link
Contributor Author

修改DB-GPT-0.4.7\dbgpt\storage\vector_store\milvus_store.py第425行后可以删除中文的库名
def delete_vector_name(self, vector_name):
from pymilvus import utility
"""milvus delete collection name"""
logger.info(f"milvus vector_name:{vector_name} begin delete...")
# utility.drop_collection(vector_name)
utility.drop_collection(self.collection_name)
return True

@Aries-ckt
Copy link
Collaborator

Aries-ckt commented Feb 6, 2024

yep, that's cool, could you submit a pr for us? follow the contribute format rule.
make fmt
make pre-commit

@Aries-ckt Aries-ckt changed the title [Bug] Milvus_v 2.3.7作为向量数据库后,知识库的名称要是为中文就删不掉 [Bug] Milvus_v 2.3.7,cannot delete knowledge space which name is chinese Feb 6, 2024
@Dd88664185
Copy link

修改DB-GPT-0.4.7\dbgpt\storage\vector_store\milvus_store.py第425行后可以删除中文的库名 def delete_vector_name(self, vector_name): from pymilvus import utility “”“milvus delete collection name”“” logger.info(f“milvus vector_name:{vector_name} begin delete...”) # utility.drop_collection(vector_name) utility.drop_collection(self.collection_name) return True

问一下如果用他默认的向量库 应该修改哪?我也是无法删除知识库这个问题
微信图片_20240209091342
无标题

@Aries-ckt
Copy link
Collaborator

Check if another process is occupying the file handle.

@Dd88664185
Copy link

检查是否有其他进程占用文件句柄。

没有 进程只有dbgpt这一个

darius-gs added a commit to darius-gs/DB-GPT that referenced this issue Feb 29, 2024
修复 连接Milvus_v 2.3.7作为向量数据库后,知识库的名称要是为中文的,就会提示the first character of a collection name must be an underscore or letter: invalid parameter删不掉的问题。eosphoros-ai#1150 (comment)
@darius-gs darius-gs mentioned this issue Feb 29, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Waiting for reply
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants