asktable-advisor 1.0.2__py3-none-any.whl → 1.0.3__py3-none-any.whl

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.
@@ -1,29 +1,39 @@
1
1
  """Command-line interface for AskTable Advisor."""
2
2
 
3
- import sys
4
3
  import logging
5
- from pathlib import Path
4
+ import sys
6
5
 
7
6
  from rich.console import Console
8
- from rich.panel import Panel
9
7
  from rich.markdown import Markdown
8
+ from rich.panel import Panel
10
9
  from rich.prompt import Prompt
11
10
 
12
- from .config import AdvisorSettings, get_settings
13
11
  from .agent.advisor import AdvisorAgent
12
+ from .config import get_settings
14
13
 
15
14
  # Setup console
16
15
  console = Console()
17
16
 
18
- # Setup logging
19
- logging.basicConfig(
20
- level=logging.INFO,
21
- format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
22
- handlers=[
23
- logging.FileHandler("asktable_advisor.log"),
24
- logging.StreamHandler(sys.stderr),
25
- ],
26
- )
17
+
18
+ def setup_logging(log_level: str = "WARNING") -> None:
19
+ """
20
+ Setup logging configuration.
21
+
22
+ Args:
23
+ log_level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
24
+ """
25
+ # Convert string to logging level
26
+ numeric_level = getattr(logging, log_level.upper(), logging.WARNING)
27
+
28
+ logging.basicConfig(
29
+ level=numeric_level,
30
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
31
+ handlers=[
32
+ logging.FileHandler("asktable_advisor.log"),
33
+ logging.StreamHandler(sys.stderr),
34
+ ],
35
+ force=True, # Override any existing configuration
36
+ )
27
37
 
28
38
 
29
39
  def print_welcome() -> None:
@@ -128,6 +138,9 @@ def main() -> None:
128
138
  # Load settings
129
139
  settings = get_settings()
130
140
 
141
+ # Setup logging with configured level
142
+ setup_logging(settings.log_level)
143
+
131
144
  # Print welcome
132
145
  print_welcome()
133
146
 
@@ -1,4 +1,4 @@
1
1
  """Version information for asktable-advisor."""
2
2
 
3
- __version__ = "1.0.2"
3
+ __version__ = "1.0.3"
4
4
  __version_info__ = tuple(int(x) for x in __version__.split("."))
@@ -45,6 +45,12 @@ class AdvisorSettings(BaseSettings):
45
45
  description="Maximum tokens for LLM responses",
46
46
  )
47
47
 
48
+ # Logging Configuration
49
+ log_level: str = Field(
50
+ default="WARNING",
51
+ description="Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)",
52
+ )
53
+
48
54
  # MySQL Database Configuration
49
55
  mysql_host: str = Field(..., description="MySQL host")
50
56
  mysql_port: int = Field(default=3306, description="MySQL port")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asktable-advisor
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Conversational AI Agent for building AskTable demo scenarios
5
5
  Author-email: DataMini <contact@asktable.com>
6
6
  Maintainer-email: DataMini <contact@asktable.com>
@@ -1,7 +1,7 @@
1
1
  asktable_advisor/__init__.py,sha256=21OEclDkj7fT8swRC2d7JZAqB2cB52lt-LLJno5eVFY,442
2
- asktable_advisor/__main__.py,sha256=WIDnjg0dQL6WykpBCd40MTMX4qd74LNaau_RfoAAZ2w,4213
3
- asktable_advisor/__version__.py,sha256=ugt62WefhlrtqCKiKBAB1QYvV6-QhBy91KkyBAN4Aws,136
4
- asktable_advisor/config.py,sha256=JWa04IwXRcoRYXGeEB5aIelTI2kMO5nUateJD1TptTY,2500
2
+ asktable_advisor/__main__.py,sha256=7hZeayoibCKUeGIZSgU8Pg9N-OejQJ35kq8A-yRBFT8,4637
3
+ asktable_advisor/__version__.py,sha256=GGOC7DDZK2TBiEaMeXqhGjpUQM4IMAHqHGzEXYJBIxA,136
4
+ asktable_advisor/config.py,sha256=l2vPCaUIPUeaJt-2NhlOFIUB9pVWOx7uD58qgAOO1Bk,2667
5
5
  asktable_advisor/agent/__init__.py,sha256=QU-dutlZwnjeJ1EMtdjTLeia3SloykUAatiuHuEeHq4,147
6
6
  asktable_advisor/agent/advisor.py,sha256=g6hJpGicTyaUauWWPI6bwGsz5tH_AeaDvL6IkcSER9E,11349
7
7
  asktable_advisor/agent/llm_client.py,sha256=f8nVteCXiXDF0TWlYVKEhpUXuvAskuK_qbc-ipLTZR4,5780
@@ -18,9 +18,9 @@ asktable_advisor/database/manager.py,sha256=0dMh7s7Xs-9vpC92VgIpDJSIiu_YxJApvnmi
18
18
  asktable_advisor/database/schema_generator.py,sha256=_K8FlJ3FMtATmxzYO-4Fogace5Zsvh2p8dcGBBNkjPw,4535
19
19
  asktable_advisor/knowledge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  asktable_advisor/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- asktable_advisor-1.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
- asktable_advisor-1.0.2.dist-info/METADATA,sha256=RfBGh-MLgFcKZIb58kVUOg53Ff8wZ5Vi98zw69qdGDE,7443
23
- asktable_advisor-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
24
- asktable_advisor-1.0.2.dist-info/entry_points.txt,sha256=m4MJ7R-05wjqqPf-awcMj9JqtwgiK2Du8UV_l6VNh6k,68
25
- asktable_advisor-1.0.2.dist-info/top_level.txt,sha256=cDBvLmuBSm43p7q7GEoZoIsB0q2al1NZbbDktRe42bQ,17
26
- asktable_advisor-1.0.2.dist-info/RECORD,,
21
+ asktable_advisor-1.0.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ asktable_advisor-1.0.3.dist-info/METADATA,sha256=g2d9-t-zESjGNW16g_Lkb2uR6pspjfjqL1LlRgjLSQQ,7443
23
+ asktable_advisor-1.0.3.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
24
+ asktable_advisor-1.0.3.dist-info/entry_points.txt,sha256=m4MJ7R-05wjqqPf-awcMj9JqtwgiK2Du8UV_l6VNh6k,68
25
+ asktable_advisor-1.0.3.dist-info/top_level.txt,sha256=cDBvLmuBSm43p7q7GEoZoIsB0q2al1NZbbDktRe42bQ,17
26
+ asktable_advisor-1.0.3.dist-info/RECORD,,