mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-07-21 00:35:23 -04:00
20 lines
562 B
Python
20 lines
562 B
Python
# flake8: noqa
|
|
from langchain.prompts.prompt import PromptTemplate
|
|
|
|
_DEFAULT_TEMPLATE = """Given an input question, first create a syntactically correct {dialect} query to run, then look at the results of the query and return the answer.
|
|
Use the following format:
|
|
|
|
Question: "Question here"
|
|
SQLQuery: "SQL Query to run"
|
|
SQLResult: "Result of the SQLQuery"
|
|
Answer: "Final answer here"
|
|
|
|
Only use the following tables:
|
|
|
|
{table_info}
|
|
|
|
Question: {input}"""
|
|
PROMPT = PromptTemplate(
|
|
input_variables=["input", "table_info", "dialect"], template=_DEFAULT_TEMPLATE
|
|
)
|