MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / get_relevant_annotation

Function get_relevant_annotation

explorer/assistant/utils.py:103–109  ·  view source on GitHub ↗
(db_connection, t)

Source from the content-addressed store, hash-verified

101
102
103def get_relevant_annotation(db_connection, t):
104 return TableDescription.objects.annotate(
105 table_name_lower=Lower("table_name")
106 ).filter(
107 database_connection=db_connection,
108 table_name_lower=t.lower()
109 ).first()
110
111
112def get_relevant_few_shots(db_connection, included_tables):

Callers 2

build_promptFunction · 0.85

Calls

no outgoing calls

Tested by 1