Skip to content

Commit

Permalink
feat: Add support for SQL queries in TextToSql class
Browse files Browse the repository at this point in the history
fix: Correct syntax error in SQL query examples
patch: Update docstring formatting
fix: Improve performance of Interactive cmd.Cmd loop
  • Loading branch information
Simatwa committed Nov 8, 2024
1 parent 94cc161 commit 002eec2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ def context_prompt(self) -> str:
"""
\n
For example:
User: List top 10 entries in the Linux table where distro contains letter 'a'LLM : {SELECT * FROM Linux WHERE distro LIKE '%a%';}
User: List top 10 entries in the Linux table where distro contains letter 'a'
LLM : {SELECT * FROM Linux WHERE distro LIKE '%a%';}
User : Remove entries from table Linux whose id is greater than 10.
LLLM : {DELETE * FROM Linux WHERE id > 10;}
Expand Down Expand Up @@ -425,7 +426,7 @@ def default(self, line: str, prompt_confirmation: bool = False, ai_generated=Fal
if line.startswith("./"):
self.do_sys(line[2:])
return
# self.onecmd

elif line.startswith("!"):
# Let's try to mimic the unix' previous command(s) execution shortcut
history = self.completer_session.history.get_strings()
Expand Down

0 comments on commit 002eec2

Please sign in to comment.