asktable-advisor 1.0.1__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.
- asktable_advisor-1.0.1/.env.example +28 -0
- asktable_advisor-1.0.1/CLAUDE.md +266 -0
- asktable_advisor-1.0.1/LICENSE +201 -0
- asktable_advisor-1.0.1/MANIFEST.in +16 -0
- asktable_advisor-1.0.1/PKG-INFO +265 -0
- asktable_advisor-1.0.1/README.md +225 -0
- asktable_advisor-1.0.1/asktable_advisor/__init__.py +18 -0
- asktable_advisor-1.0.1/asktable_advisor/__main__.py +156 -0
- asktable_advisor-1.0.1/asktable_advisor/__version__.py +4 -0
- asktable_advisor-1.0.1/asktable_advisor/agent/__init__.py +6 -0
- asktable_advisor-1.0.1/asktable_advisor/agent/advisor.py +337 -0
- asktable_advisor-1.0.1/asktable_advisor/agent/llm_client.py +195 -0
- asktable_advisor-1.0.1/asktable_advisor/agent/prompts.py +135 -0
- asktable_advisor-1.0.1/asktable_advisor/agent/tools.py +324 -0
- asktable_advisor-1.0.1/asktable_advisor/asktable/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor/asktable/client.py +271 -0
- asktable_advisor-1.0.1/asktable_advisor/asktable/inspector.py +210 -0
- asktable_advisor-1.0.1/asktable_advisor/asktable/resources/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor/config.py +79 -0
- asktable_advisor-1.0.1/asktable_advisor/conversation/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor/database/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor/database/data_generator.py +143 -0
- asktable_advisor-1.0.1/asktable_advisor/database/manager.py +228 -0
- asktable_advisor-1.0.1/asktable_advisor/database/schema_generator.py +148 -0
- asktable_advisor-1.0.1/asktable_advisor/knowledge/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor/utils/__init__.py +0 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/PKG-INFO +265 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/SOURCES.txt +34 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/dependency_links.txt +1 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/entry_points.txt +2 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/requires.txt +15 -0
- asktable_advisor-1.0.1/asktable_advisor.egg-info/top_level.txt +1 -0
- asktable_advisor-1.0.1/pyproject.toml +80 -0
- asktable_advisor-1.0.1/setup.cfg +4 -0
- asktable_advisor-1.0.1/tests/test_config.py +48 -0
- asktable_advisor-1.0.1/tests/test_scenarios.py +69 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Example .env file for asktable-advisor
|
|
2
|
+
# Copy this to .env and fill in your actual API keys
|
|
3
|
+
|
|
4
|
+
# AskTable API Configuration
|
|
5
|
+
# Get your API key from: https://app.asktable.com/settings/api-keys
|
|
6
|
+
ASKTABLE_API_KEY=
|
|
7
|
+
ASKTABLE_API_BASE=https://api.asktable.com
|
|
8
|
+
|
|
9
|
+
# LLM API Configuration (Aliyun Bailian - qwen3-max)
|
|
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=
|
|
13
|
+
|
|
14
|
+
# Agent Configuration
|
|
15
|
+
AGENT_MODEL=qwen3-max
|
|
16
|
+
AGENT_TEMPERATURE=0.7
|
|
17
|
+
AGENT_MAX_TOKENS=102400
|
|
18
|
+
|
|
19
|
+
# MySQL Database Configuration
|
|
20
|
+
MYSQL_HOST=
|
|
21
|
+
MYSQL_PORT=
|
|
22
|
+
MYSQL_USER=
|
|
23
|
+
MYSQL_PASSWORD=
|
|
24
|
+
MYSQL_DATABASE=
|
|
25
|
+
|
|
26
|
+
# Database Connection Pool (Optional)
|
|
27
|
+
MYSQL_POOL_SIZE=5
|
|
28
|
+
MYSQL_MAX_OVERFLOW=10
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
**AskTable Advisor** 是一个对话式 AI Agent,专为 AskTable 演示场景构建设计。
|
|
8
|
+
|
|
9
|
+
### 核心定位
|
|
10
|
+
|
|
11
|
+
这是一个**智能场景构建助手**,而不是通用框架+示例的架构。
|
|
12
|
+
|
|
13
|
+
用户只需用自然语言描述需求(如"创建一个电商平台场景"),Agent 自动:
|
|
14
|
+
1. 理解场景需求(通过对话询问细节)
|
|
15
|
+
2. 设计数据库结构(调用 LLM 生成 Schema)
|
|
16
|
+
3. 生成虚拟数据(调用 LLM 生成真实感数据)
|
|
17
|
+
4. 创建 AskTable 资源(datasource, bot, chat 等)
|
|
18
|
+
5. 配置权限管理(可选)
|
|
19
|
+
|
|
20
|
+
### 关键特性
|
|
21
|
+
|
|
22
|
+
- **对话式交互**:多轮对话,Agent 主动询问必要信息
|
|
23
|
+
- **AI 驱动**:使用阿里云百炼 qwen3-max 模型(通过 Anthropic 兼容接口)
|
|
24
|
+
- **工具调用**:Agent 使用 Tool Use 执行各种操作
|
|
25
|
+
- **场景管理**:查看、创建、完善 AskTable 演示场景
|
|
26
|
+
|
|
27
|
+
## Development Commands
|
|
28
|
+
|
|
29
|
+
### 环境设置
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# 安装依赖
|
|
33
|
+
pip install -e .
|
|
34
|
+
|
|
35
|
+
# 配置环境变量
|
|
36
|
+
cp .env.example .env
|
|
37
|
+
# 编辑 .env 文件,填入 API keys
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 运行 Agent
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 启动对话式 Agent
|
|
44
|
+
python -m asktable_advisor
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 代码质量
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# 代码格式化
|
|
51
|
+
black asktable_advisor/
|
|
52
|
+
ruff check --fix asktable_advisor/
|
|
53
|
+
|
|
54
|
+
# 类型检查
|
|
55
|
+
mypy asktable_advisor/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Architecture
|
|
59
|
+
|
|
60
|
+
### 项目结构
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
asktable_advisor/
|
|
64
|
+
├── __init__.py
|
|
65
|
+
├── __main__.py # CLI 入口(对话界面)
|
|
66
|
+
├── config.py # 配置管理(Pydantic Settings)
|
|
67
|
+
│
|
|
68
|
+
├── agent/ # AI Agent 核心
|
|
69
|
+
│ ├── advisor.py # 主 Agent 类(对话管理 + 工具执行)
|
|
70
|
+
│ ├── llm_client.py # LLM 客户端(qwen3-max via Anthropic SDK)
|
|
71
|
+
│ ├── tools.py # Agent 工具定义(Tool Use schema)
|
|
72
|
+
│ └── prompts.py # System prompts(Agent 知识和指令)
|
|
73
|
+
│
|
|
74
|
+
├── asktable/ # AskTable API 封装
|
|
75
|
+
│ ├── client.py # AskTable 客户端(封装 SDK)
|
|
76
|
+
│ ├── inspector.py # 项目检查器(读取现有资源)
|
|
77
|
+
│ └── resources/ # 资源管理模块(占位)
|
|
78
|
+
│
|
|
79
|
+
├── database/ # 数据库管理
|
|
80
|
+
│ ├── manager.py # 数据库连接管理(SQLAlchemy)
|
|
81
|
+
│ ├── schema_generator.py # Schema 生成器(使用 LLM)
|
|
82
|
+
│ └── data_generator.py # 数据生成器(使用 LLM)
|
|
83
|
+
│
|
|
84
|
+
└── utils/ # 工具函数
|
|
85
|
+
└── console.py # Rich console 封装
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 核心组件
|
|
89
|
+
|
|
90
|
+
#### 1. AdvisorAgent (`agent/advisor.py`)
|
|
91
|
+
|
|
92
|
+
主 Agent 类,负责:
|
|
93
|
+
- **对话管理**:维护对话历史,处理多轮交互
|
|
94
|
+
- **LLM 调用**:通过 LLMClient 与 qwen3-max 交互
|
|
95
|
+
- **工具执行**:根据 LLM 的 tool use 调用执行具体操作
|
|
96
|
+
- **状态管理**:跟踪对话状态和上下文
|
|
97
|
+
|
|
98
|
+
工作流程:
|
|
99
|
+
1. 接收用户消息
|
|
100
|
+
2. 调用 LLM(附带 system prompt 和 tools)
|
|
101
|
+
3. 如果 LLM 返回 tool use,执行工具并返回结果给 LLM
|
|
102
|
+
4. 如果 LLM 返回文本响应,返回给用户
|
|
103
|
+
5. 循环直到完成任务
|
|
104
|
+
|
|
105
|
+
#### 2. LLMClient (`agent/llm_client.py`)
|
|
106
|
+
|
|
107
|
+
LLM 客户端,负责:
|
|
108
|
+
- 使用 Anthropic SDK 与阿里云百炼交互
|
|
109
|
+
- 支持 Tool Use(function calling)
|
|
110
|
+
- 处理消息格式转换
|
|
111
|
+
- 提取工具调用和文本响应
|
|
112
|
+
|
|
113
|
+
配置:
|
|
114
|
+
- Base URL: `https://dashscope.aliyuncs.com/apps/anthropic`
|
|
115
|
+
- Model: `qwen3-max`
|
|
116
|
+
- API Key: 阿里云 DashScope API Key
|
|
117
|
+
|
|
118
|
+
#### 3. Agent Tools (`agent/tools.py`)
|
|
119
|
+
|
|
120
|
+
定义 Agent 可用的工具,符合 Anthropic Tool Use 规范:
|
|
121
|
+
- `inspect_asktable_project` - 检查项目现有资源
|
|
122
|
+
- `design_database_schema` - LLM 设计数据库结构
|
|
123
|
+
- `generate_sample_data` - LLM 生成虚拟数据
|
|
124
|
+
- `execute_sql` - 执行 SQL 语句
|
|
125
|
+
- `create_asktable_datasource` - 创建数据源
|
|
126
|
+
- `create_asktable_bot` - 创建 Bot
|
|
127
|
+
- `create_asktable_chat` - 创建 Chat
|
|
128
|
+
- `enhance_bot` - 增强现有 Bot
|
|
129
|
+
- `create_permissions` - 配置权限(占位符)
|
|
130
|
+
- `ask_user` - 向用户询问问题
|
|
131
|
+
|
|
132
|
+
#### 4. Schema & Data Generators (`database/`)
|
|
133
|
+
|
|
134
|
+
**SchemaGenerator**:
|
|
135
|
+
- 根据场景描述调用 LLM 生成数据库表结构
|
|
136
|
+
- 返回 SQL DDL 语句(CREATE TABLE)
|
|
137
|
+
- 包含最佳实践(主键、外键、索引、时间戳等)
|
|
138
|
+
|
|
139
|
+
**DataGenerator**:
|
|
140
|
+
- 根据 Schema 调用 LLM 生成虚拟数据
|
|
141
|
+
- 返回 SQL INSERT 语句
|
|
142
|
+
- 确保数据真实感和关联正确性
|
|
143
|
+
|
|
144
|
+
#### 5. AskTable Client & Inspector (`asktable/`)
|
|
145
|
+
|
|
146
|
+
**AskTableClient**:
|
|
147
|
+
- 封装 AskTable SDK
|
|
148
|
+
- 提供统一的 API 接口(datasource, bot, chat 操作)
|
|
149
|
+
- 处理错误和日志
|
|
150
|
+
|
|
151
|
+
**AskTableInspector**:
|
|
152
|
+
- 读取项目现有资源
|
|
153
|
+
- 识别场景(datasource + bots + chats)
|
|
154
|
+
- 提供优化建议
|
|
155
|
+
|
|
156
|
+
### 配置管理
|
|
157
|
+
|
|
158
|
+
使用 `pydantic-settings` 从环境变量加载配置:
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
class AdvisorSettings(BaseSettings):
|
|
162
|
+
# AskTable API
|
|
163
|
+
asktable_api_key: str
|
|
164
|
+
asktable_api_base: str = "https://api.asktable.com"
|
|
165
|
+
|
|
166
|
+
# LLM API(阿里云百炼)
|
|
167
|
+
anthropic_base_url: str = "https://dashscope.aliyuncs.com/apps/anthropic"
|
|
168
|
+
anthropic_api_key: str
|
|
169
|
+
|
|
170
|
+
# Agent
|
|
171
|
+
agent_model: str = "qwen3-max"
|
|
172
|
+
agent_temperature: float = 0.7
|
|
173
|
+
agent_max_tokens: int = 4096
|
|
174
|
+
|
|
175
|
+
# MySQL
|
|
176
|
+
mysql_host: str
|
|
177
|
+
mysql_port: int = 3306
|
|
178
|
+
mysql_user: str
|
|
179
|
+
mysql_password: str
|
|
180
|
+
mysql_database: str = "asktable_advisor"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 依赖说明
|
|
184
|
+
|
|
185
|
+
- `anthropic`: Anthropic SDK(用于调用 qwen3-max via 兼容接口)
|
|
186
|
+
- `asktable`: AskTable Python SDK
|
|
187
|
+
- `sqlalchemy`: ORM 和数据库连接管理
|
|
188
|
+
- `pymysql`: MySQL 驱动
|
|
189
|
+
- `pydantic-settings`: 类型安全的配置管理
|
|
190
|
+
- `rich`: 美化命令行输出
|
|
191
|
+
|
|
192
|
+
## Important Notes
|
|
193
|
+
|
|
194
|
+
### LLM API 集成
|
|
195
|
+
|
|
196
|
+
- 使用阿里云百炼提供的 Anthropic 兼容接口
|
|
197
|
+
- Base URL: `https://dashscope.aliyuncs.com/apps/anthropic`
|
|
198
|
+
- 模型: `qwen3-max`
|
|
199
|
+
- API Key: DashScope API Key(不是 Anthropic 官方 key)
|
|
200
|
+
|
|
201
|
+
### Tool Use 流程
|
|
202
|
+
|
|
203
|
+
1. Agent 发送消息到 LLM,附带 tools 定义
|
|
204
|
+
2. LLM 返回 tool_use blocks
|
|
205
|
+
3. Agent 执行工具,获取结果
|
|
206
|
+
4. Agent 将 tool_result 返回给 LLM
|
|
207
|
+
5. LLM 处理结果,可能继续调用工具或返回最终响应
|
|
208
|
+
|
|
209
|
+
### 对话管理
|
|
210
|
+
|
|
211
|
+
- 使用 `conversation_history: List[MessageParam]` 维护对话
|
|
212
|
+
- 每轮包含:user message → assistant response (可能含 tool use) → tool results
|
|
213
|
+
- System prompt 在每次 LLM 调用时提供
|
|
214
|
+
|
|
215
|
+
### 扩展新工具
|
|
216
|
+
|
|
217
|
+
要添加新工具:
|
|
218
|
+
1. 在 `agent/tools.py` 中定义工具 schema
|
|
219
|
+
2. 在 `agent/advisor.py` 的 `_execute_tool()` 中添加处理逻辑
|
|
220
|
+
3. 实现工具的具体功能(如 `_tool_xxx()`)
|
|
221
|
+
|
|
222
|
+
### 数据库操作
|
|
223
|
+
|
|
224
|
+
- 使用 SQLAlchemy 管理连接
|
|
225
|
+
- 支持事务和错误回滚
|
|
226
|
+
- 连接池配置可调(pool_size, max_overflow)
|
|
227
|
+
|
|
228
|
+
## CLI Usage
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
# 启动对话
|
|
232
|
+
python -m asktable_advisor
|
|
233
|
+
|
|
234
|
+
# 交互示例
|
|
235
|
+
你: 创建一个电商场景
|
|
236
|
+
Advisor: 好的!让我了解一下...
|
|
237
|
+
[Agent 询问细节]
|
|
238
|
+
你: B2C 零售,包含订单、商品、用户
|
|
239
|
+
Advisor: 收到!开始创建...
|
|
240
|
+
[Agent 执行工具,显示进度]
|
|
241
|
+
🎉 场景创建完成!
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
## Testing
|
|
245
|
+
|
|
246
|
+
目前测试框架尚未完整实现。可以通过:
|
|
247
|
+
1. 直接运行 Agent 进行集成测试
|
|
248
|
+
2. 测试各个组件的连接性
|
|
249
|
+
|
|
250
|
+
## Future Enhancements
|
|
251
|
+
|
|
252
|
+
1. **权限管理**:完整实现 Role 和 Policy 配置
|
|
253
|
+
2. **Report/Canvas**:支持创建可视化报告和画布
|
|
254
|
+
3. **ATS 测试**:集成自动化测试套件
|
|
255
|
+
4. **流式输出**:实现 LLM streaming for better UX
|
|
256
|
+
5. **对话历史持久化**:保存和恢复对话
|
|
257
|
+
6. **多租户支持**:支持多个 AskTable 项目
|
|
258
|
+
|
|
259
|
+
## Notes for AI Assistants
|
|
260
|
+
|
|
261
|
+
当你需要修改代码时:
|
|
262
|
+
- 理解 Agent 是对话式的,所有操作通过 tool use 完成
|
|
263
|
+
- LLM 调用使用阿里云百炼,不是 Anthropic 官方 API
|
|
264
|
+
- 工具执行结果需要返回给 LLM,不是直接返回用户
|
|
265
|
+
- 保持 system prompt 的完整性和专业性
|
|
266
|
+
- 确保错误处理和日志记录完善
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Include documentation
|
|
2
|
+
include README.md
|
|
3
|
+
include LICENSE
|
|
4
|
+
include CLAUDE.md
|
|
5
|
+
|
|
6
|
+
# Include configuration examples
|
|
7
|
+
include .env.example
|
|
8
|
+
|
|
9
|
+
# Include package data
|
|
10
|
+
recursive-include asktable_advisor *.py
|
|
11
|
+
|
|
12
|
+
# Exclude unnecessary files
|
|
13
|
+
global-exclude __pycache__
|
|
14
|
+
global-exclude *.py[cod]
|
|
15
|
+
global-exclude .DS_Store
|
|
16
|
+
exclude .gitignore
|