CodePhiliaX / Chat2DB

🔥🔥🔥AI-driven database tool and SQL client, The hottest GUI client, supporting MySQL, Oracle, PostgreSQL, DB2, SQL Server, DB2, SQLite, H2, ClickHouse, and more.
http://chat2db.ai
Apache License 2.0
15k stars 1.68k forks source link

Bug: Token limit exceeded, 16k model should be used #907

Open Bit0r opened 10 months ago

Bit0r commented 10 months ago

Chat2DB Version

Linux-v3.0.14

Describe the bug

There are multiple tables in the database. When using dialogue to generate SQL, the token limit is exceeded. The error log returned is as follows:

出现异常,请在帮助中查看详细日志:{"object":"error","message":"流式输出失败 {\"error\":{\"message\":\"This model's maximum context length is 4097 tokens. However, you requested 4146 tokens (2098 in the messages, 2048 in the completion). Please reduce the length of the messages or completion.\",\"type\":\"invalid_request_error\",\"param\":\"messages\",\"code\":\"context_length_exceeded\"}}","code":50099}

image

Bit0r commented 10 months ago

The log function in the help is also unavailable. Clicking that button will cause the x11 desktop to freeze.