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.
Files changed (57) hide show
  1. {thinkai_framework-0.2.1/thinkai_framework.egg-info → thinkai_framework-0.2.2}/PKG-INFO +2 -2
  2. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/README.md +1 -1
  3. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/pyproject.toml +1 -1
  4. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/tests/test_thinkai.py +1 -1
  5. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/__init__.py +2 -2
  6. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/pipeline.py +5 -4
  7. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2/thinkai_framework.egg-info}/PKG-INFO +2 -2
  8. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/.env.example +0 -0
  9. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/LICENSE +0 -0
  10. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/MANIFEST.in +0 -0
  11. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/config.example.yaml +0 -0
  12. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/agent_example.py +0 -0
  13. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/basic_usage.py +0 -0
  14. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/fastapi_demo.py +0 -0
  15. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/examples/rag_example.py +0 -0
  16. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/setup.cfg +0 -0
  17. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/__init__.py +0 -0
  18. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/base.py +0 -0
  19. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/react.py +0 -0
  20. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/agent/tool.py +0 -0
  21. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/__init__.py +0 -0
  22. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/client.py +0 -0
  23. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/config.py +0 -0
  24. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/core/models.py +0 -0
  25. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/exceptions.py +0 -0
  26. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/__init__.py +0 -0
  27. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/base.py +0 -0
  28. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/logging_middleware.py +0 -0
  29. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/middleware/retry_middleware.py +0 -0
  30. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/prompt/template.py +0 -0
  31. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/__init__.py +0 -0
  32. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/base.py +0 -0
  33. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/claude.py +0 -0
  34. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/deepseek.py +0 -0
  35. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/gemini.py +0 -0
  36. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/ollama.py +0 -0
  37. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/openai.py +0 -0
  38. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/openai_compatible.py +0 -0
  39. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/qwen.py +0 -0
  40. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/registry.py +0 -0
  41. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/providers/shortcuts.py +0 -0
  42. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/__init__.py +0 -0
  43. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/chroma_store.py +0 -0
  44. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/document_loader.py +0 -0
  45. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/text_splitter.py +0 -0
  46. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/rag/vector_store.py +0 -0
  47. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/__init__.py +0 -0
  48. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/context.py +0 -0
  49. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/manager.py +0 -0
  50. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/memory.py +0 -0
  51. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/session/storage.py +0 -0
  52. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai/streaming.py +0 -0
  53. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/SOURCES.txt +0 -0
  54. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/dependency_links.txt +0 -0
  55. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/entry_points.txt +0 -0
  56. {thinkai_framework-0.2.1 → thinkai_framework-0.2.2}/thinkai_framework.egg-info/requires.txt +0 -0
  57. {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.1
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
@@ -22,7 +22,7 @@
22
22
  # 基础安装 (轻量核心,无任何Web框架依赖)
23
23
  pip install thinkai-framework
24
24
 
25
- # Web开发支持
25
+ # Web开发支持(安装FastAPI依赖,用于构建API服务)
26
26
  pip install thinkai-framework[web]
27
27
 
28
28
  # 安装特定Provider
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "thinkai-framework"
8
- version = "0.2.1"
8
+ version = "0.2.2"
9
9
  description = "Enterprise-grade AI framework for seamless LLM integration"
10
10
  readme = "README.md"
11
11
  license = "MIT"
@@ -14,7 +14,7 @@ class TestThinkAICore:
14
14
  """测试导入"""
15
15
  import thinkai
16
16
  assert hasattr(thinkai, '__version__')
17
- assert thinkai.__version__ == "0.2.1"
17
+ assert thinkai.__version__ == "0.2.2"
18
18
 
19
19
  def test_create_client(self):
20
20
  """测试创建客户端"""
@@ -1,10 +1,10 @@
1
1
  """
2
2
  ThinkAi - Enterprise-grade AI Framework
3
- 基于FastAPI的企业级AI大模型集成框架
3
+ 基于Python异步的企业级AI大模型集成框架
4
4
  开箱即用,支持多模型,RAG,Agent等核心能力
5
5
  """
6
6
 
7
- __version__ = "0.2.1"
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
- return await self.ai_client.complete(question)
176
+ response = await self.ai_client.chat(question)
177
+ return response.content
177
178
 
178
179
  # 2. 构建上下文
179
- context = "\n\n".join([doc["content"] for doc in context_docs])
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.complete(prompt)
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.1
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