dwim-shell-command

dwim-shell-command

Emacs插件实现命令行工具与工作流的无缝集成

dwim-shell-command是一个Emacs插件,旨在将命令行工具无缝集成到Emacs工作流中。它提供了定义新函数的简便方法,这些函数可将命令行实用程序应用于当前缓冲区或dired文件。该插件支持异步执行、noweb模板、自动文件注入、缓冲区焦点管理和进度条显示等功能,大大提高了命令行工具在Emacs中的使用效率。

Emacs命令行工具dwim-shell-commandshell脚本异步执行Github开源项目

👉 [[https://github.com/sponsors/xenodium][通过 GitHub Sponsors 支持这项工作]]

  • 将命令行实用工具引入你的 Emacs 工作流程

使用 =dwim-shell-command-on-marked-files= 来定义新函数,将命令行实用工具应用于当前缓冲区或 [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html][dired]] 文件。

例如:

#+begin_src emacs-lisp :lexical no (defun my/dwim-shell-command-convert-to-gif () "将所有标记的视频转换为优化的 gif。" (interactive) (dwim-shell-command-on-marked-files "转换为 gif" "ffmpeg -loglevel quiet -stats -y -i '<<f>>' -pix_fmt rgb24 -r 15 '<<fne>>.gif'" :utils "ffmpeg")) #+end_src

可以这样应用:

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/01df6d94-eb6d-437d-a6f5-9d792fd0f3d8.webp" width="60%" />

这使得包装单行命令变得非常简单,所以让我们再多做一些...

** 单行命令

#+begin_src emacs-lisp :lexical no (defun my/dwim-shell-command-convert-image-to-jpg () "将所有标记的图像转换为 jpg。" (interactive) (dwim-shell-command-on-marked-files "转换为 jpg" "convert -verbose '<<f>>' '<<fne>>.jpg'" :utils "convert"))

(defun my/dwim-shell-command-convert-audio-to-mp3 () "将所有标记的音频转换为 mp3。" (interactive) (dwim-shell-command-on-marked-files "转换为 mp3" "ffmpeg -stats -n -i '<<f>>' -acodec libmp3lame '<<fne>>.mp3'" :utils "ffmpeg"))

(defun dwim-shell-commands-http-serve-dir () "HTTP 服务当前目录。" (interactive) (dwim-shell-command-on-marked-files "HTTP 服务当前目录" "python3 -m http.server" :utils "python3" :focus-now t :no-progress t)) #+end_src

** 多行脚本

#+begin_src emacs-lisp :lexical no (defun dwim-shell-commands-image-view-location-in-openstreetmap () "在地图/浏览器中打开图像位置。" (interactive) (dwim-shell-command-on-marked-files "浏览位置" "lat="$(exiftool -csv -n -gpslatitude -gpslongitude '<<f>>' | tail -n 1 | cut -s -d',' -f2-2)" if [ -z "$lat" ]; then echo "无纬度" exit 1 fi lon="$(exiftool -csv -n -gpslatitude -gpslongitude '<<f>>' | tail -n 1 | cut -s -d',' -f3-3)" if [ -z "$lon" ]; then echo "无经度" exit 1 fi if [[ $OSTYPE == darwin* ]]; then open "http://www.openstreetmap.org/?mlat=${lat}&mlon=${lon}&layers=C\" else xdg-open "http://www.openstreetmap.org/?mlat=${lat}&mlon=${lon}&layers=C\" fi" :utils "exiftool" :error-autofocus t :silent-success t)) #+end_src

** 选择你的语言

#+begin_src emacs-lisp :lexical no (defun dwim-shell-command-csv-to-json-via-python () "将 csv 文件转换为 json(通过 Python)。" (interactive) (dwim-shell-command-on-marked-files "将 csv 文件转换为 json(通过 Python)。" " import csv import json text = json.dumps({ "values": list(csv.reader(open('<<f>>')))}) fpath = '<<fne>>.json' with open(fpath , 'w') as f: f.write(text)" :shell-util "python" :shell-args "-c"))

(defun dwim-shell-command-csv-to-json-via-swift () "将 csv 文件转换为 json(通过 Swift)。" (interactive) (dwim-shell-command-on-marked-files "将 csv 文件转换为 json(通过 Swift)。" "import Foundation import TabularData let filePath = "<<f>>" print("读取 \(filePath)") let content = try String(contentsOfFile: filePath).trimmingCharacters(in: .whitespacesAndNewlines) let parsedCSV = content.components(separatedBy: CSVWritingOptions().newline).map{ $0.components(separatedBy: ",") } let jsonEncoder = JSONEncoder() let jsonData = try jsonEncoder.encode(["value": parsedCSV]) let json = String(data: jsonData, encoding: String.Encoding.utf8) let outURL = URL(fileURLWithPath:"<<fne>>.json") try json!.write(to: outURL, atomically: true, encoding: String.Encoding.utf8) print("写入 \(outURL)")" :shell-pipe "swift -")) #+end_src

  • 构建丰富的工具箱(或使用我的)

虽然你可能想随时间构建自己的命令工具箱,但我也[[#my-toolbox][分享了我的工具箱]](接近 100 个命令)。

如果你创建了我列表中没有的新命令,我很乐意听到。提交一个[[https://github.com/xenodium/dwim-shell-command/issues/new][issue]]或直接联系我([[https://indieweb.social/@xenodium][Mastodon]] / [[https://twitter.com/xenodium][Twitter]] / [[https://www.reddit.com/user/xenodium][Reddit]] / [[mailto:me__AT__xenodium.com][Email]])。

  • =shell-command=、=async-shell-command= 和 =dired-do-shell-command= 的替代品

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/eb3ee314-855f-45a7-b459-3280afb0dd1d.png" width="50%" />

** 运行 M-x =dwim-shell-command= 来执行一次性的 [[https://en.wikipedia.org/wiki/DWIM][DWIM]] shell 命令

  • 哪些文件

=dwim-shell-command= 确定你想要命令操作的文件。

如果访问的是 [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html][dired]] 缓冲区,则使用标记的文件。

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/e9666a4b-4efd-4eec-ad73-3ff7db047498.gif" width="75%" />

如果访问的是与文件关联的缓冲区,则使用该文件。

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/ce911916-3fc1-431b-b54b-05806a0197bc.png" width="75%" />

  • noweb 模板

使用以下任一方式操作选定的文件:

  • =<<f>>= (文件路径)
  • =<<fne>>= (不带扩展名的文件路径)
  • =<<e>>= (扩展名)
  • =<<td>>= (生成临时目录)
  • =<<*>>= (所有文件连接)
  • =<<cb>>= (剪贴板)

例如:

对于选定的文件 =path/to/image1.png= 和 =path/to/image2.png=

=convert <<f>> <<fne>>.jpg= 展开为

#+begin_src sh convert path/to/image1.png path/to/image1.jpg convert path/to/image2.png path/to/image2.jpg #+end_src

而 =ls -lh <<*>>= 展开为

#+begin_src sh ls -lh path/to/image1.png path/to/image2.png #+end_src

  • 焦点

=dwim-shell-command= 创建一个进程缓冲区来捕获命令输出,但默认情况下既不显示也不聚焦于它。相反,它试图猜测更方便聚焦的内容。

当进程繁忙时,在迷你缓冲区中显示一个旋转器。不会改变焦点。 #+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/190e53db-dd18-48db-87ae-395d999ce924.webp" width="50%" />

处理完成后:

如果在 =default-directory= 中创建了任何文件,跳转到 [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html][dired]] 缓冲区并将光标移动到新文件上(通过 [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired-Enter.html][dired-jump]])。

[[file:images/showme.png]]

如果没有创建新文件,自动切换焦点到进程缓冲区并显示其输出。

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/fab72a85-ae53-4da5-a58f-75ec009b08c0.webp" width="50%" />

注意:你可以通过在命令前加空格来防止这种自动聚焦。

" convert '<<f>>' '<<fne>>.jpg'"

如果 shell 命令导致任何错误,会提供聚焦进程缓冲区并显示其输出的选项。

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/3c123451-76aa-4975-90ee-029058b40900.png" width="75%" />

*** 轻松创建实用工具

像 [[https://ffmpeg.org/][ffmpeg]] 这样的命令行工具可以轻松集成到 Emacs 工作流中(无需记住任何标志或参数),只需将命令调用包装成函数并通过 =M-x=(或你喜欢的绑定)调用即可。从 =dwim-shell-command= 继承相同的 DWIM 行为。

  • 快速退出

进程缓冲区是只读的,可以通过按 =q= 键快速关闭。

  • 更可重用的历史记录

由于使用了模板,命令历史自动变得可在其他上下文中重用。

#+HTML: <img src="https://yellow-cdn.veclightyear.com/835a84d5/3aee7cbb-54be-4ae3-9f6d-9ca294b9ed7d.png" width="75%" />

  • 安装

=dwim-shell-command= 可在 [[https://melpa.org/#/dwim-shell-command][MELPA]] 上获取。

[[https://melpa.org/#/dwim-shell-command][file:https://melpa.org/packages/dwim-shell-command.svg]]

  1. 通过 M-x /package-install/ 安装。
  2. 引入、设置编辑风格并添加 company 后端:

#+begin_src emacs-lisp (require 'dwim-shell-command) #+end_src

现在你可以运行

M-x =dwim-shell-command=

** use-package

或者,也可以通过 [[https://github.com/jwiegley/use-package][use-package]] 安装,定义自己的命令并重新映射到 =shell-command= 的现有绑定,使用类似以下的配置:

#+begin_src emacs-lisp :lexical no (use-package dwim-shell-command :ensure t :bind (([remap shell-command] . dwim-shell-command) :map dired-mode-map ([remap dired-do-async-shell-command] . dwim-shell-command) ([remap dired-do-shell-command] . dwim-shell-command) ([remap dired-smart-shell-command] . dwim-shell-command)) :config (defun my/dwim-shell-command-convert-to-gif () "将所有标记的视频转换为优化的 gif。" (interactive) (dwim-shell-command-on-marked-files "转换为 gif" "ffmpeg -loglevel quiet -stats -y -i '<<f>>' -pix_fmt rgb24 -r 15 '<<fne>>.gif'" :utils "ffmpeg"))) #+end_src

  • 我的工具箱

我包含了一个可选包([[https://github.com/xenodium/dwim-shell-command/blob/main/dwim-shell-commands.el][dwim-shell-commands.el]]),其中包含了我一直以来引入的所有命令行工具。你可以通过以下方式加载这个可选包:

#+begin_src emacs-lisp :lexical no (require 'dwim-shell-commands) #+end_src

注意:=dwim-shell-command(s).el= 提供所有命令,而 =dwim-shell-command.el= 只提供构建块。

以下是我迄今为止添加的所有命令...

#+BEGIN_SRC emacs-lisp :results table :colnames '("命令" "描述") :exports results (let ((rows)) (mapatoms (lambda (symbol) (when (and (string-match "^dwim-shell-commands" (symbol-name symbol)) (not (string-match "git-set-author-name-and-email-credentials" (symbol-name symbol))) (commandp symbol)) (push `(,(symbol-name symbol) ,(car (split-string (or (documentation symbol t) "") "\n"))) rows)))) (seq-sort (lambda (row1 row2) (string-greaterp (seq-elt row2 0) (seq-elt row1 0))) rows)) #+END_SRC #+RESULTS: | 命令 | 描述 | |-------------------------------------------------------------+-----------------------------------------------------| | dwim-shell-commands-audio-to-mp3 | 将所有标记的音频转换为MP3格式。 | | dwim-shell-commands-clip-round-rect-gif | 用圆角矩形裁剪GIF图像。 | | dwim-shell-commands-clipboard-to-qr | 从剪贴板内容生成二维码。 | | dwim-shell-commands-copy-to-desktop | 复制文件到桌面。 | | dwim-shell-commands-copy-to-downloads | 复制文件到下载文件夹。 | | dwim-shell-commands-docx-to-pdf | 将DOCX文件转换为PDF(通过LaTeX)。 | | dwim-shell-commands-download-clipboard-stream-url | 下载剪贴板中的URL。 | | dwim-shell-commands-drop-video-audio | 移除所有标记视频的音频。 | | dwim-shell-commands-duplicate | 复制文件。 | | dwim-shell-commands-epub-to-org | 将EPUB文件转换为org格式。 | | dwim-shell-commands-external-ip | 复制外部IP地址到剪贴板。 | | dwim-shell-commands-files-combined-size | 获取文件的总大小。 | | dwim-shell-commands-gif-to-video | 将所有标记的GIF转换为视频。 | | dwim-shell-commands-git-clone-clipboard-url | 克隆剪贴板中的Git URL到当前目录。 | | dwim-shell-commands-git-clone-clipboard-url-to-downloads | 克隆剪贴板中的Git URL到下载文件夹。 | | dwim-shell-commands-git-delete-untracked-files | 删除当前目录中未跟踪的Git文件。 | | dwim-shell-commands-git-list-untracked-files | 列出当前目录中未跟踪的Git文件。 | | dwim-shell-commands-http-serve-dir | 为当前目录提供HTTP服务。 | | dwim-shell-commands-image-clear-exif-metadata | 清除图像的EXIF元数据。 | | dwim-shell-commands-image-exif-metadata | 查看图像的EXIF元数据。 | | dwim-shell-commands-image-horizontal-flip | 水平翻转图像。 | | dwim-shell-commands-image-reverse-geocode-location | 反向地理编码图像位置。 | | dwim-shell-commands-image-scan-code | 从图像中扫描任何代码(如二维码、条形码等)。 | | dwim-shell-commands-image-to-grayscale | 将所有标记的图像转换为灰度。 | | dwim-shell-commands-image-to-icns | 将PNG转换为ICNS图标。 | | dwim-shell-commands-image-to-jpg | 将所有标记的图像转换为JPG格式。 | | dwim-shell-commands-image-to-png | 将所有标记的图像转换为PNG格式。 | | dwim-shell-commands-image-trim-borders | 修剪图像边框(适用于视频截图)。 | | dwim-shell-commands-image-vertical-flip | 垂直翻转图像。 | | dwim-shell-commands-image-view-location-in-map | 在地图/浏览器中打开图像位置。 | | dwim-shell-commands-image-view-location-in-openstreetmap | 在OpenStreetMap中打开图像位置。 | | dwim-shell-commands-join-as-pdf | 将所有标记的图像合并为单个PDF。 | | dwim-shell-commands-join-images-horizontally | 水平合并所有标记的图像为单个图像。 | | dwim-shell-commands-join-images-vertically | 垂直合并所有标记的图像为单个图像。 | | dwim-shell-commands-kill-gpg-agent | 终止(从而重启)GPG代理。 | | dwim-shell-commands-kill-process | 选择并终止进程。 | | dwim-shell-commands-macos-abort-recording-window | 停止录制macOS窗口。 | | dwim-shell-commands-macos-add-to-photos | 添加到Photos应用。 | | dwim-shell-commands-macos-bin-plist-to-xml | 将二进制plist转换为XML。 | | dwim-shell-commands-macos-caffeinate | 调用caffeinate防止Mac睡眠。 | | dwim-shell-commands-macos-convert-to-mp4 | 将MOV转换为MP4。 | | dwim-shell-commands-macos-end-recording-window | 停止录制macOS窗口。 | | dwim-shell-commands-macos-install-iphone-device-ipa | 安装iPhone设备IPA。 | | dwim-shell-commands-macos-make-finder-alias | 创建macOS Finder别名。 | | dwim-shell-commands-macos-open-with | 用特定外部应用打开文件。 | | dwim-shell-commands-macos-open-with-firefox | 在Firefox中打开文件。 | | dwim-shell-commands-macos-open-with-safari | 在Safari中打开文件。 | | dwim-shell-commands-macos-reveal-in-finder | 在macOS Finder中显示选中的文件。 | | dwim-shell-commands-macos-screenshot-window | 选择并截图macOS窗口。 | | dwim-shell-commands-macos-set-default-app | 设置文件的默认应用。 | | dwim-shell-commands-macos-share | 从macOS共享选中的文件。 | | dwim-shell-commands-macos-start-recording-window | 选择并开始录制macOS窗口。 | | dwim-shell-commands-macos-toggle-bluetooth-device-connection| 切换蓝牙设备连接。 | | dwim-shell-commands-macos-toggle-dark-mode | 切换macOS深色模式。 | | dwim-shell-commands-macos-toggle-display-rotation | 旋转显示器。 | | dwim-shell-commands-macos-version-and-hardware-overview-info| 查看macOS版本和硬件概览信息。 | | dwim-shell-commands-make-swift-package-executable | 创建Swift包可执行文件。 | | dwim-shell-commands-make-swift-package-library | 创建Swift包库。 | | dwim-shell-commands-make-transparent-png | 创建透明PNG。 | | dwim-shell-commands-move-to-desktop | 移动文件到桌面。 | | dwim-shell-commands-move-to-downloads | 移动文件到下载文件夹。 | | dwim-shell-commands-ocr-text-from-image | 使用Tesseract从图像中提取文本。 | | dwim-shell-commands-open-clipboard-url | 打开剪贴板URL。如果可能,提供流式播放选项。 | | dwim-shell-commands-open-externally | 在外部打开文件。 | | dwim-shell-commands-optimize-gif | 将所有标记的视频转换为优化的GIF。 | | dwim-shell-commands-pass-git-pull | 执行Pass git pull。 | | dwim-shell-commands-pdf-password-protect | 为PDF添加密码保护。 | | dwim-shell-commands-pdf-to-txt | 将PDF转换为TXT。 | | dwim-shell-commands-ping-google | Ping google.com。 | | dwim-shell-commands-rename-all | 重命名所有标记的文件。 | | dwim-shell-commands-reorient-image | 重新调整图像方向。 | | dwim-shell-commands-resize-gif | 调整标记GIF的大小。 | | dwim-shell-commands-resize-image | 调整标记图像的大小。 | | dwim-shell-commands-resize-video | 调整标记视频的大小。 | | dwim-shell-commands-sha-256-hash-file-at-clipboard-url | 下载剪贴板URL中的文件并生成SHA-256哈希。 | | dwim-shell-commands-speed-up-gif | 加速GIF。 | | dwim-shell-commands-speed-up-video | 加速视频。 | | dwim-shell-commands-stream-clipboard-url | 使用mpv流式播放剪贴板URL。 | | dwim-shell-commands-svg-to-png | 将所有标记的SVG转换为PNG。 | | dwim-shell-commands-unzip | 使用atool解压所有标记的压缩文件(任何类型)。 | | dwim-shell-commands-upload-to-0x0 | 将标记的文件上传到0x0.st。 | | dwim-shell-commands-video-to-gif | 将所有标记的视频转换为GIF。 | | dwim-shell-commands-video-to-hevc-mkv | 将所有标记的视频转换为HEVC MKV格式。 | | dwim-shell-commands-video-to-mp3 | 从所有标记的视频中提取音频。 | | dwim-shell-commands-video-to-optimized-gif | 将所有标记的视频转换为优化的GIF。 | | dwim-shell-commands-video-to-thumbnail | 为标记的视频生成缩略图。 | | dwim-shell-commands-video-to-webp | 将所有标记的视频转换为webp格式。 | | dwim-shell-commands-video-trim-beginning | 删除所有标记视频的开头部分。 | | dwim-shell-commands-video-trim-end | 删除所有标记视频的结尾部分。 | | dwim-shell-commands-zip | 将所有标记的文件压缩到archive.zip中。 | | dwim-shell-commands-zip-password-protect | 为zip文件添加密码保护/加密。 |

  • 评估elisp函数

可以通过以下任一方式实现:

#+begin_src emacs-lisp :lexical no emacs --quick --batch --eval '(message "<<f>>")' #+end_src

#+begin_src emacs-lisp :lexical no emacsclient --eval '(message "<<f>>")' #+end_src

  • 支持这项工作

👉 [[https://github.com/sponsors/xenodium][通过GitHub Sponsors支持我的工作]]

编辑推荐精选

Trae

Trae

字节跳动发布的AI编程神器IDE

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

AI工具TraeAI IDE协作生产力转型热门
问小白

问小白

全能AI智能助手,随时解答生活与工作的多样问题

问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。

热门AI助手AI对话AI工具聊天机器人
Transly

Transly

实时语音翻译/同声传译工具

Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。

讯飞智文

讯飞智文

一键生成PPT和Word,让学习生活更轻松

讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。

AI办公办公工具AI工具讯飞智文AI在线生成PPTAI撰写助手多语种文档生成AI自动配图热门
讯飞星火

讯飞星火

深度推理能力全新升级,全面对标OpenAI o1

科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。

热门AI开发模型训练AI工具讯飞星火大模型智能问答内容创作多语种支持智慧生活
Spark-TTS

Spark-TTS

一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型

Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。

咔片PPT

咔片PPT

AI助力,做PPT更简单!

咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。

讯飞绘文

讯飞绘文

选题、配图、成文,一站式创作,让内容运营更高效

讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。

热门AI辅助写作AI工具讯飞绘文内容运营AI创作个性化文章多平台分发AI助手
材料星

材料星

专业的AI公文写作平台,公文写作神器

AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。

openai-agents-python

openai-agents-python

OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。

openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。

下拉加载更多