Skip to main content

2 使用大模型 做路由层

{"方向1":{'小方向1':'', '小方向2':"", "如何解决河道问题":"",} "方向2":}

方法 类似github 分支 分支与合并的关系 1 - 2 - 3 - 4 \ 2-1 \ 3-1 \ 2-2/ \ 3-2

使用树的数据结构, 并进行串联

概念

什么是河道: 河道: 1 2 3 4 5 11 22 33 44 55

client

1 抽取出这些文件

2 经过路由层

路由层 ---->

queryer

3 对于经过路由层处理归类好的文章进行合并

4 对初始化的文章结构采用合并的策略

5 对于添加动作, 则是维持之前的决策结构不大变化, 而微调其结构

6 是否验证的标签, 这很重要 未来还可以加入概率或者神经网络方式

7 调用 TODO 然后再说

from article_forestz import MyLocalLLMClient,MyArticleDecisionMaker,ArticleForest

For local testing, using a simpler model or mock:

my_llm_client = MyLocalLLMClient( model_name="gemini-2.5-flash-preview-04-17-nothinking" )
my_decision_maker = MyArticleDecisionMaker(llm_client=my_llm_client) article_forest = ArticleForest(article_decision_maker=my_decision_maker)

inputs = [{"id": "Init1", "content": text1}, {"id": "Init2", "content": text2}, {"id": "Init3", "content": text3}]

article_forest.build_initial_forest(inputs)

article_forest.print_tree() article_forest.export_graphviz()

new_articles = [ {"id": "NewA1", "content": test4}, # 归入AI类,可能作为新子层 ]

for article in new_articles: article_forest.add_article(article["content"], article["id"])

Metadata

Release files for article-forestz 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for article-forestz 0.1.2
File Size Uploaded Provenance
article_forestz-0.1.2.tar.gz 11.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for article-forestz 0.1.2
File Interpreter ABI Platform
article_forestz-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / article_forestz-0.1.2.tar.gz

Download URL article_forestz-0.1.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8241da4b27296722e0756f30b5fbc10cf9192a340199794713be11ae254d666c
BLAKE2b-256 checksum
How to use checksums
a6aeba698c8517e62f9bd66b6f06467fb2a60796194a418008f6e623ebac7608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Release files / article_forestz-0.1.2-py3-none-any.whl

Download URL article_forestz-0.1.2-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da0605195f6fb9e4992fdfecdc0f8ad86ac323f3864791c1cf43ff0731a569d9
BLAKE2b-256 checksum
How to use checksums
1e63edbdf85a8a6389a1f5842d4f142aca3599227ff69dd2b5f7e8b15e207fad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.11

Security for article-forestz 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page