MCPcopy Index your code
hub / github.com/caesarHQ/textSQL / make_default_messages

Function make_default_messages

byod/api/app/sql_generation/utils.py:23–41  ·  view source on GitHub ↗
(schemas_str: str)

Source from the content-addressed store, hash-verified

21
22
23def make_default_messages(schemas_str: str) -> List[Dict[str, str]]:
24 # default_messages = [{
25 # "role": "system",
26 # "content": (
27 # f"""
28 # You are a helpful assistant for generating syntactically correct read-only SQL to answer a given question or command.
29 # The following are tables you can query:
30 # ---------------------
31 # {schemas_str}
32 # ---------------------
33 # Make sure to write your answer in markdown format.
34 # """
35 # # TODO: place warnings here
36 # # i.e. "Make sure each value in the result table is not null."
37 # )
38 # }]
39 default_messages = []
40 default_messages.extend(get_few_shot_messages(mode="text_to_sql"))
41 return default_messages
42
43
44def make_rephrase_msg_with_schema_and_warnings():

Callers 1

text_to_sql_with_retryFunction · 0.70

Calls 1

get_few_shot_messagesFunction · 0.85

Tested by

no test coverage detected