Skip to main content

Add your description here

Project description

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"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

article_forestz-0.1.2.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

article_forestz-0.1.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file article_forestz-0.1.2.tar.gz.

File metadata

  • Download URL: article_forestz-0.1.2.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for article_forestz-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8241da4b27296722e0756f30b5fbc10cf9192a340199794713be11ae254d666c
MD5 8ac759a9268cdb1fc1f3f95bc8865bec
BLAKE2b-256 a6aeba698c8517e62f9bd66b6f06467fb2a60796194a418008f6e623ebac7608

See more details on using hashes here.

File details

Details for the file article_forestz-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for article_forestz-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 da0605195f6fb9e4992fdfecdc0f8ad86ac323f3864791c1cf43ff0731a569d9
MD5 8c0e17e7bcbe3e2343d63480fa5e9938
BLAKE2b-256 1e63edbdf85a8a6389a1f5842d4f142aca3599227ff69dd2b5f7e8b15e207fad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page