eosphoros-ai / DB-GPT

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

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]when I use chat data , sqlite sql can't execute correctly . chat data sql editor cannot execute

adogwangwang opened this issue · comments

Search before asking

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

Operating system information

Linux

Python version information

=3.11

DB-GPT version

main

Related scenes

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

Installation Information

Device information

v100

Models information

llm chatglm3
embedding bge-large-zh

What happened

2024-05-30 09:07:14 dbgpt-645cbdb85f-6qv8t dbgpt.serve.core.schemas[1] ERROR common_exception_handler catch Exception: success=False err_code='E0003' err_msg="'sql'" data=None
INFO: 10.244.0.0:8265 - "POST /api/v1/editor/sql/run HTTP/1.1" 400 Bad Request
ERROR: Exception in ASGI application

  • Exception Group Traceback (most recent call last):
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 87, in collapse_excgroups
    | yield
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 190, in call
    | async with anyio.create_task_group() as task_group:
    | File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 678, in aexit
    | raise BaseExceptionGroup(
    | exceptiongroup.ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
    +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    | File "/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi
    | result = await app( # type: ignore[func-returns-value]
    | File "/usr/local/lib/python3.10/dist-packages/uvicorn/middleware/proxy_headers.py", line 69, in call
    | return await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 93, in call
    | await self.simple_response(scope, receive, send, request_headers=headers)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/cors.py", line 148, in simple_response
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/fastapi/applications.py", line 1054, in call
    | await super().call(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/applications.py", line 123, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 186, in call
    | raise exc
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/errors.py", line 164, in call
    | await self.app(scope, receive, _send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 189, in call
    | with collapse_excgroups():
    | File "/usr/lib/python3.10/contextlib.py", line 153, in exit
    | self.gen.throw(typ, value, traceback)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_utils.py", line 93, in collapse_excgroups
    | raise exc
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 191, in call
    | response = await self.dispatch_func(request, call_next)
    | File "/app/dbgpt/util/tracer/tracer_middleware.py", line 44, in dispatch
    | response = await call_next(request)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 165, in call_next
    | raise app_exc
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/base.py", line 151, in coro
    | await self.app(scope, receive_or_disconnect, send_no_error)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/middleware/exceptions.py", line 65, in call
    | await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 756, in call
    | await self.middleware_stack(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 776, in app
    | await route.handle(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 297, in handle
    | await self.app(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 77, in app
    | await wrap_app_handling_exceptions(app, request)(scope, receive, send)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    | raise exc
    | File "/usr/local/lib/python3.10/dist-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    | await app(scope, receive, sender)
    | File "/usr/local/lib/python3.10/dist-packages/starlette/routing.py", line 72, in app
    | response = await func(request)
    | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 278, in app
    | raw_response = await run_endpoint_function(
    | File "/usr/local/lib/python3.10/dist-packages/fastapi/routing.py", line 191, in run_endpoint_function
    | return await dependant.call(**values)
    | File "/app/dbgpt/app/openapi/api_v1/editor/api_editor_v1.py", line 96, in editor_sql_run
    | sql = run_param["sql"]
    | KeyError: 'sql'
    +------------------------------------
    当我点击run的时候,报错
    image

What you expected to happen

请告诉我怎么样能够进行sql在线编辑,点击run可以正确执行sql语句

How to reproduce

see error

Additional context

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

This issue has been marked as stale, because it has been over 30 days without any activity.

This issue bas been closed, because it has been marked as stale and there has been no activity for over 7 days.