Location>code7788 >text

Explore the use of DB-GBP features

Popularity:387 ℃/2024-12-17 02:06:27

catalogs
  • -Functions supported by GPT
  • 2. Configure the StarRocks database
  • 3. ChatBI
  • 4. APP creation and use
  • 5. Meta-database configuration
  • 6. API call exploration
    • 6.1 app
    • 6.2 datasources
    • 6.3 Knowledge
  • 7. Summary of issues
  • 8. Contributed PR

-Functions supported by GPT

image

2. Configure the StarRocks database

image

  1. Supports multiple database links
  2. But only one is supportedlibrary accessconsult (a document etc)

3. ChatBI

image

  1. Data accuracy is not precise enough and needs to be optimized if used in production.
  2. The query may do a large SQL query, dragging the web process to death, unable to respond to the

4. APP creation and use

dbgpt app install awel-flow-web-info-search
dbgpt app install awel-flow-example-chat
dbgpt app install awel-flow-simple-streaming-chat

Installation may be due to network problems reported errors, run a few more times will be fine!

5. Meta-database configuration

 LOCAL_DB_TYPE=mysql
 LOCAL_DB_USER=
 LOCAL_DB_PASSWORD=
 LOCAL_DB_HOST=127.0.0.1
 LOCAL_DB_PORT=3306
 LOCAL_DB_NAME=dbgpt

6. API call exploration

6.1 app

app chat api model replacement

sk-xxx
/compatible-mode/v1
llm model: qwen-long

6.2 datasources

datasources api error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\software\PyCharm 2023.3.5\plugins\python\helpers-pro\pydevd_asyncio\pydevd_nest_asyncio.py", line 120, in run
    return loop.run_until_complete(task)
  File "D:\software\PyCharm 2023.3.5\plugins\python\helpers-pro\pydevd_asyncio\pydevd_nest_asyncio.py", line 211, in run_until_complete
    return ()
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\", line 201, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\", line 232, in __step
    result = (None)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\api\", line 12, in list_ds
    res = await list_datasource(client=client)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\.venv\lib\site-packages\dbgpt\client\", line 120, in list_datasource
    raise ClientException(f"Failed to list datasource: {e}")
: (Failed to list datasource: (E0003)
Reason: {'success': False, 'err_code': 'E0003', 'err_msg': "1 validation errors:\n  {'type': 'model_attributes_type', 'loc': ('response', 'data'), 'msg': 'Input should be a valid dictionary or object to extract fields from', 'input': [DatasourceServeResponse(id=1, db_type='mysql', db_name='dbgpt_test', db_path='', db_host='', db_port=3306, db_user='', db_pwd='', comment='')]}\n", 'data': None}
)
Reason: None

6.3 Knowledge

  1. Failed to create multiple spaces by calling the create_space interface but created multiple spaces

image

  1. Calling delete_space will not delete the space.
Traceback (most recent call last):
  File "C:\Users\jack\PycharmProjects\dbgpt-test\api\", line 39, in <module>
    (delete())
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
    return ()
  File "C:\Users\jack\PycharmProjects\dbgpt-test\api\", line 24, in delete
    res = await delete_space(client=client, space_id='2')
  File "C:\Users\jack\PycharmProjects\dbgpt-test\.venv\lib\site-packages\dbgpt\client\", line 75, in delete_space
    raise ClientException(f"Failed to delete space: {e}")
: (Failed to delete space: (E0003)
Reason: {'success': False, 'err_code': 'E0003', 'err_msg': "1 validation errors:\n  {'type': 'none_required', 'loc': ('response', 'data'), 'msg': 'Input should be None', 'input': SpaceServeResponse(id=2, name='test_space', vector_type='Chroma', desc='for client space', context=None, owner='dbgpt', sys_code=None, domain_type=None)}\n", 'data': None}
)
Reason: None

space delete error invalid space name:test_space_abc

image

7. Summary of issues

  1. May generate large query SQL, causing queries to get stuck and respond very slowly
  2. The gbt task affects interface requests, and problems with the gbt task can cause request responses to time out
  3. Currently Chat data , DB and other responses are not accurate enough, maybe it has something to do with the model?
  4. Elsticsearch cards created by the knowledge base cannot be deleted
  5. Unable to force kill a running dialog task

8. Contributed PR

[1] /eosphoros-ai/DB-GPT/pull/1794
[2] /eosphoros-ai/DB-GPT/pull/1784
[3] /eosphoros-ai/DB-GPT/pull/1789