dmddl 0.2.13__tar.gz → 0.2.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dmddl-0.2.13 → dmddl-0.2.15}/PKG-INFO +1 -1
- {dmddl-0.2.13 → dmddl-0.2.15}/pyproject.toml +1 -1
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/cli.py +10 -9
- {dmddl-0.2.13 → dmddl-0.2.15}/LICENSE +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/README.md +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/__init__.py +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/config/__init__.py +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/config/settings.py +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/models/__init__.py +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/models/llm.py +0 -0
- {dmddl-0.2.13 → dmddl-0.2.15}/src/dmddl/models/prompt.py +0 -0
@@ -30,17 +30,16 @@ def ask_api_key():
|
|
30
30
|
|
31
31
|
def make_query(provider, api_key, prompt):
|
32
32
|
console = Console()
|
33
|
-
print(provider)
|
34
33
|
with console.status("[bold blue]Making query. Wait for result..."):
|
35
|
-
if provider
|
36
|
-
|
37
|
-
|
34
|
+
if provider:
|
35
|
+
if provider == "OpenAI":
|
36
|
+
response = openai_request(base_prompt+prompt, api_key)
|
37
|
+
return response
|
38
38
|
|
39
|
-
|
39
|
+
raise Exception("LLM Provider not found")
|
40
|
+
else:
|
40
41
|
raise Exception("Use -c (--config) to configurate app and set LLM provider.")
|
41
42
|
|
42
|
-
raise Exception("LLM Provider not found")
|
43
|
-
|
44
43
|
|
45
44
|
def write_output_file(data):
|
46
45
|
with open("output.txt", 'w') as file:
|
@@ -95,12 +94,14 @@ def main():
|
|
95
94
|
api_key=api_key,
|
96
95
|
prompt=user_prompt)
|
97
96
|
write_output_file(response)
|
98
|
-
syntax = Syntax(response, 'sql', line_numbers=True)
|
99
97
|
print("\n\n[yellow bold]OUTPUT.TXT\n",)
|
100
|
-
console.print(syntax)
|
101
98
|
if success:
|
99
|
+
syntax = Syntax(response, 'sql', line_numbers=True)
|
100
|
+
console.print(syntax)
|
102
101
|
print("[green bold] Your DML script is ready! Check output.txt")
|
103
102
|
if not success:
|
103
|
+
syntax = Syntax(response, 'python', line_numbers=True)
|
104
|
+
console.print(syntax)
|
104
105
|
print("[red bold] Error has occurred... Check output.txt")
|
105
106
|
|
106
107
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|