CoolFace
Apppublic

fahmiaziz/text2sql-rag

sourceHugging Facemitupdated 2y agoView on Hugging Face
1likes
prompt.py14 linesDownload Raw Back to root
1from langchain_core.prompts import ChatPromptTemplate2 3template = """Based on the table schema below, write a SQL query that would answer the user's question:4{context}5 6Question: {question}7SQL Query:"""8 9prompt = ChatPromptTemplate.from_messages(10    [11        ("system", "Given an input question, convert it to a SQL query. No pre-amble."),12        ("human", template),13    ]14)