Crates the initial prompt for the given scope formatted to the given dialect and schemas. Args: dialect (str): This is something I should know what it is schemas (str): The schemas of the tables (currently formatted as CREATE TABLE...) scope (str, optional): The pro
(dialect: str, schemas: str, scope: str="USA")
| 125 | } |
| 126 | |
| 127 | def get_initial_prompt(dialect: str, schemas: str, scope: str="USA") -> str: |
| 128 | """ |
| 129 | Crates the initial prompt for the given scope formatted to the given dialect and schemas. |
| 130 | |
| 131 | Args: |
| 132 | dialect (str): This is something I should know what it is |
| 133 | schemas (str): The schemas of the tables (currently formatted as CREATE TABLE...) |
| 134 | scope (str, optional): The project the prompt belongs to (e.g. USA, SF, etc.), defaults to 'USA' |
| 135 | |
| 136 | Returns: |
| 137 | str: The formatted prompt |
| 138 | """ |
| 139 | if scope in INITIAL_PROMPTS: |
| 140 | prompt = INITIAL_PROMPTS[scope] |
| 141 | else: prompt = INITIAL_PROMPTS["USA"] |
| 142 | prompt = prompt.format(dialect, schemas) |
| 143 | return prompt |
| 144 | |
| 145 | def get_retry_prompt(dialect: str, natural_language_query:str, scope: str="USA") -> str: |
| 146 | """ |
nothing calls this directly
no outgoing calls
no test coverage detected