asktable-advisor 1.0.1__tar.gz → 1.0.3__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.
Files changed (36) hide show
  1. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/.env.example +9 -3
  2. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/PKG-INFO +1 -1
  3. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/__main__.py +26 -13
  4. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/__version__.py +1 -1
  5. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/agent/llm_client.py +6 -4
  6. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/config.py +8 -2
  7. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/PKG-INFO +1 -1
  8. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/pyproject.toml +1 -1
  9. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/CLAUDE.md +0 -0
  10. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/LICENSE +0 -0
  11. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/MANIFEST.in +0 -0
  12. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/README.md +0 -0
  13. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/__init__.py +0 -0
  14. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/agent/__init__.py +0 -0
  15. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/agent/advisor.py +0 -0
  16. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/agent/prompts.py +0 -0
  17. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/agent/tools.py +0 -0
  18. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/asktable/__init__.py +0 -0
  19. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/asktable/client.py +0 -0
  20. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/asktable/inspector.py +0 -0
  21. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/asktable/resources/__init__.py +0 -0
  22. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/conversation/__init__.py +0 -0
  23. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/database/__init__.py +0 -0
  24. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/database/data_generator.py +0 -0
  25. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/database/manager.py +0 -0
  26. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/database/schema_generator.py +0 -0
  27. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/knowledge/__init__.py +0 -0
  28. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor/utils/__init__.py +0 -0
  29. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/SOURCES.txt +0 -0
  30. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/dependency_links.txt +0 -0
  31. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/entry_points.txt +0 -0
  32. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/requires.txt +0 -0
  33. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/asktable_advisor.egg-info/top_level.txt +0 -0
  34. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/setup.cfg +0 -0
  35. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/tests/test_config.py +0 -0
  36. {asktable_advisor-1.0.1 → asktable_advisor-1.0.3}/tests/test_scenarios.py +0 -0
@@ -8,13 +8,19 @@ ASKTABLE_API_BASE=https://api.asktable.com
8
8
 
9
9
  # LLM API Configuration (Aliyun Bailian - qwen3-max)
10
10
  # Get your DashScope API key from: https://dashscope.console.aliyun.com/apiKey
11
- ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/apps/anthropic
12
- ANTHROPIC_API_KEY=
11
+ # Note: Use ADVISOR_ANTHROPIC_* prefix to avoid conflicts with system environment variables
12
+ ADVISOR_ANTHROPIC_BASE_URL=https://dashscope.aliyuncs.com/apps/anthropic
13
+ ADVISOR_ANTHROPIC_API_KEY=
13
14
 
14
15
  # Agent Configuration
15
16
  AGENT_MODEL=qwen3-max
16
17
  AGENT_TEMPERATURE=0.7
17
- AGENT_MAX_TOKENS=102400
18
+ AGENT_MAX_TOKENS=8192 # Maximum: 65536 for qwen3-max
19
+
20
+ # Logging Configuration
21
+ # Options: DEBUG, INFO, WARNING, ERROR, CRITICAL
22
+ # Use WARNING or ERROR to reduce log output in production
23
+ LOG_LEVEL=WARNING
18
24
 
19
25
  # MySQL Database Configuration
20
26
  MYSQL_HOST=
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: asktable-advisor
3
- Version: 1.0.1
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,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.0"
3
+ __version__ = "1.0.3"
4
4
  __version_info__ = tuple(int(x) for x in __version__.split("."))
@@ -36,8 +36,9 @@ class LLMClient:
36
36
 
37
37
  # Initialize Anthropic client with Aliyun Bailian endpoint
38
38
  self.client = Anthropic(
39
- api_key=settings.anthropic_api_key,
40
- base_url=settings.anthropic_base_url,
39
+ api_key=settings.advisor_anthropic_api_key,
40
+ base_url=settings.advisor_anthropic_base_url,
41
+ timeout=60.0, # Set 60 second timeout to avoid streaming requirement
41
42
  )
42
43
 
43
44
  self.model = settings.agent_model
@@ -46,7 +47,7 @@ class LLMClient:
46
47
 
47
48
  logger.info(
48
49
  f"LLM client initialized: model={self.model}, "
49
- f"base_url={settings.anthropic_base_url}"
50
+ f"base_url={settings.advisor_anthropic_base_url}"
50
51
  )
51
52
 
52
53
  def create_message(
@@ -89,7 +90,8 @@ class LLMClient:
89
90
  # TODO: Implement streaming response handling
90
91
  logger.warning("Streaming not yet implemented, falling back to non-streaming")
91
92
 
92
- response = self.client.messages.create(**params)
93
+ # Set explicit timeout to avoid streaming requirement for large max_tokens
94
+ response = self.client.messages.create(**params, timeout=60.0)
93
95
 
94
96
  logger.debug(
95
97
  f"Received response: "
@@ -22,11 +22,11 @@ class AdvisorSettings(BaseSettings):
22
22
  )
23
23
 
24
24
  # LLM API Configuration (Aliyun Bailian - qwen3-max)
25
- anthropic_base_url: str = Field(
25
+ advisor_anthropic_base_url: str = Field(
26
26
  default="https://dashscope.aliyuncs.com/apps/anthropic",
27
27
  description="Anthropic-compatible API base URL (Aliyun Bailian)",
28
28
  )
29
- anthropic_api_key: str = Field(
29
+ advisor_anthropic_api_key: str = Field(
30
30
  ...,
31
31
  description="DashScope API key for Aliyun Bailian",
32
32
  )
@@ -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.1
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,6 +1,6 @@
1
1
  [project]
2
2
  name = "asktable-advisor"
3
- version = "1.0.1"
3
+ version = "1.0.3"
4
4
  description = "Conversational AI Agent for building AskTable demo scenarios"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"