Coder Social home page Coder Social logo

eosphoros-ai / db-gpt Goto Github PK

View Code? Open in Web Editor NEW
11.1K 95.0 1.4K 266.57 MB

AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents

Home Page: https://docs.dbgpt.site

License: MIT License

Python 74.31% Dockerfile 0.09% JavaScript 0.05% HTML 14.90% Shell 0.31% Batchfile 0.04% Mako 0.02% TypeScript 10.04% CSS 0.06% Makefile 0.17%
database gpt-4 langchain vicuna private security llm agents bgi gpt

db-gpt's Introduction

DB-GPT: Revolutionizing Database Interactions with Private LLM Technology

What is DB-GPT?

🤖 DB-GPT is an open source AI native data app development framework with AWEL(Agentic Workflow Expression Language) and agents.

The purpose is to build infrastructure in the field of large models, through the development of multiple technical capabilities such as multi-model management (SMMF), Text2SQL effect optimization, RAG framework and optimization, Multi-Agents framework collaboration, AWEL (agent workflow orchestration), etc. Which makes large model applications with data simpler and more convenient.

🚀 In the Data 3.0 era, based on models and databases, enterprises and developers can build their own bespoke applications with less code.

AI-Native Data App



Data-awels

Data-Apps

dashboard-images

Contents

Introduction

The architecture of DB-GPT is shown in the following figure:

The core capabilities include the following parts:

  • RAG (Retrieval Augmented Generation): RAG is currently the most practically implemented and urgently needed domain. DB-GPT has already implemented a framework based on RAG, allowing users to build knowledge-based applications using the RAG capabilities of DB-GPT.

  • GBI (Generative Business Intelligence): Generative BI is one of the core capabilities of the DB-GPT project, providing the foundational data intelligence technology to build enterprise report analysis and business insights.

  • Fine-tuning Framework: Model fine-tuning is an indispensable capability for any enterprise to implement in vertical and niche domains. DB-GPT provides a complete fine-tuning framework that integrates seamlessly with the DB-GPT project. In recent fine-tuning efforts, an accuracy rate based on the Spider dataset has been achieved at 82.5%.

  • Data-Driven Multi-Agents Framework: DB-GPT offers a data-driven self-evolving multi-agents framework, aiming to continuously make decisions and execute based on data.

  • Data Factory: The Data Factory is mainly about cleaning and processing trustworthy knowledge and data in the era of large models.

  • Data Sources: Integrating various data sources to seamlessly connect production business data to the core capabilities of DB-GPT.

SubModule

  • DB-GPT-Hub Text-to-SQL workflow with high performance by applying Supervised Fine-Tuning (SFT) on Large Language Models (LLMs).

  • dbgpts dbgpts is the official repository which contains some data apps、AWEL operators、AWEL workflow templates and agents which build upon DB-GPT.

Text2SQL Finetune

  • support llms

    • LLaMA
    • LLaMA-2
    • BLOOM
    • BLOOMZ
    • Falcon
    • Baichuan
    • Baichuan2
    • InternLM
    • Qwen
    • XVERSE
    • ChatGLM2
  • SFT Accuracy As of October 10, 2023, through the fine-tuning of an open-source model with 13 billion parameters using this project, we have achieved execution accuracy on the Spider dataset that surpasses even GPT-4!

More Information about Text2SQL finetune

Install

Docker Linux macOS Windows

Usage Tutorial

Features

At present, we have introduced several key features to showcase our current capabilities:

  • Private Domain Q&A & Data Processing

    The DB-GPT project offers a range of functionalities designed to improve knowledge base construction and enable efficient storage and retrieval of both structured and unstructured data. These functionalities include built-in support for uploading multiple file formats, the ability to integrate custom data extraction plug-ins, and unified vector storage and retrieval capabilities for effectively managing large volumes of information.

  • Multi-Data Source & GBI(Generative Business intelligence)

    The DB-GPT project facilitates seamless natural language interaction with diverse data sources, including Excel, databases, and data warehouses. It simplifies the process of querying and retrieving information from these sources, empowering users to engage in intuitive conversations and gain insights. Moreover, DB-GPT supports the generation of analytical reports, providing users with valuable data summaries and interpretations.

  • Multi-Agents&Plugins

    It offers support for custom plug-ins to perform various tasks and natively integrates the Auto-GPT plug-in model. The Agents protocol adheres to the Agent Protocol standard.

  • Automated Fine-tuning text2SQL

    We've also developed an automated fine-tuning lightweight framework centred on large language models (LLMs), Text2SQL datasets, LoRA/QLoRA/Pturning, and other fine-tuning methods. This framework simplifies Text-to-SQL fine-tuning, making it as straightforward as an assembly line process. DB-GPT-Hub

  • SMMF(Service-oriented Multi-model Management Framework)

    We offer extensive model support, including dozens of large language models (LLMs) from both open-source and API agents, such as LLaMA/LLaMA2, Baichuan, ChatGLM, Wenxin, Tongyi, Zhipu, and many more.

  • Privacy and Security

    We ensure the privacy and security of data through the implementation of various technologies, including privatized large models and proxy desensitization.

  • Support Datasources

Image

🌐 AutoDL Image

Language Switching

In the .env configuration file, modify the LANGUAGE parameter to switch to different languages. The default is English (Chinese: zh, English: en, other languages to be added later).

Contribution

Contributors Wall

Licence

The MIT License (MIT)

Citation

If you find DB-GPT useful for your research or development, please cite the following paper:

@article{xue2023dbgpt,
      title={DB-GPT: Empowering Database Interactions with Private Large Language Models}, 
      author={Siqiao Xue and Caigao Jiang and Wenhui Shi and Fangyin Cheng and Keting Chen and Hongjun Yang and Zhiping Zhang and Jianshan He and Hongyang Zhang and Ganglin Wei and Wang Zhao and Fan Zhou and Danrui Qi and Hong Yi and Shaodong Liu and Faqiang Chen},
      year={2023},
      journal={arXiv preprint arXiv:2312.17449},
      url={https://arxiv.org/abs/2312.17449}
}

Contact Information

We are working on building a community, if you have any ideas for building the community, feel free to contact us.

Star History Chart

db-gpt's People

Contributors

2976151305 avatar alphahinex avatar aralhi avatar aries-ckt avatar cm-liushaodong avatar csunny avatar fangyinc avatar githubear avatar huangzhuxing avatar isadba avatar joecryptotoo avatar jsruner avatar junewgl avatar lbypatrick avatar lcxadml avatar oushu1zhangxiangxuan1 avatar qidanrui avatar quqibing avatar qutcat1997 avatar sheri528 avatar wangzaistone avatar xiuzhu9527 avatar xudafeng avatar xuyuan23 avatar yhjun1026 avatar yihong0618 avatar younisba avatar yyhhyyyyyy avatar zfanswer avatar zhanghy-sketchzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

db-gpt's Issues

安装依赖包时,报错:ERROR: No matching distribution found for chardet==5.1.0

我在安装依赖时报错,不知是什么原因造成的。
(dbgpt_env) root@autodl-container-83514cb95b-8fbc7269:~/DB-GPT# pip install -r requirements.txt
Looking in indexes: https://repo.huaweicloud.com/repository/pypi/simple
Collecting accelerate==0.16.0
Using cached https://repo.huaweicloud.com/repository/pypi/packages/dc/0c/f95215bc5f65e0a5fb97d4febce7c18420002a4c3ea5182294dc576f17fb/accelerate-0.16.0-py3-none-any.whl (199 kB)
Collecting torch==2.0.0
Using cached https://repo.huaweicloud.com/repository/pypi/packages/b6/b1/f562cb533751c272d23f605858cd17d6a6c50fa8cd3c1f99539e2acd359f/torch-2.0.0-cp310-cp310-manylinux1_x86_64.whl (619.9 MB)
Collecting aiohttp==3.8.4
Using cached https://repo.huaweicloud.com/repository/pypi/packages/81/97/90debed02e5be15d4e63fb96ba930e35b66d4e518fa7065dd442345a448b/aiohttp-3.8.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
Collecting aiosignal==1.3.1
Using cached https://repo.huaweicloud.com/repository/pypi/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting async-timeout==4.0.2
Using cached https://repo.huaweicloud.com/repository/pypi/packages/d6/c1/8991e7c5385b897b8c020cdaad718c5b087a6626d1d11a23e1ea87e325a7/async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting attrs==22.2.0
Using cached https://repo.huaweicloud.com/repository/pypi/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting bitsandbytes==0.37.0
Using cached https://repo.huaweicloud.com/repository/pypi/packages/04/31/e529ef947339eae9e2b66f4cfdc6ecbe7584c0111b0b9468b6a56e9d79e6/bitsandbytes-0.37.0-py3-none-any.whl (76.3 MB)
Collecting cchardet==2.1.7
Using cached https://repo.huaweicloud.com/repository/pypi/packages/a8/5d/090c9f0312b7988a9433246c9cf0b566b1ae1374368cfb8ac897218a4f65/cchardet-2.1.7.tar.gz (653 kB)
Preparing metadata (setup.py) ... done
ERROR: Could not find a version that satisfies the requirement chardet==5.1.0 (from versions: 1.0, 1.0.1, 1.1, 2.1.1, 2.2.1, 2.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 4.0.0, 5.0.0)
ERROR: No matching distribution found for chardet==5.1.0

langchain-vicuna

你好!我在langchain-ChatGLM看到也是基于本地模型知识库的部署。我之前也是在想将这个vicuna-13b模型接入到那个项目上,但是奈何太菜无从下手,请问这个vicuna能接到那个项目上么,我认为这样的回答可能效果更好

[BUG]: NETWORK ERROR DUE TO HIGH TRAFFIC. PLEASE REGENERATE OR REFRESH THIS PAGE. (error_code: 4)

按照知乎和 Readme 的部署教程,部署并运行服务器后出现如下的错误:

2023-05-19 18:30:05 | INFO | webserver | args: Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-19 18:30:05 | INFO | stdout | /root/DB-GPT
2023-05-19 18:30:05 | INFO | stdout |   Allowlisted Plugins: []
2023-05-19 18:30:05 | DEBUG | LOGGER | Allowlisted Plugins: []
2023-05-19 18:30:05 | INFO | stdout |   Denylisted Plugins: []
2023-05-19 18:30:05 | DEBUG | LOGGER | Denylisted Plugins: []
2023-05-19 18:30:05 | INFO | webserver | Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-19 18:30:06 | ERROR | stderr | /root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/deprecation.py:43: UserWarning: You have unused kwarg parameters in File, please remove them: {'accept_multiple_files': True}
2023-05-19 18:30:06 | ERROR | stderr |   warnings.warn(
2023-05-19 18:30:06 | INFO | stdout | Running on local URL:  http://0.0.0.0:7860
2023-05-19 18:30:06 | INFO | stdout | 
2023-05-19 18:30:06 | INFO | stdout | To create a public link, set `share=True` in `launch()`.

docker运行正常

root@iZ2zeh:~/DB-GPT# docker ps 
CONTAINER ID   IMAGE          COMMAND                  CREATED       STATUS       PORTS                                                  NAMES
453c07fd68fb   mysql:latest   "docker-entrypoint.s…"   2 hours ago   Up 2 hours   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp   mysql

如果此时提问则会报错:
image
同时日志信息:

2023-05-19 18:31:17 | INFO | stdout | 是否是AUTO-GPT模式. False
2023-05-19 18:31:17 | INFO | webserver | Requert: 
{'model': 'vicuna-13b', 'prompt': "A chat between a curious user and an artificial intelligence assistant, who very familiar with database related knowledge. The assistant gives helpful, detailed, professional and polite answers to the user's questions. ###USER: What are the key differences between mysql and postgres?###Assistant: MySQL and PostgreSQL are both popular open-source relational database management systems (RDBMS) that have many similarities but also some differences. Here are some key differences: \n1. Data Types: PostgreSQL has a more extensive set of data types, including support for array, hstore, JSON, and XML, whereas MySQL has a more limited set.\n2. ACID compliance: Both MySQL and PostgreSQL support ACID compliance (Atomicity, Consistency, Isolation, Durability), but PostgreSQL is generally considered to be more strict in enforcing it.\n3. Replication: MySQL has a built-in replication feature, which allows you to replicate data across multiple servers,whereas PostgreSQL has a similar feature, but it is not as mature as MySQL's.\n4. Performance: MySQL is generally considered to be faster and more efficient in handling large datasets, whereas PostgreSQL is known for its robustness and reliability.\n5. Licensing: MySQL is licensed under the GPL (General Public License), which means that it is free and open-source software, whereas PostgreSQL is licensed under the PostgreSQL License, which is also free and open-source but with different terms.\nUltimately, the choice between MySQL and PostgreSQL depends on the specific needs and requirements of your application. Both are excellent database management systems, and choosing the right one for your project requires careful consideration of your application's requirements, performance needs, and scalability.###USER: hi###Assistant:", 'temperature': 0.7, 'max_new_tokens': 512, 'stop': '###'}

[BUG]: 刚更新到最新的 python pilot/server/webserver.py 启动不起来了,报错如下:

刚更新到最新的 python pilot/server/webserver.py 启动不起来了,报错如下:

023-05-26 16:07:43 | INFO | webserver | Namespace(host='0.0.0.0', port=7860, concurrency_count=10, model_list_mode='once', share=False)
2023-05-26 16:07:44 | ERROR | stderr | /root/anaconda3/envs/DB-GPT/lib/python3.10/site-packages/gradio/deprecation.py:43: UserWarning: You have unused kwarg parameters in File, please remove them: {'allow_flagged_uploads': True}
2023-05-26 16:07:44 | ERROR | stderr |   warnings.warn(
2023-05-26 16:07:44 | ERROR | stderr | /root/anaconda3/envs/DB-GPT/lib/python3.10/site-packages/gradio/deprecation.py:43: UserWarning: You have unused kwarg parameters in File, please remove them: {'accept_multiple_files': True}
2023-05-26 16:07:44 | ERROR | stderr |   warnings.warn(
2023-05-26 16:07:59 | ERROR | stderr | Traceback (most recent call last):
2023-05-26 16:07:59 | ERROR | stderr |   File "/mnt/e/DB-GPT/pilot/server/webserver.py", line 753, in <module>
2023-05-26 16:07:59 | ERROR | stderr |     demo.queue(
2023-05-26 16:07:59 | ERROR | stderr |   File "/root/anaconda3/envs/DB-GPT/lib/python3.10/site-packages/gradio/blocks.py", line 1514, in launch
2023-05-26 16:07:59 | ERROR | stderr |     raise ValueError(
2023-05-26 16:07:59 | ERROR | stderr | ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True.

是不是目前还不支持CHATGLM-6B

我尝试修改了pilot/configs/model_config.py
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
LLM_MODEL_CONFIG = {
"flan-t5-base": os.path.join(MODEL_PATH, "flan-t5-base"),
"vicuna-13b": os.path.join(MODEL_PATH, "vicuna-7b"),
"chatglm-6b": os.path.join(MODEL_PATH, "chatglm-6b"),
"sentence-transforms": os.path.join(MODEL_PATH, "all-MiniLM-L6-v2")
}

VECTOR_SEARCH_TOP_K = 3
#LLM_MODEL = "vicuna-13b"
LLM_MODEL = "chatglm-6b"
LIMIT_MODEL_CONCURRENCY = 5
MAX_POSITION_EMBEDDINGS = 4096
VICUNA_MODEL_SERVER = "http://127.0.0.1:8000"
把模型换成了chatglm-6b,llmserver和webserver都能正常启动,但是CHAT的时候报错:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/applications.py", line 276, in call
await super().call(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 69, in app
await response(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 270, in call
async with anyio.create_task_group() as task_group:
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in aexit
raise exceptions[0]
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 273, in wrap
await func()
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 262, in stream_response
async for chunk in self.body_iterator:
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/concurrency.py", line 63, in iterate_in_threadpool
yield await anyio.to_thread.run_sync(_next, iterator)
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/concurrency.py", line 53, in _next
return next(iterator)
File "/home/dbgpt/DB-GPT/pilot/server/llmserver.py", line 59, in generate_stream_gate
for output in generate_stream(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 56, in generator_context
response = gen.send(request)
File "/home/dbgpt/DB-GPT/pilot/model/inference.py", line 32, in generate_stream
out = model(input_ids=torch.as_tensor([[token]], device=device),
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.cache/huggingface/modules/transformers_modules/chatglm-6b/modeling_chatglm.py", line 1158, in forward
transformer_outputs = self.transformer(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.cache/huggingface/modules/transformers_modules/chatglm-6b/modeling_chatglm.py", line 971, in forward
layer_ret = layer(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.cache/huggingface/modules/transformers_modules/chatglm-6b/modeling_chatglm.py", line 612, in forward
attention_outputs = self.attention(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.cache/huggingface/modules/transformers_modules/chatglm-6b/modeling_chatglm.py", line 452, in forward
cos, sin = self.rotary_emb(q1, seq_len=position_ids.max() + 1)
AttributeError: 'NoneType' object has no attribute 'max'

依赖无法安装

执行 pip install -r requirements

  1. 首先,缺了 .txt
  2. 提示 fschat=0.1.10 应该用 ==
  3. 再提示
ERROR: Could not find a version that satisfies the requirement torchvision==0.13.1 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.15.0, 0.15.1, 0.15.2)
ERROR: No matching distribution found for torchvision==0.13.1

[BUG]: Regarding the content of the prompt in the function of directly executing the result sql generation

关于prompt,不明白为什么不在最后加上一个类似"ASSISTENT:"的内容,目前,我发现给的prompt往往以###结尾,如

You are an AI designed to answer human questions, please follow the prompts and conventions of the system's input for your answers###human:查询aaa数据库中的所有信息###system:\nYou are a SQL expert. Given an input question, first create a syntactically correct mysql query to run, then look at the results of the query and return the answer.\nUnless the user specifies in his question a specific number of examples he wishes to obtain, always limit your query to at most 5 results. \nYou can order the results by a relevant column to return the most interesting examples in the database.\nNever query for all the columns from a specific table, only ask for a the few relevant columns given the question.\nPay attention to use only the column names that you can see in the schema description. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.\n\nOnly use the following tables:\n[('user(id,name)',)]\n\nQuestion: 查询aaa数据库中的所有信息\n\nYou must respond in JSON format as following format:\n"{\n \"thoughts\": {\n \"reasoning\": \"reasoning\",\n \"speak\": \"thoughts summary to say to user\"\n },\n \"sql\": \"SQL Query to run\"\n}"\n\nEnsure the response is correct json and can be parsed by Python json.loads\n###

这可能导致一些时候模型根本没有生成任何东西就返回了。(vicuna的role是否设为USER和ASSISTENT比较好?)
此外,不知道返回的格式能否不使用嵌套json?如,目前的返回格式为

#pilot/scene/chat_db/prompt.py
RESPONSE_FORMAT = {
    "thoughts": {
        "reasoning": "reasoning",
        "speak": "thoughts summary to say to user",
    },
    "sql": "SQL Query to run",
}

嵌套的json格式使模型很多时候即使生成了正确的sql也无法执行,因为格式出错了(╯﹏╰),能否换为一层的json,在webserver组装?目前我的应对方法是将prompt格式改为

#pilot/scene/chat_db/prompt.py
RESPONSE_FORMAT = {
    "reasoning": "reasoning",
    "speak": "thoughts summary to say to user",
    "sql": "SQL Query to run",
}

并在pilot/scene/chat_db/out_parser.py中组装

  cindex = cleaned_output.find('{')
  cleaned_output = cleaned_output[cindex:] if cindex != -1 else cleaned_output
  cleaned_output = cleaned_output[:cleaned_output.rindex('}')+ 1]
  response = json.loads(cleaned_output)
  mythoughts={
      "reasoning": response["reasoning"],
      "speak": response["speak"]
  }
  json_data = json.dumps(mythoughts, ensure_ascii=False)
  json_object = json.loads(json_data)

当然,这只针对可执行sql的选项,而不针对知识库问答,因此我不确定这样的prompt设置是否有其他作用。(因为我今天一直在研究这个功能)但仅针对直接执行结果的sql生成,这样似乎要更加稳定

报个BUG,缺少资源punkt

2023-05-17 15:54:14 | INFO | unstructured | Reading document ...
2023-05-17 15:54:14 | ERROR | stderr | Traceback (most recent call last):
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-17 15:54:14 | ERROR | stderr | output = await app.get_blocks().process_api(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-17 15:54:14 | ERROR | stderr | result = await self.call_function(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 898, in call_function
2023-05-17 15:54:14 | ERROR | stderr | prediction = await anyio.to_thread.run_sync(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-17 15:54:14 | ERROR | stderr | return await get_asynclib().run_sync_in_worker_thread(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-17 15:54:14 | ERROR | stderr | return await future
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-17 15:54:14 | ERROR | stderr | result = context.run(func, *args)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/utils.py", line 549, in async_iteration
2023-05-17 15:54:14 | ERROR | stderr | return next(iterator)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/webserver.py", line 224, in http_bot
2023-05-17 15:54:14 | ERROR | stderr | knqa = KnownLedgeBaseQA()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/vectordb_qa.py", line 14, in init
2023-05-17 15:54:14 | ERROR | stderr | self.vector_store = k2v.init_vector_store()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/vector_store/file_loader.py", line 50, in init_vector_store
2023-05-17 15:54:14 | ERROR | stderr | documents = self.load_knownlege()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/vector_store/file_loader.py", line 63, in load_knownlege
2023-05-17 15:54:14 | ERROR | stderr | docs = self._load_file(filename)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/vector_store/file_loader.py", line 82, in _load_file
2023-05-17 15:54:14 | ERROR | stderr | docs = loader.load_and_split(text_splitor)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/document_loaders/base.py", line 25, in load_and_split
2023-05-17 15:54:14 | ERROR | stderr | docs = self.load()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/document_loaders/unstructured.py", line 61, in load
2023-05-17 15:54:14 | ERROR | stderr | elements = self._get_elements()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/document_loaders/unstructured.py", line 95, in _get_elements
2023-05-17 15:54:14 | ERROR | stderr | return partition(filename=self.file_path, **self.unstructured_kwargs)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/auto.py", line 130, in partition
2023-05-17 15:54:14 | ERROR | stderr | elements = partition_md(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/md.py", line 52, in partition_md
2023-05-17 15:54:14 | ERROR | stderr | return partition_html(
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/html.py", line 91, in partition_html
2023-05-17 15:54:14 | ERROR | stderr | layout_elements = document_to_element_list(document, include_page_breaks=include_page_breaks)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/common.py", line 71, in document_to_element_list
2023-05-17 15:54:14 | ERROR | stderr | num_pages = len(document.pages)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/documents/xml.py", line 52, in pages
2023-05-17 15:54:14 | ERROR | stderr | self._pages = self._read()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/documents/html.py", line 116, in _read
2023-05-17 15:54:14 | ERROR | stderr | element = _parse_tag(tag_elem)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/documents/html.py", line 222, in _parse_tag
2023-05-17 15:54:14 | ERROR | stderr | return _text_to_element(text, tag_elem.tag, ancestortags)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/documents/html.py", line 237, in _text_to_element
2023-05-17 15:54:14 | ERROR | stderr | elif is_narrative_tag(text, tag):
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/documents/html.py", line 265, in is_narrative_tag
2023-05-17 15:54:14 | ERROR | stderr | return tag not in HEADING_TAGS and is_possible_narrative_text(text)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/text_type.py", line 76, in is_possible_narrative_text
2023-05-17 15:54:14 | ERROR | stderr | if exceeds_cap_ratio(text, threshold=cap_threshold):
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/text_type.py", line 271, in exceeds_cap_ratio
2023-05-17 15:54:14 | ERROR | stderr | if sentence_count(text, 3) > 1:
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/partition/text_type.py", line 220, in sentence_count
2023-05-17 15:54:14 | ERROR | stderr | sentences = sent_tokenize(text)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/unstructured/nlp/tokenize.py", line 38, in sent_tokenize
2023-05-17 15:54:14 | ERROR | stderr | return _sent_tokenize(text)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/nltk/tokenize/init.py", line 106, in sent_tokenize
2023-05-17 15:54:14 | ERROR | stderr | tokenizer = load(f"tokenizers/punkt/{language}.pickle")
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/nltk/data.py", line 750, in load
2023-05-17 15:54:14 | ERROR | stderr | opened_resource = _open(resource_url)
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/nltk/data.py", line 876, in open
2023-05-17 15:54:14 | ERROR | stderr | return find(path
, path + [""]).open()
2023-05-17 15:54:14 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/nltk/data.py", line 583, in find
2023-05-17 15:54:14 | ERROR | stderr | raise LookupError(resource_not_found)
2023-05-17 15:54:14 | ERROR | stderr | LookupError:
2023-05-17 15:54:14 | ERROR | stderr | **********************************************************************
2023-05-17 15:54:14 | ERROR | stderr | Resource punkt not found.
2023-05-17 15:54:14 | ERROR | stderr | Please use the NLTK Downloader to obtain the resource:
2023-05-17 15:54:14 | ERROR | stderr |
2023-05-17 15:54:14 | ERROR | stderr | >>> import nltk
2023-05-17 15:54:14 | ERROR | stderr | >>> nltk.download('punkt')
2023-05-17 15:54:14 | ERROR | stderr |
2023-05-17 15:54:14 | ERROR | stderr | For more information see: https://www.nltk.org/data.html
2023-05-17 15:54:14 | ERROR | stderr |
2023-05-17 15:54:14 | ERROR | stderr | Attempted to load tokenizers/punkt/PY3/english.pickle
2023-05-17 15:54:14 | ERROR | stderr |
2023-05-17 15:54:14 | ERROR | stderr | Searched in:
2023-05-17 15:54:14 | ERROR | stderr | - '/home/dbgpt/DB-GPT/pilot/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/home/dbgpt/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/root/miniconda3/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/root/miniconda3/share/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/root/miniconda3/lib/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/usr/share/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/usr/local/share/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/usr/lib/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - '/usr/local/lib/nltk_data'
2023-05-17 15:54:14 | ERROR | stderr | - ''
2023-05-17 15:54:14 | ERROR | stderr | *********************************************************************

[BUG]: new documents upload error.

经常添加为新知识库并上传文件后

2023-05-20 16:21:15 | ERROR | stderr | Traceback (most recent call last):
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-20 16:21:15 | ERROR | stderr |     output = await app.get_blocks().process_api(
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-20 16:21:15 | ERROR | stderr |     result = await self.call_function(
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function
2023-05-20 16:21:15 | ERROR | stderr |     prediction = await anyio.to_thread.run_sync(
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-20 16:21:15 | ERROR | stderr |     return await get_asynclib().run_sync_in_worker_thread(
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-20 16:21:15 | ERROR | stderr |     return await future
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-20 16:21:15 | ERROR | stderr |     result = context.run(func, *args)
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/DB-GPT/pilot/server/webserver.py", line 621, in knowledge_embedding_store
2023-05-20 16:21:15 | ERROR | stderr |     knowledge_embedding_client.knowledge_embedding()
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/DB-GPT/pilot/source_embedding/knowledge_embedding.py", line 28, in knowledge_embedding
2023-05-20 16:21:15 | ERROR | stderr |     self.knowledge_embedding_client.source_embedding()
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/DB-GPT/pilot/source_embedding/source_embedding.py", line 70, in source_embedding
2023-05-20 16:21:15 | ERROR | stderr |     text = self.read()
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/DB-GPT/pilot/source_embedding/pdf_embedding.py", line 27, in read
2023-05-20 16:21:15 | ERROR | stderr |     return loader.load_and_split(textsplitter)
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/langchain/document_loaders/base.py", line 25, in load_and_split
2023-05-20 16:21:15 | ERROR | stderr |     docs = self.load()
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/langchain/document_loaders/pdf.py", line 99, in load
2023-05-20 16:21:15 | ERROR | stderr |     pdf_reader = pypdf.PdfReader(pdf_file_obj)
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/pypdf/_reader.py", line 322, in __init__
2023-05-20 16:21:15 | ERROR | stderr |     self.read(stream)
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/pypdf/_reader.py", line 1505, in read
2023-05-20 16:21:15 | ERROR | stderr |     self._basic_validation(stream)
2023-05-20 16:21:15 | ERROR | stderr |   File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/pypdf/_reader.py", line 1550, in _basic_validation
2023-05-20 16:21:15 | ERROR | stderr |     raise EmptyFileError("Cannot read an empty file")
2023-05-20 16:21:15 | ERROR | stderr | pypdf.errors.EmptyFileError: Cannot read an empty file

[Feature]: Reduce the llm request count for the low time cost

Is your feature request related to a problem? Please describe.

Awesome project!!! I will take less time to write duplicate or similar sql. Usually llm reasoning takes a long time, and it takes longer to process Chinese than English. Maybe there are some ways to reduce the response time, and at the same time reduce the pressure on computer resources. And I believe it will make the project more attractive.

Describe the solution you'd like

GPTCache is a semantic cache library for LLMs, and it's fully integrated with LangChain and llama_index. Also when you encounter some problems about the usage, I am willing to provide a range of help.

[BUG]: local documents for Q&A error:IndexError: list index out of range

Describe the bug
要加载一个中文txt文件,作为知识库。
执行”上传并加载到知识库“时报错,
看到后台的错误输出如下:
2023-05-21 11:15:15 | INFO | sentence_transformers.SentenceTransformer | Load pretrained SentenceTransformer: /root/autodl-tmp/models/text2vec-large-chinese
2023-05-21 11:15:15 | WARNING | sentence_transformers.SentenceTransformer | No sentence-transformers model found with name /root/autodl-tmp/models/text2vec-large-chinese. Creating a new one with MEAN pooling.
2023-05-21 11:15:19 | INFO | sentence_transformers.SentenceTransformer | Use pytorch device: cuda
2023-05-21 11:15:19 | INFO | sentence_transformers.SentenceTransformer | Load pretrained SentenceTransformer: /root/autodl-tmp/models/text2vec-large-chinese
2023-05-21 11:15:19 | WARNING | sentence_transformers.SentenceTransformer | No sentence-transformers model found with name /root/autodl-tmp/models/text2vec-large-chinese. Creating a new one with MEAN pooling.
2023-05-21 11:15:24 | INFO | sentence_transformers.SentenceTransformer | Use pytorch device: cuda
2023-05-21 11:15:24 | INFO | chromadb.telemetry.posthog | Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
2023-05-21 11:15:24 | INFO | chromadb | Running Chroma using direct local API.
2023-05-21 11:15:24 | WARNING | chromadb | Using embedded DuckDB with persistence: data will be stored in: /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb
2023-05-21 11:15:24 | INFO | clickhouse_connect.driver.ctypes | Successfully imported ClickHouse Connect C data optimizations
2023-05-21 11:15:24 | INFO | clickhouse_connect.driver.ctypes | Successfully import ClickHouse Connect C/Numpy optimizations
2023-05-21 11:15:24 | INFO | clickhouse_connect.json_impl | Using orjson library for writing JSON byte strings
2023-05-21 11:15:24 | INFO | chromadb.db.duckdb | No existing DB found in /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb, skipping load
2023-05-21 11:15:24 | INFO | chromadb.db.duckdb | No existing DB found in /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb, skipping load
2023-05-21 11:15:24 | INFO | chromadb.telemetry.posthog | Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
2023-05-21 11:15:24 | INFO | chromadb | Running Chroma using direct local API.
2023-05-21 11:15:24 | WARNING | chromadb | Using embedded DuckDB with persistence: data will be stored in: /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb
2023-05-21 11:15:24 | INFO | chromadb.db.duckdb | No existing DB found in /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb, skipping load
2023-05-21 11:15:24 | INFO | chromadb.db.duckdb | No existing DB found in /root/autodl-tmp/DB-GPT/pilot/data/DataDictionary.vectordb, skipping load
Batches: 0it [00:00, ?it/s] | stderr |
Batches: 0it [00:00, ?it/s] | stderr |
2023-05-21 11:15:25 | ERROR | stderr |
2023-05-21 11:15:25 | ERROR | stderr | Traceback (most recent call last):
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-21 11:15:25 | ERROR | stderr | output = await app.get_blocks().process_api(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-21 11:15:25 | ERROR | stderr | result = await self.call_function(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function
2023-05-21 11:15:25 | ERROR | stderr | prediction = await anyio.to_thread.run_sync(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-21 11:15:25 | ERROR | stderr | return await get_asynclib().run_sync_in_worker_thread(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-21 11:15:25 | ERROR | stderr | return await future
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-21 11:15:25 | ERROR | stderr | result = context.run(func, *args)
2023-05-21 11:15:25 | ERROR | stderr | File "/root/autodl-tmp/DB-GPT/pilot/server/webserver.py", line 622, in knowledge_embedding_store
2023-05-21 11:15:25 | ERROR | stderr | knowledge_embedding_client.knowledge_embedding()
2023-05-21 11:15:25 | ERROR | stderr | File "/root/autodl-tmp/DB-GPT/pilot/source_embedding/knowledge_embedding.py", line 28, in knowledge_embedding
2023-05-21 11:15:25 | ERROR | stderr | self.knowledge_embedding_client.source_embedding()
2023-05-21 11:15:25 | ERROR | stderr | File "/root/autodl-tmp/DB-GPT/pilot/source_embedding/source_embedding.py", line 78, in source_embedding
2023-05-21 11:15:25 | ERROR | stderr | self.index_to_store(text)
2023-05-21 11:15:25 | ERROR | stderr | File "/root/autodl-tmp/DB-GPT/pilot/source_embedding/source_embedding.py", line 59, in index_to_store
2023-05-21 11:15:25 | ERROR | stderr | self.vector_store = Chroma.from_documents(docs, self.embeddings, persist_directory=persist_dir)
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 338, in from_documents
2023-05-21 11:15:25 | ERROR | stderr | return cls.from_texts(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 307, in from_texts
2023-05-21 11:15:25 | ERROR | stderr | chroma_collection.add_texts(texts=texts, metadatas=metadatas, ids=ids)
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 116, in add_texts
2023-05-21 11:15:25 | ERROR | stderr | self._collection.add(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 101, in add
2023-05-21 11:15:25 | ERROR | stderr | ids, embeddings, metadatas, documents = self._validate_embedding_set(
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 348, in _validate_embedding_set
2023-05-21 11:15:25 | ERROR | stderr | ids = validate_ids(maybe_cast_one_to_many(ids))
2023-05-21 11:15:25 | ERROR | stderr | File "/root/miniconda3/envs/dbgpt_env/lib/python3.10/site-packages/chromadb/api/types.py", line 77, in maybe_cast_one_to_many
2023-05-21 11:15:25 | ERROR | stderr | if isinstance(target[0], (int, float)):
2023-05-21 11:15:25 | ERROR | stderr | IndexError: list index out of range

  1. Click on '....'
  2. Scroll down to '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

can't execute sql successfully

不执行sql勉强能写出sql语句。但执行以后直接报错。
image
image
打印了一下json_to_load是个string不是json。

[BUG]: 设置num_gpus=2后,显存溢出

推理过程:
将llmserver中修改为: ml.loader(num_gpus=2, load_8bit=ISLOAD_8BIT, debug=ISDEBUG)
OutOfMemoryError: CUDA out of memory.,设备为两张3090,所用的模型为:Tribbiani/vicuna-13b,
是否还需要别的设置

更新了最新的DB-GPT后,默认知识库对话出现乱码

不断生成乱七八糟的数据,显卡内存暴增。重启llmserver和webserver后可以正常对话正常。

(base) root@dbaiops:~#

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/applications.py", line 276, in call
await super().call(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 69, in app
await response(scope, receive, send)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 270, in call
async with anyio.create_task_group() as task_group:
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in aexit
raise exceptions[0]
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 273, in wrap
await func()
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/responses.py", line 262, in stream_response
async for chunk in self.body_iterator:
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/concurrency.py", line 63, in iterate_in_threadpool
yield await anyio.to_thread.run_sync(_next, iterator)
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/concurrency.py", line 53, in _next
return next(iterator)
File "/home/dbgpt/DB-GPT-main/pilot/server/llmserver.py", line 66, in generate_stream_gate
for output in generate_stream(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "/home/dbgpt/DB-GPT-main/pilot/model/inference.py", line 25, in generate_stream
out = model(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 687, in forward
outputs = self.model(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 577, in forward
layer_outputs = decoder_layer(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 292, in forward
hidden_states, self_attn_weights, present_key_value = self.self_attn(
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 231, in forward
attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query_states.dtype)
File "/home/dbgpt/.local/lib/python3.10/site-packages/torch/nn/functional.py", line 1845, in softmax
ret = input.softmax(dim, dtype=dtype)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1.79 GiB (GPU 0; 23.69 GiB total capacity; 15.44 GiB already allocated; 1.73 GiB free; 19.52 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

(base) root@dbaiops:~# nvidia-smi
Fri May 19 10:02:02 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.17 Driver Version: 525.105.17 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 63% 44C P8 28W / 370W | 22491MiB / 24576MiB | 1% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 1101 G /usr/lib/xorg/Xorg 85MiB |
| 0 N/A N/A 5442 C python3 21006MiB |
| 0 N/A N/A 5583 C python3 1396MiB |
+-----------------------------------------------------------------------------+
(base) root@dbaiops:~#

用自定义文件替换原有oceanbase知识库报错

我将datasets中的Oceanbase知识库删除,加入了自定义的知识库文件。矢量化的时候报错:
2023-05-18 17:13:25 | INFO | sentence_transformers.SentenceTransformer | Load pretrained SentenceTransformer: /home/dbgpt/DB-GPT/models/all-MiniLM-L6-v2
2023-05-18 17:13:26 | INFO | sentence_transformers.SentenceTransformer | Use pytorch device: cuda
2023-05-18 17:13:26 | INFO | stdout | 向量数据库持久化地址: /home/dbgpt/DB-GPT/pilot/vector_store/.vectordb
2023-05-18 17:13:26 | INFO | unstructured | Reading document from string ...
2023-05-18 17:13:26 | INFO | unstructured | Reading document ...
2023-05-18 17:13:26 | INFO | stdout | 文档2向量初始化中, 请稍等... {'source': '/oracle/oracle.md'}
2023-05-18 17:13:26 | INFO | chromadb.telemetry.posthog | Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
2023-05-18 17:13:26 | INFO | chromadb | Running Chroma using direct local API.
2023-05-18 17:13:26 | WARNING | chromadb | Using embedded DuckDB with persistence: data will be stored in: /home/dbgpt/DB-GPT/pilot/vector_store/.vectordb
2023-05-18 17:13:26 | INFO | clickhouse_connect.driver.ctypes | Successfully imported ClickHouse Connect C data optimizations
2023-05-18 17:13:26 | INFO | clickhouse_connect.driver.ctypes | Successfully import ClickHouse Connect C/Numpy optimizations
2023-05-18 17:13:26 | INFO | clickhouse_connect.json_impl | Using orjson library for writing JSON byte strings
2023-05-18 17:13:26 | INFO | chromadb.db.duckdb | No existing DB found in /home/dbgpt/DB-GPT/pilot/vector_store/.vectordb, skipping load
2023-05-18 17:13:26 | INFO | chromadb.db.duckdb | No existing DB found in /home/dbgpt/DB-GPT/pilot/vector_store/.vectordb, skipping load
Batches: 0%| | 0/1 [00:00<?, ?it/s]
Batches: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.90it/s]
Batches: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.89it/s]
2023-05-18 17:13:27 | ERROR | stderr |
2023-05-18 17:13:27 | INFO | chromadb.db.duckdb | Persisting DB to disk, putting it in the save folder: /home/dbgpt/DB-GPT/pilot/vector_store/.vectordb
Batches: 0%| | 0/1 [00:00<?, ?it/s]
Batches: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 365.77it/s]
2023-05-18 17:13:27 | ERROR | stderr |
2023-05-18 17:13:27 | ERROR | stderr | Traceback (most recent call last):
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-18 17:13:27 | ERROR | stderr | output = await app.get_blocks().process_api(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-18 17:13:27 | ERROR | stderr | result = await self.call_function(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 898, in call_function
2023-05-18 17:13:27 | ERROR | stderr | prediction = await anyio.to_thread.run_sync(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-18 17:13:27 | ERROR | stderr | return await get_asynclib().run_sync_in_worker_thread(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-18 17:13:27 | ERROR | stderr | return await future
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-18 17:13:27 | ERROR | stderr | result = context.run(func, *args)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/utils.py", line 549, in async_iteration
2023-05-18 17:13:27 | ERROR | stderr | return next(iterator)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/webserver.py", line 225, in http_bot
2023-05-18 17:13:27 | ERROR | stderr | state.messages[-2][1] = knqa.get_similar_answer(query)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/vectordb_qa.py", line 25, in get_similar_answer
2023-05-18 17:13:27 | ERROR | stderr | docs = retriever.get_relevant_documents(query=query)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/base.py", line 279, in get_relevant_documents
2023-05-18 17:13:27 | ERROR | stderr | docs = self.vectorstore.similarity_search(query, **self.search_kwargs)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 138, in similarity_search
2023-05-18 17:13:27 | ERROR | stderr | docs_and_scores = self.similarity_search_with_score(query, k, filter=filter)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 184, in similarity_search_with_score
2023-05-18 17:13:27 | ERROR | stderr | results = self._collection.query(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 219, in query
2023-05-18 17:13:27 | ERROR | stderr | return self._client._query(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/api/local.py", line 408, in _query
2023-05-18 17:13:27 | ERROR | stderr | uuids, distances = self._db.get_nearest_neighbors(
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/db/clickhouse.py", line 583, in get_nearest_neighbors
2023-05-18 17:13:27 | ERROR | stderr | uuids, distances = index.get_nearest_neighbors(embeddings, n_results, ids)
2023-05-18 17:13:27 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/db/index/hnswlib.py", line 238, in get_nearest_neighbors
2023-05-18 17:13:27 | ERROR | stderr | raise NotEnoughElementsException(
2023-05-18 17:13:27 | ERROR | stderr | chromadb.errors.NotEnoughElementsException: Number of requested results 5 cannot be greater than number of elements in index 1

No module named pilot

What i did:
According to the readme document step by step, there is still this problem.

Issue:
Traceback (most recent call last): File "/home/xx/workspace/pycharm_projects/DB-GPT/pilot/server/llmserver.py", line 10, in <module> from pilot.model.inference import generate_stream ModuleNotFoundError: No module named 'pilot'

试用报错,ModuleNotFoundError: No module named 'pilot'

我的环境用的是AnaConda3,
(dbgpt_env) root@lingzhiserver:/home/lingzhi/workspace/LLMS/DB-GPT/pilot/server# python llmserver.py
Traceback (most recent call last):
File "/home/lingzhi/workspace/LLMS/DB-GPT/pilot/server/llmserver.py", line 10, in
from pilot.model.inference import generate_stream
ModuleNotFoundError: No module named 'pilot'

另外,在运行此之前,我执行了echo "/home/lingzhi/workspace/LLMS/DB-GPT" > /root/anaconda3/envs/dbgpt_env/lib/python3.10/site-packages/dbgpt.pth

Originally posted by @podanshu in #40 (comment)

requirements.txt all messed up [BUG]:

Took me like 2hrs to go down to just:
The conflict is caused by:
The user requested sentence-transformers<=2.1.0
chromadb 0.1.0 depends on sentence-transformers~=2.2.2

Couldn't make it work

安装完毕后对话报错

我用了本地下载的7b模型,放到DB-GPT/models下,llmserver可以正常启动,webserver也能启动,对话中报错
NETWORK ERROR DUE TO HIGH TRAFFIC. PLEASE REGENERATE OR REFRESH THIS PAGE. (error_code: 4)

后台WEB SERVER报错
playsound is relying on another python subprocess. Please use pip install pygobject if you want playsound to run more efficiently.
2023-05-16 17:59:55 | INFO | webserver | args: Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-16 17:59:55 | INFO | stdout | /home/dbgpt/DB-GPT/pilot/server
2023-05-16 17:59:55 | INFO | stdout | Allowlisted Plugins: []
2023-05-16 17:59:55 | DEBUG | LOGGER | Allowlisted Plugins: []
2023-05-16 17:59:55 | INFO | stdout | Denylisted Plugins: []
2023-05-16 17:59:55 | DEBUG | LOGGER | Denylisted Plugins: []
2023-05-16 17:59:55 | INFO | webserver | Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-16 18:00:06 | INFO | stdout | Running on local URL: http://0.0.0.0:7860
2023-05-16 18:00:06 | INFO | stdout |
2023-05-16 18:00:06 | INFO | stdout | To create a public link, set share=True in launch().
2023-05-16 18:00:21 | ERROR | stderr | ERROR: Exception in ASGI application
2023-05-16 18:00:21 | ERROR | stderr | Traceback (most recent call last):
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/protocols/websockets/websockets_impl.py", line 254, in run_asgi
2023-05-16 18:00:21 | ERROR | stderr | result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
2023-05-16 18:00:21 | ERROR | stderr | return await self.app(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/applications.py", line 276, in call
2023-05-16 18:00:21 | ERROR | stderr | await super().call(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/applications.py", line 122, in call
2023-05-16 18:00:21 | ERROR | stderr | await self.middleware_stack(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 149, in call
2023-05-16 18:00:21 | ERROR | stderr | await self.app(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 76, in call
2023-05-16 18:00:21 | ERROR | stderr | await self.app(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 79, in call
2023-05-16 18:00:21 | ERROR | stderr | raise exc
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 68, in call
2023-05-16 18:00:21 | ERROR | stderr | await self.app(scope, receive, sender)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
2023-05-16 18:00:21 | ERROR | stderr | raise e
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
2023-05-16 18:00:21 | ERROR | stderr | await self.app(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 718, in call
2023-05-16 18:00:21 | ERROR | stderr | await route.handle(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 341, in handle
2023-05-16 18:00:21 | ERROR | stderr | await self.app(scope, receive, send)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/routing.py", line 82, in app
2023-05-16 18:00:21 | ERROR | stderr | await func(session)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/fastapi/routing.py", line 289, in app
2023-05-16 18:00:21 | ERROR | stderr | await dependant.call(**values)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/routes.py", line 502, in join_queue
2023-05-16 18:00:21 | ERROR | stderr | session_info = await asyncio.wait_for(
2023-05-16 18:00:21 | ERROR | stderr | File "/root/miniconda3/lib/python3.10/asyncio/tasks.py", line 445, in wait_for
2023-05-16 18:00:21 | ERROR | stderr | return fut.result()
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/websockets.py", line 133, in receive_json
2023-05-16 18:00:21 | ERROR | stderr | self._raise_on_disconnect(message)
2023-05-16 18:00:21 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/starlette/websockets.py", line 105, in _raise_on_disconnect
2023-05-16 18:00:21 | ERROR | stderr | raise WebSocketDisconnect(message["code"])
2023-05-16 18:00:21 | ERROR | stderr | starlette.websockets.WebSocketDisconnect: 1001
2023-05-16 18:00:22 | INFO | webserver | load_demo. ip: 127.0.0.1. params: {'__theme': 'dark'}

[Feature]:

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

默认知识库问答是使用了预训练模型还是上传的文本?

知识问答时选择使用默认知识库问答,WEB报错,看错误信息是缺少all-MiniLM-L6-v2 模型,这个模型是默认知识问答所使用的模型吗?这个模型是使用什么资料训练的?知识库使用的是预训练模型还是矢量化的文档?
2023-05-17 14:40:16 | INFO | sentence_transformers.SentenceTransformer | Load pretrained SentenceTransformer: /home/dbgpt/DB-GPT/models/all-MiniLM-L6-v2
2023-05-17 14:40:16 | ERROR | stderr | Traceback (most recent call last):
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-17 14:40:16 | ERROR | stderr | output = await app.get_blocks().process_api(
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-17 14:40:16 | ERROR | stderr | result = await self.call_function(
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 898, in call_function
2023-05-17 14:40:16 | ERROR | stderr | prediction = await anyio.to_thread.run_sync(
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-17 14:40:16 | ERROR | stderr | return await get_asynclib().run_sync_in_worker_thread(
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-17 14:40:16 | ERROR | stderr | return await future
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-17 14:40:16 | ERROR | stderr | result = context.run(func, *args)
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/utils.py", line 549, in async_iteration
2023-05-17 14:40:16 | ERROR | stderr | return next(iterator)
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/webserver.py", line 224, in http_bot
2023-05-17 14:40:16 | ERROR | stderr | knqa = KnownLedgeBaseQA()
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/server/vectordb_qa.py", line 13, in init
2023-05-17 14:40:16 | ERROR | stderr | k2v = KnownLedge2Vector()
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/DB-GPT/pilot/vector_store/file_loader.py", line 39, in init
2023-05-17 14:40:16 | ERROR | stderr | self.embeddings = HuggingFaceEmbeddings(model_name=self.model_name)
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/embeddings/huggingface.py", line 39, in init
2023-05-17 14:40:16 | ERROR | stderr | self.client = sentence_transformers.SentenceTransformer(self.model_name)
2023-05-17 14:40:16 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/sentence_transformers/SentenceTransformer.py", line 77, in init
2023-05-17 14:40:16 | ERROR | stderr | raise ValueError("Path {} not found".format(model_name_or_path))
2023-05-17 14:40:16 | ERROR | stderr | ValueError: Path /home/dbgpt/DB-GPT/models/all-MiniLM-L6-v2 not found

[Feature]: Is fintune used to do your own finetune to vicuna-13b?

Is your feature request related to a problem? Please describe.
看到pilot目录下有个finetune的工具,这个目前已经可以用了吗?可以直接用来对vicuna-13b做微调训练吗?
Describe the solution you'd like*
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

如何使用本地下载的vicuna-7b?

我本地下载了vicuna-7b,不过运行时报错:

"llmserver.py" 127L, 3499C 已写入
dbgpt@dbaiops:~/DB-GPT/pilot/server$ python3 llmserver.py
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/home/dbgpt/DB-GPT/models/vicuna-7b
Traceback (most recent call last):
File "/home/dbgpt/DB-GPT/pilot/server/llmserver.py", line 25, in
model, tokenizer = ml.loader(num_gpus=1, load_8bit=True, debug=False)
File "/home/dbgpt/DB-GPT/pilot/model/loader.py", line 56, in loader
tokenizer = AutoTokenizer.from_pretrained(self.model_path, use_fast=False)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 642, in from_pretrained
tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 486, in get_tokenizer_config
resolved_config_file = cached_file(
File "/home/dbgpt/.local/lib/python3.10/site-packages/transformers/utils/hub.py", line 409, in cached_file
resolved_file = hf_hub_download(
File "/home/dbgpt/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 112, in _inner_fn
validate_repo_id(arg_value)
File "/home/dbgpt/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 160, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/home/dbgpt/DB-GPT/models/vicuna-7b'. Use repo_type argument if needed.

model_config.py是如下修改的,是不是有什么没有配置对?
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
LLM_MODEL_CONFIG = {
"flan-t5-base": os.path.join(MODEL_PATH, "flan-t5-base"),
"vicuna-7b": os.path.join(MODEL_PATH, "vicuna-7b"),
"sentence-transforms": os.path.join(MODEL_PATH, "all-MiniLM-L6-v2")
}
VECTOR_SEARCH_TOP_K = 3
LLM_MODEL = "vicuna-7b"
LIMIT_MODEL_CONCURRENCY = 5
MAX_POSITION_EMBEDDINGS = 4096
VICUNA_MODEL_SERVER = "http://121.41.167.183:8000"

[BUG]: An error occurred after the default quiz used its own file

Describe the bug
我在datasets中用我自己定义的文件替代了Oceanbase的那个文件。进行对话后报错。
To Reproduce
Steps to reproduce the behavior:
1、将目前生成的.vector_store删除
2、将Oceanbase中的文件删除,放入我自定义的文件,格式如下:

本知识库包含了Oracle错误代码对应的错误原因,通过检索该文档可以找到相关错误信息对应的中文解释
ORA-00001:错误的原因为违反唯一约束条件 (.)
ORA-00017:错误的原因为请求会话以设置跟踪事件
ORA-00018:错误的原因为超出最大会话数
ORA-00019:错误的原因为超出最大会话许可数
ORA-00020:错误的原因为超出最大进程数 ()
ORA-00021:错误的原因为会话附属于其它某些进程;无法转换会话
ORA-00022:错误的原因为无效的会话 ID;访问被拒绝
ORA-00023:错误的原因为会话引用进程私用内存;无法分离会话
ORA-00024:错误的原因为单一进程模式下不允许从多个进程注册
ORA-00025:错误的原因为无法分配
ORA-00026:错误的原因为丢失或无效的会话 ID
ORA-00027:错误的原因为无法删去当前会话
ORA-00028:错误的原因为您的会话己被删去
ORA-00029:错误的原因为会话不是用户会话
ORA-00030:错误的原因为用户会话 ID 不存在。
ORA-00031:错误的原因为标记要删去的会话

3、重新启动WEBSERVER
4、使用默认知识问答,提问ORA-01110错误的原因是什么
5. See error
(dbgpt_env) dbgpt@dbaiops:~/DB-GPT-main/pilot/server$ python3 webserver.py
playsound is relying on another python subprocess. Please use pip install pygobject if you want playsound to run more efficiently.
2023-05-20 08:57:00 | INFO | webserver | args: Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-20 08:57:00 | INFO | stdout | /home/dbgpt/DB-GPT-main/pilot/server
2023-05-20 08:57:00 | INFO | stdout | Allowlisted Plugins: []
2023-05-20 08:57:00 | DEBUG | LOGGER | Allowlisted Plugins: []
2023-05-20 08:57:00 | INFO | stdout | Denylisted Plugins: []
2023-05-20 08:57:00 | DEBUG | LOGGER | Denylisted Plugins: []
2023-05-20 08:57:00 | INFO | webserver | Namespace(host='0.0.0.0', port=None, concurrency_count=10, model_list_mode='once', share=False)
2023-05-20 08:57:01 | ERROR | stderr | /home/dbgpt/.local/lib/python3.10/site-packages/gradio/deprecation.py:43: UserWarning: You have unused kwarg parameters in File, please remove them: {'accept_multiple_files': True}
2023-05-20 08:57:01 | ERROR | stderr | warnings.warn(
2023-05-20 08:57:01 | INFO | stdout | Running on local URL: http://0.0.0.0:7860
2023-05-20 08:57:01 | INFO | stdout |
2023-05-20 08:57:01 | INFO | stdout | To create a public link, set share=True in launch().
2023-05-20 08:57:06 | INFO | webserver | load_demo. ip: 172.16.1.247. params: {'__theme': 'dark'}
2023-05-20 08:57:23 | INFO | webserver | add_text. ip: 172.16.1.247. len: 17
2023-05-20 08:57:23 | INFO | stdout | 是否是AUTO-GPT模式. False
2023-05-20 08:57:24 | INFO | sentence_transformers.SentenceTransformer | Load pretrained SentenceTransformer: /home/dbgpt/DB-GPT-main/models/all-MiniLM-L6-v2
2023-05-20 08:57:24 | INFO | sentence_transformers.SentenceTransformer | Use pytorch device: cuda
2023-05-20 08:57:24 | INFO | stdout | Vector store Persist address is: /home/dbgpt/DB-GPT-main/pilot/vector_store/.vectordb
2023-05-20 08:57:24 | INFO | stdout | Loader data from local persist vector file...
2023-05-20 08:57:24 | INFO | chromadb.telemetry.posthog | Anonymized telemetry enabled. See https://docs.trychroma.com/telemetry for more information.
2023-05-20 08:57:24 | INFO | chromadb | Running Chroma using direct local API.
2023-05-20 08:57:24 | WARNING | chromadb | Using embedded DuckDB with persistence: data will be stored in: /home/dbgpt/DB-GPT-main/pilot/vector_store/.vectordb
2023-05-20 08:57:24 | INFO | clickhouse_connect.driver.ctypes | Successfully imported ClickHouse Connect C data optimizations
2023-05-20 08:57:24 | INFO | clickhouse_connect.driver.ctypes | Successfully import ClickHouse Connect C/Numpy optimizations
2023-05-20 08:57:24 | INFO | clickhouse_connect.json_impl | Using orjson library for writing JSON byte strings
2023-05-20 08:57:24 | INFO | chromadb.db.duckdb | loaded in 1 embeddings
2023-05-20 08:57:24 | INFO | chromadb.db.duckdb | loaded in 1 collections
2023-05-20 08:57:24 | INFO | chromadb.db.duckdb | collection with name langchain already exists, returning existing collection
Batches: 0%| | 0/1 [00:00<?, ?it/s]
Batches: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.98it/s]
Batches: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.98it/s]
2023-05-20 08:57:25 | ERROR | stderr |
2023-05-20 08:57:25 | ERROR | stderr | Traceback (most recent call last):
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict
2023-05-20 08:57:25 | ERROR | stderr | output = await app.get_blocks().process_api(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api
2023-05-20 08:57:25 | ERROR | stderr | result = await self.call_function(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/blocks.py", line 898, in call_function
2023-05-20 08:57:25 | ERROR | stderr | prediction = await anyio.to_thread.run_sync(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
2023-05-20 08:57:25 | ERROR | stderr | return await get_asynclib().run_sync_in_worker_thread(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
2023-05-20 08:57:25 | ERROR | stderr | return await future
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
2023-05-20 08:57:25 | ERROR | stderr | result = context.run(func, *args)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/gradio/utils.py", line 549, in async_iteration
2023-05-20 08:57:25 | ERROR | stderr | return next(iterator)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/DB-GPT-main/pilot/server/webserver.py", line 264, in http_bot
2023-05-20 08:57:25 | ERROR | stderr | state.messages[-2][1] = knqa.get_similar_answer(query)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/DB-GPT-main/pilot/server/vectordb_qa.py", line 25, in get_similar_answer
2023-05-20 08:57:25 | ERROR | stderr | docs = retriever.get_relevant_documents(query=query)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/base.py", line 279, in get_relevant_documents
2023-05-20 08:57:25 | ERROR | stderr | docs = self.vectorstore.similarity_search(query, **self.search_kwargs)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 138, in similarity_search
2023-05-20 08:57:25 | ERROR | stderr | docs_and_scores = self.similarity_search_with_score(query, k, filter=filter)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/langchain/vectorstores/chroma.py", line 184, in similarity_search_with_score
2023-05-20 08:57:25 | ERROR | stderr | results = self._collection.query(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/api/models/Collection.py", line 219, in query
2023-05-20 08:57:25 | ERROR | stderr | return self._client._query(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/api/local.py", line 408, in _query
2023-05-20 08:57:25 | ERROR | stderr | uuids, distances = self._db.get_nearest_neighbors(
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/db/clickhouse.py", line 583, in get_nearest_neighbors
2023-05-20 08:57:25 | ERROR | stderr | uuids, distances = index.get_nearest_neighbors(embeddings, n_results, ids)
2023-05-20 08:57:25 | ERROR | stderr | File "/home/dbgpt/.local/lib/python3.10/site-packages/chromadb/db/index/hnswlib.py", line 238, in get_nearest_neighbors
2023-05-20 08:57:25 | ERROR | stderr | raise NotEnoughElementsException(
2023-05-20 08:57:25 | ERROR | stderr | chromadb.errors.NotEnoughElementsException: Number of requested results 10 cannot be greater than number of elements in index 1

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

自己的知识库生成的是乱码?

环境:
vicuna-13b 的基础模型
ubuntu18.04.6
其他环境按照 ReadMe 所建立

我的知识库文件:(部分)
image

问题:

image

已经尝试过了:
1,重启server,重启webserver. 还是得到一样的结果

llm server 后台日志如下:
image
webserver 后台日志如下
image

intall failed

No such file or directory Traceback (most recent call last):
File "/content/DB-GPT/pilot/server/vicuna_server.py", line 10, in
from pilot.model.inference import generate_stream
ModuleNotFoundError: No module named 'pilot'
Traceback (most recent call last):
File "/content/DB-GPT/pilot/server/vicuna_server.py", line 10, in
from pilot.model.inference import generate_stream
ModuleNotFoundError: No module named 'pilot'

webUI不能打开This site can’t be reached

llmserver.py已经成功运行
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
开另一个bash运行webserver.py显示
| INFO | stdout | Running on local URL: http://0.0.0.0:7860
但是点开上面的url不能打开webUI:
This site can’t be reached
The webpage at http://0.0.0.0:7860/ might be temporarily down or it may have moved permanently to a new web address.
ERR_ADDRESS_INVALID

是什么地方没有设置吗?我把MODEL_SERVER = "http://0.0.0.0:8000" 也不行

[BUG]: get_gpu_memory

def get_gpu_memory(max_gpus=None):
gpu_memory = []
num_gpus = (
torch.cuda.device_count()
if max_gpus is None
else min(max_gpus, torch.cuda.device_count())
)

for gpu_id in range(num_gpus):
    with torch.cuda.device(gpu_id):
        device = torch.cuda.current_device()
        gpu_properties = torch.cuda.get_device_properties(device)
        total_memory = gpu_properties.total_memory / (1024 ** 3)
        allocated_memory = torch.cuda.memory_allocated() / (1024 ** 3)
        available_memory = total_memory - allocated_memory
        gpu_memory.append(available_memory)
    return gpu_memory

Should the return here be aligned with "for"?

How could I convert my model to hf

Hi, I'm new to this huggingface transformation.
I now have:

  • vicuuna13b.pth(which i finetune with my data)

I want to convert it into a huggingface model like yours repo [https://huggingface.co/Tribbiani/vicuna-7b/tree/main]

  • config.json
  • generation_config.json
  • pytorch_model-00001-of-00002.bin
  • pytorch_model-00002-of-00002.bin
  • pytorch_model.bin.index.json
  • special_tokens_map.json
  • tokenizer.json
  • tokenizer_config.json

What should I do to have these files under a repo like yours? Can you be more specific?

[BUG]: 直接执行结果sql生成功能中,无法操作数据库,需要修改sql_database.py

DB-GPT/pilot/common/sql_database.py文件中的run方法需要添加
session.commit()
否则在插入时会出现插入了但没有完全插入的问题....
img_v2_26ab917e-bfcf-4acf-af71-81875ef7a0eg
(插入了,但没有完全插入)
而且由于insert命令不返回任何值, 将在前端导致None的错误。
我的修改如下

    def convert_to_select(self, query):
        # 将SQL命令转换为小写,并按空格拆分
        parts = query.lower().split()

        # 获取命令类型(insert, delete, update)
        cmd_type = parts[0]

        # 根据命令类型进行处理
        if cmd_type == 'insert':
            match = re.match(r"insert into (\w+) \((.*?)\) values \((.*?)\)", query.lower())
            if match:
                table_name, columns, values = match.groups()
                # 将字段列表和值列表分割为单独的字段和值
                columns = columns.split(',')
                values = values.split(',')
                # 构造 WHERE 子句
                where_clause = " AND ".join([f"{col.strip()}={val.strip()}" for col, val in zip(columns, values)])
                return f'SELECT * FROM {table_name} WHERE {where_clause}'

        elif cmd_type == 'delete':
            table_name = parts[2]  # delete from <table_name> ...
            # 返回一个select语句,它选择该表的所有数据
            return f'SELECT * FROM {table_name}'

        elif cmd_type == 'update':
            table_name = parts[1]
            set_idx = parts.index('set')
            where_idx = parts.index('where')
            # 截取 `set` 子句中的字段名
            set_clause = parts[set_idx+1 : where_idx][0].split('=')[0].strip()
            # 截取 `where` 之后的条件语句
            where_clause = ' '.join(parts[where_idx+1 : ])
            # 返回一个select语句,它选择更新的数据
            return f'SELECT {set_clause} FROM {table_name} WHERE {where_clause}'
        elif cmd_type == 'select':
            return query
        else:
            raise ValueError(f"Unsupported SQL command type: {cmd_type}")

    
    def run(self, session, command: str, fetch: str = "all") -> List:
        """Execute a SQL command and return a string representing the results."""
        cursor = session.execute(text(command))
        parts = command.lower().split()
        cmd_type = parts[0]
        if not 'select'==cmd_type:
            db_name=self.get_current_db_name(session)
            session.commit()
            session.execute(text(f"use `{db_name}`"))
            select_sql = self.convert_to_select(command)
            cursor = session.execute(text(select_sql))
        if cursor.returns_rows:
            if fetch == "all":
                result = cursor.fetchall()
            elif fetch == "one":
                result = cursor.fetchone()[0]  # type: ignore
            else:
                raise ValueError("Fetch parameter must be either 'one' or 'all'")
            field_names = tuple(i[0:] for i in cursor.keys())

            result = list(result)
            result.insert(0, field_names)
            return result

            result = list(result)
            result.insert(0, field_names)
            return result

效果如下:
image
image

(pull的是26号早上的,不知道现在有没有修复)希望有所帮助

Spelling mistake

Hi,

just wanted to let you know, that the "assets" Folder has a spelling mistake (asserts)

Instr 3. LLM - ModuleNotFoundError: No module named 'pilot'

Hi, on Point 3.
cd pilot/server
$ python vicuna_server.py

it comes error
F:\00_Programme\DB-GPT\pilot\server> python vicuna_server.py
Traceback (most recent call last):
File "F:\00_Programme\DB-GPT\pilot\server\vicuna_server.py", line 10, in
from pilot.model.inference import generate_stream
ModuleNotFoundError: No module named 'pilot'

can you say what the problem is ?
All requirements installed and mysql over docker OK...

What must be do under 3. with
vicuna
Hugging Face

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.