eosphoros-ai / DB-GPT

AI Native Data App Development framework with AWEL(Agentic Workflow Expression Language) and Agents
https://docs.dbgpt.site
MIT License
12.4k stars 1.61k forks source link

[Bug] [Proxy] Gemini proxy error #1143

Open linjingran01 opened 5 months ago

linjingran01 commented 5 months ago

Search before asking

Operating system information

Linux

Python version information

3.10

DB-GPT version

main

Related scenes

Installation Information

Device information

GPU Memory:16Gx4

Models information

gemini_proxyllm

What happened

代理模型执行时报错

What you expected to happen

2024-02-02 15:53:32 jranlin-WUJIE14-PRO dbgpt.model.proxy.llms.gemini[60609] INFO [调试gemini_proxyllm]class gemini_generate_stream:<dbgpt.model.proxy.llms.proxy_model.ProxyModel object at 0x7fc38700d3c0> Model: <dbgpt.model.proxy.llms.proxy_model.ProxyModel object at 0x7fc38700d3c0>, model_params:

=========================== ProxyModelParameters ===========================

model_name: gemini_proxyllm model_path: gemini_proxyllm proxy_server_url: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro proxy_api_key: {**} proxy_api_base: None proxy_api_app_id: None proxy_api_secret: None proxy_api_type: None proxy_api_version: None http_proxy: None proxyllm_backend: gemini-pro model_type: proxy device: cpu prompt_template: None max_context_size: 4096 llm_client_class: None

======================================================================

2024-02-02 15:53:32 jranlin-WUJIE14-PRO dbgpt.model.proxy.llms.gemini[60609] INFO [调试gemini_proxyllm]class sync_generate_stream:ModelRequest(model='gemini-pro', messages=[ModelMessage(role='human', content='你是一个有用的 AI 助手。\n你好', round_index=0)], temperature=0.6, max_new_tokens=1024, stop=None, stop_token_ids=None, context_len=None, echo=False, span_id=None, context=ModelRequestContext(stream=True, cache_enable=False, user_name=None, sys_code=None, conv_uid=None, span_id=None, chat_mode=None, extra={}, request_id=None))

full stream output:

model generate_stream params: {'model': 'gemini_proxyllm', 'messages': [ModelMessage(role='human', content='你是一个有用的 AI 助手。\n你好', round_index=0)], 'temperature': 0.6, 'max_new_tokens': 1024, 'echo': False, 'span_id': 'eb72d66d-6730-4937-bd0c-df3b9122b8c5:5444b4b0-d20f-4e05-a0c7-4db23667f6cf', 'context': {'stream': True, 'cache_enable': False, 'user_name': None, 'sys_code': None, 'conv_uid': None, 'span_id': 'eb72d66d-6730-4937-bd0c-df3b9122b8c5:b964381e-64f6-4fc9-ad16-e4d737d622e6', 'chat_mode': 'chat_normal', 'extra': {}, 'request_id': None}, 'convert_to_compatible_format': False, 'string_prompt': 'human: 你是一个有用的 AI 助手。\n你好'} Traceback (most recent call last): File "/media/jranlin/8E6FAD7176696DCF/Documents/DB-GPT/dbgpt/app/scene/base_chat.py", line 302, in stream_call self.current_message.add_ai_message(msg) UnboundLocalError: local variable 'msg' referenced before assignment

2024-02-02 15:54:28 jranlin-WUJIE14-PRO dbgpt.app.scene.base_chat[60609] ERROR model response parse failed!local variable 'msg' referenced before assignment INFO: 127.0.0.1:53100 - "GET /api/v1/chat/dialogue/list HTTP/1.1" 200 OK

How to reproduce

LLM_MODEL=gemini_proxyllm GEMINI_PROXY_API_KEY={your_api_key}

Additional context

No response

Are you willing to submit PR?

fangyinc commented 5 months ago

@linjingran01 你好,看不出具体的错误原因,网络连接可以么?

Derek8863 commented 4 months ago

大佬,请问这个问题解决了吗,我也遇到同样的问题了,用的是chatgpt3.5的接口

alexlovy commented 3 months ago

大佬,请问这个问题解决了吗,我也遇到同样的问题了,用的是chatgpt3.5的接口

alexlovy commented 3 months ago

@linjingran01 你好,看不出具体的错误原因,网络连接可以么?

代码报错了,在DB-GPT/dbgpt/app/scene/base_chat.py的302行,self.current_message.add_ai_message(msg),这一句报错的,我也遇到一样的问题,但是不知道怎么解决。

xjw00654 commented 3 months ago

@fangyinc 应该是代理失效了。 全局查了一下,大概是在启动controller的时候选择取消代理导致的。实际在这里设置no_proxy=127.0.0.1,localhost就没问题了。 https://github.com/eosphoros-ai/DB-GPT/blob/main/dbgpt/model/cluster/worker/manager.py#L842-L845

zhangkuo-zk commented 2 months ago

@linjingran01 你好,看不出具体的错误原因,网络连接可以么?

代码报错了,在DB-GPT/dbgpt/app/scene/base_chat.py的302行,self.current_message.add_ai_message(msg),这一句报错的,我也遇到一样的问题,但是不知道怎么解决。 您好,我也是同样的问题

yuxiyan commented 1 month ago

@fangyinc 应该是代理失效了。 全局查了一下,大概是在启动controller的时候选择取消代理导致的。实际在这里设置no_proxy=127.0.0.1,localhost就没问题了。 https://github.com/eosphoros-ai/DB-GPT/blob/main/dbgpt/model/cluster/worker/manager.py#L842-L845

我也遇到这个问题了,能详细说下,在哪里修改吗,这是我的模型信息 image

fangyinc commented 1 month ago

@fangyinc 应该是代理失效了。 全局查了一下,大概是在启动controller的时候选择取消代理导致的。实际在这里设置no_proxy=127.0.0.1,localhost就没问题了。 https://github.com/eosphoros-ai/DB-GPT/blob/main/dbgpt/model/cluster/worker/manager.py#L842-L845

我也遇到这个问题了,能详细说下,在哪里修改吗,这是我的模型信息 image

重装一下 zhipuai,使用下面的版本,社区后面再升级zhipuai到新版。

pip install zhipuai==1.0.7
marklee88 commented 1 month ago

gemini pro 同样的报错,请问大佬们怎么解决这个问题。 ERROR Attempt 1 of 1 failed with error: ValueError, Can't new LLMCacheValueData object, output is None 2024-05-19 23:48:59 BGGROUP dbgpt.util.retry[13604] INFO Retrying... (Attempt 1 of 1)

INFO: Uvicorn running on http://0.0.0.0:5670 (Press CTRL+C to quit) 2024-05-19 23:48:15 BGGROUP dbgpt.model.adapter.proxy_adapter[13604] INFO Load model from params:

=========================== ProxyModelParameters ===========================

model_name: gemini_proxyllm model_path: gemini_proxyllm proxy_server_url: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro proxy_api_key: {**} proxy_api_base: None proxy_api_app_id: None proxy_api_secret: None proxy_api_type: None proxy_api_version: None http_proxy: None proxyllm_backend: gemini-pro model_type: proxy device: cpu prompt_template: None max_context_size: 4096 llm_client_class: None

======================================================================

, llm client class: <class 'dbgpt.model.proxy.llms.gemini.GeminiLLMClient'> INFO: 127.0.0.1:50550 - "POST /api/controller/models HTTP/1.1" 200 OK INFO: 127.0.0.1:50552 - "POST /api/controller/models HTTP/1.1" 200 OK begin run _add_app_startup_event INFO: 127.0.0.1:50593 - "GET / HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/css/3217d2d9c8c6f05d.css HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/css/antd-output/antd.min.d36bae81.css HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/webpack-4e5527d8038129bd.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/main-11608b225f7d6953.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/framework-f37ed5903537ad3a.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/pages/_app-9004512aa620d772.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/29107295-75edf0bf34e24b1e.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/2185-30f9d0578fa0d631.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/5503-c65f6d730754acc7.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/1009-4b2af86bde623424.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/1647-8683da4db89d68c1.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/9479-21f588e1fd4e6b6d.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/4553-61740188e6a650a8.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/2487-cda9d2a2fd712a15.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/411-b5d3e7f64bee2335.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/9305-f44429d5185a9fc7.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/pages/index-9d77aed53ca78d15.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/1353-705aa47cc2b94999.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/5f10l8SOlP5m7nvq3pY8z/_buildManifest.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/5f10l8SOlP5m7nvq3pY8z/_ssgManifest.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /LOGO_1.png HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /LOGO.png HTTP/1.1" 200 OK INFO: 127.0.0.1:50594 - "POST /prompt/list HTTP/1.1" 200 OK INFO: 127.0.0.1:50595 - "POST /api/v1/chat/dialogue/scenes HTTP/1.1" 200 OK 2024-05-19 23:48:32 BGGROUP dbgpt.app.openapi.api_v1.api_v1[13604] INFO /controller/model/types 2024-05-19 23:48:32 BGGROUP dbgpt.model.cluster.controller.controller[13604] INFO Get all instances with None, healthy_only: True INFO: 127.0.0.1:50594 - "GET /api/v1/chat/dialogue/list HTTP/1.1" 200 OK INFO: 127.0.0.1:50593 - "GET /api/v1/model/types HTTP/1.1" 200 OK INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/785-c3544abc036fc97d.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /WHITE_LOGO.png HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50599 - "GET /_next/static/chunks/5813-c6244a8eba7ef4ae.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/971df74e-7436ff4085ebb785.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50600 - "GET /_next/static/chunks/7434-29506257e67e8077.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50601 - "GET /_next/static/chunks/9924-5bce555f07385e1f.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/pages/flow-33fe9f396642fb4c.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50600 - "GET /_next/static/chunks/6165-93d23bc520382b2c.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50601 - "GET /_next/static/chunks/pages/app-8154f6fcced2f743.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50599 - "GET /_next/static/chunks/75fc9c18-1d6133135d3d283c.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/3444-30181eacc7980e66.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/8928-0e78def492052d13.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/5733-7ef320ab0f876a5e.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50601 - "GET /_next/static/chunks/pages/models-446238c56e41aa1b.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50600 - "GET /_next/static/chunks/3718-e111d727d432bdd2.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/pages/database-7384ab94b08f23ff.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/5237-1d36a3742424b75e.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50599 - "GET /_next/static/chunks/2282-96412afca1591c9a.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/pages/knowledge-8c97044c36508d2d.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/pages/agent-2be7990da37f5165.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/pages/chat-5794854c0948b84c.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /models/huggingface.svg HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "GET /_next/static/css/b4846eed11c4725f.css HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50595 - "POST /api/v1/chat/dialogue/new HTTP/1.1" 200 OK INFO: 127.0.0.1:50595 - "GET /_next/static/chunks/355a6ca7.9ed0e7fb77828d28.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50594 - "GET /_next/static/chunks/8816.01d364f41e0e484b.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50593 - "GET /_next/static/chunks/7184-3ca3f58327a6986a.js HTTP/1.1" 200 OK INFO: 127.0.0.1:50601 - "GET /_next/static/chunks/1182.2419d83f8d9ef6a3.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50600 - "GET /_next/static/css/4a5788db5400bc40.css HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50599 - "GET /_next/static/chunks/7869-1a99e25b182b3eaa.js HTTP/1.1" 200 OK INFO: 127.0.0.1:50595 - "GET /_next/static/css/4047a8310a399ceb.css HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50600 - "GET /_next/static/chunks/4835.ba64d3db2eb02a7a.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50601 - "GET /_next/static/chunks/4134.1f69d7fdee641af7.js HTTP/1.1" 304 Not Modified INFO: 127.0.0.1:50601 - "POST /prompt/list HTTP/1.1" 200 OK INFO: 127.0.0.1:50593 - "POST /api/v1/chat/mode/params/list?chat_mode=chat_excel HTTP/1.1" 200 OK INFO: 127.0.0.1:50600 - "GET /api/v1/feedback/select HTTP/1.1" 200 OK INFO: 127.0.0.1:50599 - "GET /api/v1/chat/dialogue/messages/history?con_uid=b9989a61-15d5-11ef-8e50-b00cd1569420 HTTP/1.1" 200 OK INFO: 127.0.0.1:50601 - "GET /empty.png HTTP/1.1" 304 Not Modified params_load: b9989a61-15d5-11ef-8e50-b00cd1569420,chat_excel,gemini_proxyllm 2024-05-19 23:48:55 BGGROUP dbgpt.app.openapi.api_v1.api_v1[13604] INFO get_chat_instance:conv_uid='b9989a61-15d5-11ef-8e50-b00cd1569420' user_input='' user_name=None chat_mode='chat_excel' select_param='ChartOfAccounts Company GST.xlsx' model_name='gemini_proxyllm' incremental=False sys_code=None 2024-05-19 23:48:56 BGGROUP dbgpt.app.scene.chat_data.chat_excel.excel_reader[13604] INFO Detected Encoding: None (Confidence: 0.0) c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( c:\users\lx\db-gpt\dbgpt\app\scene\chat_data\chat_excel\excel_reader.py:276: UserWarning: Could not infer format, so each element will be parsed individually, falling back to dateutil. To ensure parsing is consistent and as-expected, please specify a format. self.df[column_name] = pd.to_datetime(self.df[column_name]).dt.strftime( ('Code', 'VARCHAR', 'YES', None, None, None) ('Report_Code', 'VARCHAR', 'YES', None, None, None) ('Name', 'VARCHAR', 'YES', None, None, None) ('Reporting_Name', 'NULL', 'YES', None, None, None) ('Type', 'VARCHAR', 'YES', None, None, None) ('Tax_Code', 'VARCHAR', 'YES', None, None, None) ('Description', 'VARCHAR', 'YES', None, None, None) ('Dashboard', 'VARCHAR', 'YES', None, None, None) ('Expense_Claims', 'VARCHAR', 'YES', None, None, None) ('Enable_Payments', 'VARCHAR', 'YES', None, None, None) ('Balance', 'VARCHAR', 'YES', None, None, None) Get prompt template of scene_name: chat_excel with model_name: gemini_proxyllm, proxyllm_backend: None, language: en 2024-05-19 23:48:57 BGGROUP dbgpt.app.scene.chat_data.chat_excel.excel_analyze.chat[13604] INFO ChatScene.ChatExcel prepare start! Get prompt template of scene_name: excel_learning with model_name: gemini_proxyllm, proxyllm_backend: None, language: en excute sql:SELECT FROM "excel_data" LIMIT 5; 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.runner.local_runner[13604] INFO Begin run workflow from end operator, id: c23e2bd9-0de2-4c89-b0b4-96a3e299e41e, runner: <dbgpt.core.awel.runner.local_runner.DefaultWorkflowRunner object at 0x0000028F1929C850> 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.runner.local_runner[13604] INFO Begin run workflow from end operator, id: 89b8e55d-381a-43ac-ad31-dc0ead958fb1, runner: <dbgpt.core.awel.runner.local_runner.DefaultWorkflowRunner object at 0x0000028F1929C850> 2024-05-19 23:48:57 BGGROUP dbgpt.app.scene.base_chat[13604] INFO Request: ModelRequest(model='gemini_proxyllm', messages=[ModelMessage(role='system', content='You are a data analysis expert. \nThe following is part of the data of the user file ChartOfAccounts Company GST.xlsx. Please learn to understand the structure and content of the data and output the parsing results as required:\n [["Code", "Report_Code", "Name", "Reporting_Name", "Type", "*Tax_Code", "Description", "Dashboard", "Expense_Claims", "Enable_Payments", "Balance"], ["200", "REV.TRA", "Sales", null, "Revenue", "15% GST on Income", "Income from any normal business activity", "No", "No", "No", "-18252"], ["203", "REV", "Dividend", null, "Other Income", "No GST", "nan", "No", "No", "No", "nan"], ["220", "EXP.COS.PUR", "Purchase", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["221", "EXP.COS.PUR", "Freight", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["252", "EXP.COS.OPE", "Opening Stock", null, "Direct Costs", "No GST", "nan", "No", "No", "No", "nan"]]\nExplain the meaning and function of each column, and give a simple and clear explanation of the technical terms, If it is a Date column, please summarize the Date format like: yyyy-MM-dd HH:MM:ss.\nUse the column name as the attribute name and the analysis explanation as the attribute value to form a json array and output it in the ColumnAnalysis attribute that returns the json content.\nPlease do not modify or translate the column names, make sure they are consistent with the given data column names.\nProvide some useful analysis ideas to users from different dimensions for data.\n\nPlease think step by step and give your answer. Make sure to answer only in JSON format,the format is as follows:\n "{\n \"DataAnalysis\": \"Data content analysis summary\",\n \"ColumnAnalysis\": [\n {\n \"column name\": \"Introduction to Column 1 and explanation of professional terms (please try to be as simple and clear as possible)\"\n }\n ],\n \"AnalysisProgram\": [\n \"1. Analysis plan \",\n \"2. Analysis plan \"\n ]\n}"\n', round_index=0), ModelMessage(role='human', content='ChartOfAccounts Company GST.xlsx', round_index=0)], temperature=0.8, max_new_tokens=1024, stop=None, stop_token_ids=None, context_len=None, echo=False, span_id='6e219a4f-88da-44f0-9928-3ac85cf38588:a2b69c2a-f805-4a10-9890-514cca8bb49a', context=ModelRequestContext(stream=False, cache_enable=False, user_name=None, sys_code=None, conv_uid=None, span_id='6e219a4f-88da-44f0-9928-3ac85cf38588:a2b69c2a-f805-4a10-9890-514cca8bb49a', chat_mode='excel_learning', chat_param=None, extra={}, request_id=None)) 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.runner.local_runner[13604] INFO Begin run workflow from end operator, id: 81dbfa2b-21a1-4d42-a013-9af688565611, runner: <dbgpt.core.awel.runner.local_runner.DefaultWorkflowRunner object at 0x0000028F1929C850> 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.operators.common_operator[13604] INFO branch_input_ctxs 0 result None, is_empty: False 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.operators.common_operator[13604] INFO Skip node name llm_model_cache_node 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.operators.common_operator[13604] INFO branch_input_ctxs 1 result True, is_empty: False 2024-05-19 23:48:57 BGGROUP dbgpt.core.awel.runner.local_runner[13604] INFO Skip node name llm_model_cache_node, node id 493e40a0-b5de-4c3e-94c4-0afbead04c1d 2024-05-19 23:48:57 BGGROUP dbgpt.model.adapter.base[13604] INFO Message version is v2 llm_adapter:

model prompt:

human: You are a data analysis expert. The following is part of the data of the user file ChartOfAccounts Company GST.xlsx. Please learn to understand the structure and content of the data and output the parsing results as required: [["Code", "Report_Code", "Name", "Reporting_Name", "Type", "Tax_Code", "Description", "Dashboard", "Expense_Claims", "Enable_Payments", "Balance"], ["200", "REV.TRA", "Sales", null, "Revenue", "15% GST on Income", "Income from any normal business activity", "No", "No", "No", "-18252"], ["203", "REV", "Dividend", null, "Other Income", "No GST", "nan", "No", "No", "No", "nan"], ["220", "EXP.COS.PUR", "Purchase", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["221", "EXP.COS.PUR", "Freight", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["252", "EXP.COS.OPE", "Opening Stock", null, "Direct Costs", "No GST", "nan", "No", "No", "No", "nan"]] Explain the meaning and function of each column, and give a simple and clear explanation of the technical terms, If it is a Date column, please summarize the Date format like: yyyy-MM-dd HH:MM:ss. Use the column name as the attribute name and the analysis explanation as the attribute value to form a json array and output it in the ColumnAnalysis attribute that returns the json content. Please do not modify or translate the column names, make sure they are consistent with the given data column names. Provide some useful analysis ideas to users from different dimensions for data.

Please think step by step and give your answer. Make sure to answer only in JSON format,the format is as follows: "{\n \"DataAnalysis\": \"Data content analysis summary\",\n \"ColumnAnalysis\": [\n {\n \"column name\": \"Introduction to Column 1 and explanation of professional terms (please try to be as simple and clear as possible)\"\n }\n ],\n \"AnalysisProgram\": [\n \"1. Analysis plan \",\n \"2. Analysis plan \"\n ]\n}"

ChartOfAccounts Company GST.xlsx

stream output:

Model: <dbgpt.model.proxy.llms.proxy_model.ProxyModel object at 0x0000028F1DC1F730>, model_params:

=========================== ProxyModelParameters ===========================

model_name: gemini_proxyllm model_path: gemini_proxyllm proxy_server_url: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro proxy_api_key: {**} proxy_api_base: None proxy_api_app_id: None proxy_api_secret: None proxy_api_type: None proxy_api_version: None http_proxy: None proxyllm_backend: gemini-pro model_type: proxy device: cpu prompt_template: None max_context_size: 4096 llm_client_class: None

======================================================================

full stream output:

model generate_stream params: {'model': 'gemini_proxyllm', 'messages': [ModelMessage(role='human', content='You are a data analysis expert. \nThe following is part of the data of the user file ChartOfAccounts Company GST.xlsx. Please learn to understand the structure and content of the data and output the parsing results as required:\n [["Code", "Report_Code", "Name", "Reporting_Name", "Type", "Tax_Code", "Description", "Dashboard", "Expense_Claims", "Enable_Payments", "Balance"], ["200", "REV.TRA", "Sales", null, "Revenue", "15% GST on Income", "Income from any normal business activity", "No", "No", "No", "-18252"], ["203", "REV", "Dividend", null, "Other Income", "No GST", "nan", "No", "No", "No", "nan"], ["220", "EXP.COS.PUR", "Purchase", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["221", "EXP.COS.PUR", "Freight", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["252", "EXP.COS.OPE", "Opening Stock", null, "Direct Costs", "No GST", "nan", "No", "No", "No", "nan"]]\nExplain the meaning and function of each column, and give a simple and clear explanation of the technical terms, If it is a Date column, please summarize the Date format like: yyyy-MM-dd HH:MM:ss.\nUse the column name as the attribute name and the analysis explanation as the attribute value to form a json array and output it in the ColumnAnalysis attribute that returns the json content.\nPlease do not modify or translate the column names, make sure they are consistent with the given data column names.\nProvide some useful analysis ideas to users from different dimensions for data.\n\nPlease think step by step and give your answer. Make sure to answer only in JSON format,the format is as follows:\n "{\n \"DataAnalysis\": \"Data content analysis summary\",\n \"ColumnAnalysis\": [\n {\n \"column name\": \"Introduction to Column 1 and explanation of professional terms (please try to be as simple and clear as possible)\"\n }\n ],\n \"AnalysisProgram\": [\n \"1. Analysis plan \",\n \"2. Analysis plan \"\n ]\n}"\n\nChartOfAccounts Company GST.xlsx', round_index=0)], 'temperature': 0.8, 'max_new_tokens': 1024, 'echo': False, 'span_id': '6e219a4f-88da-44f0-9928-3ac85cf38588:aea7f442-b27a-4f02-9e47-fe86908a6a5f', 'context': {'stream': False, 'cache_enable': False, 'user_name': None, 'sys_code': None, 'conv_uid': None, 'span_id': '6e219a4f-88da-44f0-9928-3ac85cf38588:a2b69c2a-f805-4a10-9890-514cca8bb49a', 'chat_mode': 'excel_learning', 'chat_param': None, 'extra': {}, 'request_id': None}, 'convert_to_compatible_format': False, 'string_prompt': 'human: You are a data analysis expert. \nThe following is part of the data of the user file ChartOfAccounts Company GST.xlsx. Please learn to understand the structure and content of the data and output the parsing results as required:\n [["Code", "Report_Code", "Name", "Reporting_Name", "Type", "Tax_Code", "Description", "Dashboard", "Expense_Claims", "Enable_Payments", "Balance"], ["200", "REV.TRA", "Sales", null, "Revenue", "15% GST on Income", "Income from any normal business activity", "No", "No", "No", "-18252"], ["203", "REV", "Dividend", null, "Other Income", "No GST", "nan", "No", "No", "No", "nan"], ["220", "EXP.COS.PUR", "Purchase", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["221", "EXP.COS.PUR", "Freight", null, "Direct Costs", "15% GST on Expenses", "nan", "No", "No", "No", "nan"], ["252", "EXP.COS.OPE", "Opening Stock", null, "Direct Costs", "No GST", "nan", "No", "No", "No", "nan"]]\nExplain the meaning and function of each column, and give a simple and clear explanation of the technical terms, If it is a Date column, please summarize the Date format like: yyyy-MM-dd HH:MM:ss.\nUse the column name as the attribute name and the analysis explanation as the attribute value to form a json array and output it in the ColumnAnalysis attribute that returns the json content.\nPlease do not modify or translate the column names, make sure they are consistent with the given data column names.\nProvide some useful analysis ideas to users from different dimensions for data.\n\nPlease think step by step and give your answer. Make sure to answer only in JSON format,the format is as follows:\n "{\n \"DataAnalysis\": \"Data content analysis summary\",\n \"ColumnAnalysis\": [\n {\n \"column name\": \"Introduction to Column 1 and explanation of professional terms (please try to be as simple and clear as possible)\"\n }\n ],\n \"AnalysisProgram\": [\n \"1. Analysis plan \",\n \"2. Analysis plan \"\n ]\n}"\n\nChartOfAccounts Company GST.xlsx'} 2024-05-19 23:48:59 BGGROUP dbgpt.core.awel.runner.local_runner[13604] INFO Run operator <class 'dbgpt.storage.cache.operators.ModelSaveCacheOperator'>(a3013b96-a0e3-4f87-b1a9-317b89f80834) error, error message: Traceback (most recent call last): File "c:\users\lx\db-gpt\dbgpt\core\awel\runner\local_runner.py", line 160, in _execute_node await node._run(dag_ctx, task_ctx.log_id) File "c:\users\lx\db-gpt\dbgpt\core\awel\operators\base.py", line 186, in _run return await self._do_run(dag_ctx) File "c:\users\lx\db-gpt\dbgpt\core\awel\operators\common_operator.py", line 162, in _do_run input_ctx: InputContext = await curr_task_ctx.task_input.map(map_function) File "c:\users\lx\db-gpt\dbgpt\core\awel\task\task_impl.py", line 538, in map new_outputs, results = await self._apply_func(map_func) File "c:\users\lx\db-gpt\dbgpt\core\awel\task\task_impl.py", line 533, in _apply_func results = await asyncio.gather(*map_tasks) File "c:\users\lx\db-gpt\dbgpt\core\awel\task\task_impl.py", line 126, in map out = await self._apply_func(map_func) File "c:\users\lx\db-gpt\dbgpt\core\awel\task\task_impl.py", line 112, in _apply_func out = await func(self._data) File "c:\users\lx\db-gpt\dbgpt\storage\cache\operators.py", line 231, in map llm_cache_value: LLMCacheValue = self._client.new_value(output=input_value) File "c:\users\lx\db-gpt\dbgpt\storage\cache\llm_cache.py", line 194, in new_value value = LLMCacheValue(kwargs) File "c:\users\lx\db-gpt\dbgpt\storage\cache\llm_cache.py", line 126, in init self.value = LLMCacheValueData.from_dict(kwargs) File "c:\users\lx\db-gpt\dbgpt\storage\cache\llm_cache.py", line 42, in from_dict raise ValueError("Can't new LLMCacheValueData object, output is None") ValueError: Can't new LLMCacheValueData object, output is None

2024-05-19 23:48:59 BGGROUP dbgpt.util.retry[13604] ERROR Attempt 1 of 1 failed with error: ValueError, Can't new LLMCacheValueData object, output is None 2024-05-19 23:48:59 BGGROUP dbgpt.util.retry[13604] INFO Retrying... (Attempt 1 of 1) INFO: 127.0.0.1:50625 - "POST /api/v1/chat/mode/params/file/load?conv_uid=b9989a61-15d5-11ef-8e50-b00cd1569420&chat_mode=chat_excel&model_name=gemini_proxyllm HTTP/1.1" 200 OK INFO: 127.0.0.1:50625 - "GET /api/v1/chat/dialogue/list HTTP/1.1" 200 OK INFO: 127.0.0.1:50626 - "GET /api/v1/chat/dialogue/messages/history?con_uid=b9989a61-15d5-11ef-8e50-b00cd1569420 HTTP/1.1" 200 OK

LearnMore-far commented 1 month ago

@fangyinc 应该是代理失效了。 全局查了一下,大概是在启动controller的时候选择取消代理导致的。实际在这里设置no_proxy=127.0.0.1,localhost就没问题了。 https://github.com/eosphoros-ai/DB-GPT/blob/main/dbgpt/model/cluster/worker/manager.py#L842-L845

我也遇到这个问题了,能详细说下,在哪里修改吗,这是我的模型信息 image

解决了吗

fangyinc commented 1 month ago

@fangyinc 应该是代理失效了。 全局查了一下,大概是在启动controller的时候选择取消代理导致的。实际在这里设置no_proxy=127.0.0.1,localhost就没问题了。 https://github.com/eosphoros-ai/DB-GPT/blob/main/dbgpt/model/cluster/worker/manager.py#L842-L845

我也遇到这个问题了,能详细说下,在哪里修改吗,这是我的模型信息 image

解决了吗

有代理的情况下 DB-GPT 无法正常工作,本质是模型服务之间需要通信,代理会影响网络通信。