dmddl 0.2.23__tar.gz → 0.2.24__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.23 → dmddl-0.2.24}/PKG-INFO +1 -1
- {dmddl-0.2.23 → dmddl-0.2.24}/pyproject.toml +1 -1
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/cli.py +0 -9
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/models/llm.py +4 -5
- {dmddl-0.2.23 → dmddl-0.2.24}/LICENSE +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/README.md +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/.ruff_cache/.gitignore +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/.ruff_cache/0.11.9/1354378795363258161 +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/.ruff_cache/CACHEDIR.TAG +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/__init__.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/config/.env +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/config/__init__.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/config/proxy.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/config/settings.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/input.txt +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/models/__init__.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/models/prompt.py +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/output.txt +0 -0
- {dmddl-0.2.23 → dmddl-0.2.24}/src/dmddl/requirements.txt +0 -0
@@ -16,15 +16,6 @@ from dmddl.config.proxy import get_valid_proxies
|
|
16
16
|
AVAILABLE_PROVIDERS = ["OpenAI"]
|
17
17
|
|
18
18
|
|
19
|
-
class DMDDLConsole:
|
20
|
-
__instance = None
|
21
|
-
|
22
|
-
def __new__(cls, *args, **kwargs):
|
23
|
-
if cls.__instance is None:
|
24
|
-
cls.__instance = Console()
|
25
|
-
return cls.__instance
|
26
|
-
|
27
|
-
|
28
19
|
def choose_provider(providers):
|
29
20
|
provider = questionary.select("Choose your LLM provider:",
|
30
21
|
choices=providers).ask()
|
@@ -20,8 +20,8 @@ def openai_request(prompt, api_key, console, proxies = None):
|
|
20
20
|
]
|
21
21
|
}
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
with console.status("[bold blue]Making query. Wait for result..."):
|
24
|
+
if proxies:
|
25
25
|
for proxy in proxies:
|
26
26
|
try:
|
27
27
|
req_proxies = {
|
@@ -33,9 +33,8 @@ def openai_request(prompt, api_key, console, proxies = None):
|
|
33
33
|
break
|
34
34
|
except:
|
35
35
|
print(f"\n[red bold]Proxy error... Trying next proxy")
|
36
|
-
|
37
|
-
|
38
|
-
response = requests.post(url=url, headers=headers, json=data)
|
36
|
+
else:
|
37
|
+
response = requests.post(url=url, headers=headers, json=data)
|
39
38
|
|
40
39
|
|
41
40
|
if response.status_code == 200:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|