Hacker News 中文摘要

RSS订阅

ChatGPT容器现可运行bash、pip/npm安装包及下载文件 -- ChatGPT Containers can now run bash, pip/npm install packages and download files

文章摘要

ChatGPT容器功能大幅升级,现已支持直接运行Bash命令、Node.js等语言,并能通过代理机制使用pip/npm安装包,还能下载网络文件。这些新功能显著扩展了其代码执行能力。

文章总结

ChatGPT容器功能迎来重大升级:支持Bash命令、多语言运行及文件下载

2026年1月26日,ChatGPT的代码执行容器功能获得突破性更新。这项最初名为"Code Interpreter"的功能,虽曾被低调更名为"Advanced Data Analysis",但始终缺乏详细文档。此次升级包含以下核心改进:

  1. 多语言支持
  • 直接运行Bash命令(此前仅支持Python)
  • 新增Node.js环境,可执行JavaScript代码
  • 成功运行10种语言的"Hello World"程序(Ruby/Perl/PHP/Go/Java/Swift/Kotlin/C/C++),暂不支持Rust
  1. 依赖管理
  • 通过专用代理机制支持pip installnpm install
  • 环境变量显示配置了PyPI/NPM等私有镜像源
  1. 文件操作
  • 新增container.download工具,可从公开URL下载文件至沙箱容器
  • 下载请求通过微软Azure云服务器(IP:52.230.164.178)代理
  • 采用安全机制防止数据泄露(需先通过web.run访问URL)

技术细节: - 代理服务器:applied-caas-gateway1.internal.api.openai.org - 用户代理标识:ChatGPT-User/1.0 - 支持交互式Bash会话记录(Activity面板可验证真实执行过程)

潜在限制: - 容器仍无法主动发起外网请求 - 存在未启用的注册表配置(Docker/Rust等) - 官方文档严重缺失

作者通过实验验证,这些功能在免费版ChatGPT中同样可用,并呼吁OpenAI完善文档体系。完整工具列表显示,当前系统还包含网页访问、日历管理、图像生成等30余种功能模块。

(注:本文保留了原始技术细节,删减了部分实验过程截图和重复的功能描述,突出了容器能力升级的核心信息。)

评论总结

以下是评论内容的总结,涵盖主要观点和论据,并保持不同观点的平衡性:

  1. ChatGPT的新功能支持多种编程语言

    • 用户发现ChatGPT现在支持Node.js、Ruby、Perl、PHP、Go、Java、Swift、Kotlin、C和C++等语言,但官方未明确说明。
    • 引用:
      • "Regular default ChatGPT can also now run code in Node.js, Ruby, Perl, PHP, Go, Java, Swift, Kotlin, C and C++."
      • "I'm not sure when these new features landed because they're not listed anywhere in the official ChatGPT release notes."
  2. 依赖管理和动态语言的未来

    • 有人认为依赖管理(如npm/pip)可能变得不再必要,因为LLM可以直接生成所需功能。
    • 动态语言(如Python/JS)的优势可能减弱,因为LLM编写静态语言(如Rust/Go)的难度已接近。
    • 引用:
      • "Dependancies introduce unnecessary LOC and features which are, more and more, just written by LLMs themselves."
      • "Python/JS/Ruby/etc. were good tradeoffs when developer time mattered. But now that most code is written by LLMs, it's as 'hard' for the LLM to write Python as it is to write Rust/Go."
  3. 即时应用和开发环境的未来

    • 预测未来可能出现“一次性应用”,由ChatGPT即时生成并在云沙箱中运行。
    • 讨论本地工具调用和持久化开发环境的可能性。
    • 引用:
      • "Maybe soon we have single use applications... the App is shutdown and thrown away."
      • "I wonder when they'll start offering virtual, persistent dev environments..."
  4. 功能限制和问题反馈

    • 部分用户遇到功能问题,如安装包失败(如cowsay)或Gemini失去运行JavaScript/Python的能力。
    • 引用:
      • "I tried getting it to install cowsay and it ran into authentication issues."
      • "Has Gemini lost its ability to run javascript and python?"
  5. 安全性和滥用担忧

    • 对不安全代码生成和包管理系统的批评,甚至调侃LLM可能被滥用(如挖矿或连接导弹系统)。
    • 引用:
      • "One insecure buggy code generator connected to an insecure packaging 'system', PyPI."
      • "How long before they'll be mining crypto?"
  6. 用户体验比较

    • 部分用户认为ChatGPT的语音接口体验较差,转而使用Claude Code。
    • 引用:
      • "I find the chatgpt voice interface to be infuriating; it literally talks in circles."
      • "I jumped on the Claude Code bandwagon and I dropped off chatgpt."

总结:评论反映了对ChatGPT新功能的关注、对编程语言和依赖管理的未来讨论,以及对安全性、功能限制和用户体验的多样化观点。