DB-GBP功能使用探索

目录

  • 1.DB-GPT支持的功能
  • 2.配置StarRocks数据库
  • [3. ChatBI](#3. ChatBI)
  • [4. APP创建使用](#4. APP创建使用)
  • [5. 元数据库配置](#5. 元数据库配置)
  • [6. API 调用探索](#6. API 调用探索)
    • [6.1 app](#6.1 app)
    • [6.2 datasources](#6.2 datasources)
    • [6.3 Knowledge](#6.3 Knowledge)
  • [7. 问题总结](#7. 问题总结)
  • [8. 贡献的PR](#8. 贡献的PR)

1.DB-GPT支持的功能

2.配置StarRocks数据库

  1. 支持多种数据库链接
  2. 但是只支持一个库访问查询

3. ChatBI

  1. 数据准确性不够精准,如果用于生产需要做相关优化
  2. 查询可能会做大SQL查询,拖死web进程,无法响应

4. APP创建使用

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

安装可能因为网络问题报错,多执行几次就好了

5. 元数据库配置

 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 调用探索

6.1 app

app chat api 模型替换

sk-xxx
https://dashscope.aliyuncs.com/compatible-mode/v1
llm model: qwen-long

6.2 datasources

1.list 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 f.result()
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\futures.py", line 201, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\tasks.py", line 232, in __step
    result = coro.send(None)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\api\datasource.py", line 12, in list_ds
    res = await list_datasource(client=client)
  File "C:\Users\jack\PycharmProjects\dbgpt-test\.venv\lib\site-packages\dbgpt\client\datasource.py", line 120, in list_datasource
    raise ClientException(f"Failed to list datasource: {e}")
dbgpt.client.client.ClientException: (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. 通过调用create_space接口失败但是创建了多个空间
  1. 调用delete_space 删除不了空间

    Traceback (most recent call last):
    File "C:\Users\jack\PycharmProjects\dbgpt-test\api\knowledge.py", line 39, in <module>
    asyncio.run(delete())
    File "C:\Users\jack\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", 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 future.result()
    File "C:\Users\jack\PycharmProjects\dbgpt-test\api\knowledge.py", 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\knowledge.py", line 75, in delete_space
    raise ClientException(f"Failed to delete space: {e}")
    dbgpt.client.client.ClientException: (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

7. 问题总结

  1. 可能会生成大查询SQL,导致查询卡死,响应非常慢
  2. gbt任务会影响界面请求,gbt任务出问题会导致请求响应超时
  3. 目前Chat data 、DB等响应还不够准确,可能跟模型有关?
  4. 知识库创建的elsticsearch 卡片删除不掉
  5. 无法强制杀死正在运行中的对话任务

8. 贡献的PR

[1] https://github.com/eosphoros-ai/DB-GPT/pull/1794

[2] https://github.com/eosphoros-ai/DB-GPT/pull/1784

[3] https://github.com/eosphoros-ai/DB-GPT/pull/1789

相关推荐
csdn5659738502 小时前
AI时代下 | 通义灵码冲刺备战求职季
ai·通义灵码·ai助手·辅助编程
&永恒的星河&2 小时前
深度剖析:NLP 领域基于 TF-IDF 和 Text-Rank 的关键字提取原理
人工智能·ai·自然语言处理·nlp·tf-idf·pagerank·textrank
YXWik69 小时前
cuda + cudnn安装
ai
豌豆花下猫20 小时前
Python 潮流周刊#86:Jupyter Notebook 智能编码助手(摘要)
后端·python·ai
是小白_鸭1 天前
(RAG系列) FastGPT工作流的http请求模块使用
ai·语言模型·自然语言处理
是小白_鸭1 天前
(RAG系列) FastGPT通过API调用工作流问答
ai·语言模型·自然语言处理
蜉蝣1号1 天前
【已解决】我和ollama运行的qwen2.5大模型通信,总是返回GGGG?
人工智能·ai·语言模型·aigc
beyond阿亮1 天前
llama.cpp编译和运行 API调用
c++·人工智能·ai·llama
康顺哥1 天前
“扣子”开发之四:与千帆AppBuilder比较
人工智能·机器学习·ai·ai编程
Hi-Jimmy1 天前
【AI插件】在VS Code中免费使用GitHub Copilot
ide·vscode·ai·github copilot