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] [storage] wrong config in VectorStoreConnector #1546

Closed
4 of 15 tasks
FOkvj opened this issue May 20, 2024 · 0 comments · Fixed by #1547
Closed
4 of 15 tasks

[Bug] [storage] wrong config in VectorStoreConnector #1546

FOkvj opened this issue May 20, 2024 · 0 comments · Fixed by #1547
Labels
bug Something isn't working Waiting for reply

Comments

@FOkvj
Copy link
Contributor

FOkvj commented May 20, 2024

Search before asking

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

Operating system information

Linux

Python version information

3.10

DB-GPT version

latest release

Related scenes

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

Installation Information

Device information

Device:CPU

Models information

no

What happened

connector = VectorStoreConnector.from_default(
        "Chroma",
        vector_store_config=ElasticsearchVectorConfig(index_name="test" ),
        embedding_fn=DefaultEmbeddingFactory(
            default_model_name=os.path.join(MODEL_PATH, "text2vec-large-chinese"),
        ).create(),
    )
  1. when you create a specific VectorStoreConnector, likes ElasticsearchVectorConfig.
  2. the param index_name would not be set in the connector correctly.

What you expected to happen

image image

The code in the second picture is wrong and unnecessary. The Variable config would miss some fields in vector_store_config, like index_name in ElasticsearchVectorConfig.

How to reproduce

connector = VectorStoreConnector.from_default(
        "Chroma",
        vector_store_config=ElasticsearchVectorConfig(index_name="test" ),
        embedding_fn=DefaultEmbeddingFactory(
            default_model_name=os.path.join(MODEL_PATH, "text2vec-large-chinese"),
        ).create(),
    )
  1. debug at dbgpt/storage/vector_store/elastic_store.py, line 128
  2. you will find out the value of index_name is not "test" but the default value "index_name_test"

Additional context

image

the vector_store_config of "KnowledgeGraph" should be BuiltinKnowledgeGraphConfig but not VectorStoreConfig

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@FOkvj FOkvj added bug Something isn't working Waiting for reply labels May 20, 2024
@FOkvj FOkvj changed the title [Bug] [storage] wrong config setting in VectorStoreConnector [Bug] [storage] wrong config in VectorStoreConnector May 20, 2024
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.

1 participant