mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-02 13:08:57 +00:00
- Description: This pull request (PR) includes two minor changes: 1. Updated the default prompt for SQL Query Checker: The current prompt does not clearly specify the final response that the LLM (Language Model) should provide when checking for the query if `use_query_checker` is enabled in SQLDatabase Chain. As a result, the LLM adds extra words like "Here is your updated query" to the response. However, this causes a syntax error when executing the SQL command in SQLDatabaseChain, as these additional words are also included in the SQL query. 2. Moved the query's execution part into a separate method for SQLDatabase: The purpose of this change is to provide users with more flexibility when obtaining the result of an SQL query in the original form returned by sqlalchemy. In the previous implementation, the run method returned the results as a string. By creating a distinct method for execution, users can now receive the results in original format, which proves helpful in various scenarios. For example, during the development of a tool, I found it advantageous to obtain results in original format rather than a string, as currently done by the run method. - Tag maintainer: @hinthornw --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
||
---|---|---|
.. | ||
experimental | ||
langchain |