这是indexloc提供的服务,不要输入任何密码
Skip to content

[BUG]: SQL Connector: TypeError: Cannot read properties of undefined (reading '0') #4040

@CesareIsHere

Description

@CesareIsHere

How are you running AnythingLLM?

Docker (local)

What happened?

I'm hosting anythingllm on docker on an Ubuntu Azure VM.

I configure sql connector using sqlserver odbc with configuration like this:

Image

But when i ask to the agent something i get this error:

[backend] info: [AgentHandler] [debug]: @agent is attempting to call `sql-list-databases` tool
[backend] info: [AgentHandler] Using the sql-list-databases tool.
[backend] info: [AgentHandler] [debug]: @agent is attempting to call `sql-list-tables` tool
[backend] info: [AgentHandler] Using the sql-list-tables tool.
[backend] error: TypeError: Cannot read properties of undefined (reading '0')
    at #parseDatabase (/app/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MSSQL.js:46:28)
    at new MSSQLConnector (/app/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/MSSQL.js:33:24)
    at getDBClient (/app/server/utils/agents/aibitat/plugins/sql-agent/SQLConnectors/index.js:38:14)
    at Object.handler (/app/server/utils/agents/aibitat/plugins/sql-agent/list-table.js:59:26)
    at async AIbitat.handleExecution (/app/server/utils/agents/aibitat/index.js:646:22)
    at async AIbitat.handleExecution (/app/server/utils/agents/aibitat/index.js:663:14)
    at async AIbitat.reply (/app/server/utils/agents/aibitat/index.js:589:21)
    at async AIbitat.chat (/app/server/utils/agents/aibitat/index.js:387:15)
    at async AIbitat.continue (/app/server/utils/agents/aibitat/index.js:715:7)
    at async EventEmitter.<anonymous> (/app/server/utils/agents/aibitat/plugins/websocket.js:105:11)

And this in the UI:

Image

thank you for the help.

Are there known steps to reproduce?

No response

Metadata

Metadata

Labels

possible bugBug was reported but is not confirmed or is unable to be replicated.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions