V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
pipapa
V2EX  ›  分享创造

AI Agent Workflow 新范式 - TextPy: 编程与提示词协作的智能工作流引擎

  •  2
     
  •   pipapa · 64 天前 · 1218 次点击
    这是一个创建于 64 天前的主题,其中的信息可能已经有所发展或是发生改变。

    仓库链接

    🚀 核心设计哲学

    • 工作流 = 编程 + 提示词工程
    • 编程 ⇄ 提示词
    • 函数签名即工作流

    🧠 工作流程

    overview

    • 使用装饰器标记你需要编译的函数(这些函数不需要实现)
    • TextPy 将识别他们的功能,并为其生成代码或 prompt
    • 运行中,代码由执行代码的虚拟机执行( Python ),prompt 由执行 prompt 的虚拟机执行( LLM

    ✨ 革命性特性

    • 混合执行引擎:无缝对接传统代码与 AI 能力
    • 智能编译器:只需定义函数签名,自动生成自然语言指令或代码实现
    • 自复制架构:轻松实现递归式工作流

    👾 应用场景

    ** 每日 arXiv 速递 **

    自动抓取 arXiv 最新论文 → 智能筛选目标领域 → 摘要中英翻译 → 数据库存储 → 生成 Markdown 报告

    笔者实际应用:通过 GitHub Action 定时推送至个人博客

    #只需要函数签名,以及 workflow ,AICompiler 在 Runtime 时自动生成 prompt 或 code
    @code
    def get_the_rss_xml_file_str(*, url: str) -> str: ...
    
    @code(pypi=[get_the_rss_xml_file_str(url=ARXIV_URL)])
    def get_all_item_in_the_rss_file(*, xml_file_str: str) -> list[dict]: ...
    
    @text
    def check_topic_is_satisfactory(*, abstrct: str, topic: str) -> bool: ...
    
    @text
    def translate_the_en_abstract_to_zh(*, abstract: str) -> str: ...
    
    @code
    def check_link_in_db(*, db_path: str, link: str) -> bool: ...
    
    @code
    def save_article_to_db(*, db_path: str, item: dict): ...
    # These functions only need to be defined...
    

    ** 深度论文溯源 **

    通过 arXiv ID 下载 PDF → 文本提取 → 生成摘要 → 递归处理参考文献 → 可视化知识图谱

    技术亮点:所有功能(包括依赖安装)均由 AI 编译器动态生成,全程零编码!

    ▶️ 视频演示

    TextPy Example
    yibie
        1
    yibie  
       64 天前
    只是给了个介绍?哪里下载?哪里试用?
    pipapa
        2
    pipapa  
    OP
       64 天前
    Fantasyescape
        3
    Fantasyescape  
       63 天前
    有点意思
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1097 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 23:22 · PVG 07:22 · LAX 16:22 · JFK 19:22
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.