Replies: 1 comment 2 replies
-
unfortunately you can only have sqldbchain OR llmchain (only one) in a chatflow |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Connecting to SQL Server
System Message:
Based on the schema given {info} write an executable Microsoft SQL Server query for the user input, avoid MySQL query. Execute it in the database and get sql results. Make a response to user from mssql results based on the question.
Input: "user input"
SQL query: "SQL Query here"
Human Message
{input}
Formatted Prompt Values
{
info: "{{chat_history}}"
input: "{{question}}"
}
Prompted:
return top 5 supplier from payment_reports by reportId and amount
which AI came back with:
Then how to do the actual SQL execution and getting the result that I am expecting?
![Screenshot 2024-02-04 at 00 29 25](https://private-user-images.githubusercontent.com/1273014/302068984-c45a9ee4-755b-45f0-a932-3049943a44d9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5NzUzMDcsIm5iZiI6MTcxOTk3NTAwNywicGF0aCI6Ii8xMjczMDE0LzMwMjA2ODk4NC1jNDVhOWVlNC03NTViLTQ1ZjAtYTkzMi0zMDQ5OTQzYTQ0ZDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDNUMDI1MDA3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2UyZjViOTE4MGYyMjcxYzNmODQxNjNlMTJhYzA5MDdiOTJjYjBhZGNjNmNlNGY3NDAwOGNmMjFkMWVkYmRkMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.jVQ0dgcIRJ5jf5XvlHg58wZ-u5UjLekp6scDsqDzNIo)
Beta Was this translation helpful? Give feedback.
All reactions