Coder Social home page Coder Social logo

dbcopilot-langchain-streamlit's People

Contributors

raffertyuy avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

edhotp henrynn

dbcopilot-langchain-streamlit's Issues

VSCode Debugging

VS Code debugging is not working properly.
The app can only be started using streamlit run Hello.py at the moment.

ValueError: All arrays must be of the same length | df = pd.DataFrame(data)

This error occurs very frequently.

ValueError: All arrays must be of the same length
Traceback:

File "C:\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 541, in _run_script
    exec(code, module.__dict__)
File "C:\GitRepos\GH-Public\dbcopilot-langchain-streamlit\pages\1_๐Ÿง‘โ€๐Ÿญ_SQL_Agent.py", line 35, in <module>
    Common.WriteResponse(decodedResponse)
File "C:\GitRepos\GH-Public\dbcopilot-langchain-streamlit\util\Common.py", line 86, in WriteResponse
    df = pd.DataFrame(data)
         ^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pandas\core\frame.py", line 736, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pandas\core\internals\construction.py", line 503, in dict_to_mgr
    return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pandas\core\internals\construction.py", line 114, in arrays_to_mgr
    index = _extract_index(arrays)
            ^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\pandas\core\internals\construction.py", line 677, in _extract_index
    raise ValueError("All arrays must be of the same length")

Steps to Reproduce:

  1. Use the SQL Agent
  2. Run this query Categorize the first 10 customers by their country and display in a bar chart

Note that it works sometimes. The issue seems to be dependent to the LLM output. Maybe improve the prompt?

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.