openthree 0.1.0__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.
openthree/__init__.py ADDED
@@ -0,0 +1,39 @@
1
+ """openthree —— 三生万物。
2
+
3
+ 道生一,一生二,二生三,三生万物。
4
+
5
+ 道 = 模型本身(唯一的智能来源)
6
+ 一 = 系统提示词(.openthree/prompts/system-prompts.md,柔性骨架,模型可自改)
7
+ 二 = functions(.openthree/functions/*.py,行动的能力)
8
+ 三 = ReAct 循环(观 → 思 → 行 → 观 …)
9
+ + 计划(.openthree/prompts/plan.md,长任务待办,每一步自动注入)
10
+ 万物 = 模型自己写出的新 function、新提示词、新工具、新世界
11
+
12
+ 写 function 只需要两件事:类型注解 + docstring。
13
+
14
+ from openthree import tool
15
+
16
+ @tool
17
+ def add(a: int, b: int) -> int:
18
+ \"\"\"把两个数相加。
19
+
20
+ Args:
21
+ a: 第一个数
22
+ b: 第二个数
23
+ \"\"\"
24
+ return a + b
25
+ """
26
+
27
+ from .kernel import KERNEL, Kernel
28
+ from .multimodal import (ImageError, ImageResult, content_text, image_result,
29
+ to_data_url)
30
+ from .tool import Tool, tool
31
+
32
+ __version__ = "0.1.0"
33
+
34
+ __all__ = [
35
+ "tool", "Tool", "KERNEL", "Kernel",
36
+ # 多模态:工具返回图片用 ImageResult
37
+ "ImageResult", "ImageError", "image_result", "to_data_url", "content_text",
38
+ "__version__",
39
+ ]
openthree/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ """`python -m openthree "你的任务"`"""
2
+ from .cli import main
3
+
4
+ if __name__ == "__main__":
5
+ raise SystemExit(main())