thinkai-framework 0.2.1__tar.gz → 0.2.2__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.
- {thinkai_framework-0.2.1/thinkai_framework.egg-info → thinkai_framework-0.2.2}/PKG-INFO +2 -2
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/README.md +1 -1
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/pyproject.toml +1 -1
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/tests/test_thinkai.py +1 -1
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/__init__.py +2 -2
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/pipeline.py +5 -4
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2/thinkai_framework.egg-info}/PKG-INFO +2 -2
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/.env.example +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/LICENSE +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/MANIFEST.in +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/config.example.yaml +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/agent_example.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/basic_usage.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/fastapi_demo.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/rag_example.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/setup.cfg +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/base.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/react.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/tool.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/client.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/config.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/models.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/exceptions.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/base.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/logging_middleware.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/retry_middleware.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/prompt/template.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/base.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/claude.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/deepseek.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/gemini.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/ollama.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/openai.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/openai_compatible.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/qwen.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/registry.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/shortcuts.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/chroma_store.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/document_loader.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/text_splitter.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/vector_store.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/__init__.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/context.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/manager.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/memory.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/storage.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/streaming.py +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/SOURCES.txt +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/dependency_links.txt +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/entry_points.txt +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/requires.txt +0 -0
- {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: thinkai-framework
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Enterprise-grade AI framework for seamless LLM integration
|
|
5
5
|
Author-email: ThinkAi Team <thinkai@example.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -80,7 +80,7 @@ Dynamic: license-file
|
|
|
80
80
|
# 基础安装 (轻量核心,无任何Web框架依赖)
|
|
81
81
|
pip install thinkai-framework
|
|
82
82
|
|
|
83
|
-
# Web
|
|
83
|
+
# Web开发支持(安装FastAPI依赖,用于构建API服务)
|
|
84
84
|
pip install thinkai-framework[web]
|
|
85
85
|
|
|
86
86
|
# 安装特定Provider
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""
|
|
2
2
|
ThinkAi - Enterprise-grade AI Framework
|
|
3
|
-
基于
|
|
3
|
+
基于Python异步的企业级AI大模型集成框架
|
|
4
4
|
开箱即用,支持多模型,RAG,Agent等核心能力
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
__version__ = "0.2.
|
|
7
|
+
__version__ = "0.2.2"
|
|
8
8
|
__author__ = "ThinkAi Team"
|
|
9
9
|
|
|
10
10
|
from thinkai.core.client import ThinkAI
|
|
@@ -173,10 +173,11 @@ class RAGPipeline:
|
|
|
173
173
|
|
|
174
174
|
if not context_docs:
|
|
175
175
|
# 没有检索到文档,直接提问
|
|
176
|
-
|
|
176
|
+
response = await self.ai_client.chat(question)
|
|
177
|
+
return response.content
|
|
177
178
|
|
|
178
179
|
# 2. 构建上下文
|
|
179
|
-
context = "\n\n".join([doc["
|
|
180
|
+
context = "\n\n".join([doc["text"] for doc in context_docs])
|
|
180
181
|
|
|
181
182
|
# 3. 构建增强Prompt
|
|
182
183
|
template_name = prompt_template or "rag_query"
|
|
@@ -187,9 +188,9 @@ class RAGPipeline:
|
|
|
187
188
|
)
|
|
188
189
|
|
|
189
190
|
# 4. 生成回答
|
|
190
|
-
response = await self.ai_client.
|
|
191
|
+
response = await self.ai_client.chat(prompt)
|
|
191
192
|
|
|
192
|
-
return response
|
|
193
|
+
return response.content
|
|
193
194
|
|
|
194
195
|
async def add_document(self, document_path: str):
|
|
195
196
|
"""添加单个文档"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: thinkai-framework
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Enterprise-grade AI framework for seamless LLM integration
|
|
5
5
|
Author-email: ThinkAi Team <thinkai@example.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -80,7 +80,7 @@ Dynamic: license-file
|
|
|
80
80
|
# 基础安装 (轻量核心,无任何Web框架依赖)
|
|
81
81
|
pip install thinkai-framework
|
|
82
82
|
|
|
83
|
-
# Web
|
|
83
|
+
# Web开发支持(安装FastAPI依赖,用于构建API服务)
|
|
84
84
|
pip install thinkai-framework[web]
|
|
85
85
|
|
|
86
86
|
# 安装特定Provider
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/logging_middleware.py
RENAMED
|
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
|
|
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
|
{thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
{thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/top_level.txt
RENAMED
|
File without changes
|