Skip to content

Commit c8608ee

Browse files
committed
doc: add readme
1 parent 10409fb commit c8608ee

File tree

3 files changed

+13
-677
lines changed

3 files changed

+13
-677
lines changed

assets/README.zh-CN.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
<p align="center">
2+
<img src="toonify.png" alt="Toonify Logo" width="400">
3+
</p>
4+
15
# TOON(面向Token的对象表示法)
26

3-
[English](../README.md) | [中文](README.zh-CN.md)
7+
[English](../README.md) | [中文](README.zh-CN.md) | [한국어](README.ko.md)
48

59
一种紧凑、人类可读的序列化格式,专为向大型语言模型传递结构化数据而设计,显著减少Token使用量。
610

@@ -427,7 +431,7 @@ python examples/advanced_features.py
427431

428432
**💰 成本影响:** 按GPT-4定价计算,TOON每百万次API请求**节省$2,147**,每十亿Token**节省$5,408**
429433

430-
**[📊 查看完整基准测试结果 →](benchmark/RESULTS.md)**
434+
**[📊 查看完整基准测试结果 →](../benchmark/RESULTS.md)**
431435

432436
## 贡献
433437

benchmark/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This benchmark suite demonstrates the **MASSIVE memory and token savings** achieved by using TOON (Token-Oriented Object Notation) compared to JSON for structured data.
44

5+
**NEW:** TOON now supports direct conversion from [Pydantic models](../examples/pydantic_usage.py) with `encode_pydantic()` and `decode_to_pydantic()` functions!
6+
57
## 🚀 HEADLINE RESULTS
68

79
**Tested across 50 diverse, real-world datasets:**
@@ -116,6 +118,9 @@ pip install -e .
116118

117119
# tiktoken is required for token counting
118120
pip install tiktoken
121+
122+
# Pydantic is optional but recommended for model validation
123+
pip install pydantic
119124
```
120125

121126
### Run All Benchmarks
@@ -301,7 +306,8 @@ All benchmark code is open source and can be reviewed in this directory.
301306
## 📚 Additional Resources
302307

303308
- [TOON Format Specification](https://github.com/toon-format/toon)
304-
- [Main README](../README.md)
309+
- [Main README](../README.md) - Includes Pydantic integration documentation
310+
- [Pydantic Examples](../examples/pydantic_usage.py) - Direct conversion from Pydantic models
305311
- [Python Package](https://pypi.org/project/toonify/)
306312

307313
## 🤝 Contributing

0 commit comments

Comments
 (0)