百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
O

openai-chat-api-workflow

> AI 编程
开源

一个使用 OpenAI 聊天 API 与 GPT 模型交互的 Alfred 5 工作流,还支持图像生成/编辑/理解、语音转文字等功能。

320 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

一个使用 OpenAI 聊天 API 与 GPT 模型交互的 Alfred 5 工作流,还支持图像生成/编辑/理解、语音转文字等功能。

OpenAI Chat API Workflow for Alfred

An Alfred 5 Workflow for using the OpenAI Chat API to interact with GPT models . It also allows file understanding (images, PDFs, Office documents, code, and more), image generation ️, speech-to-text conversion , and text-to-speech synthesis .

Download OpenAI Chat API Workflow (version 5.6.0)

You can execute all the above features using:

  • Alfred UI ️
  • Selected text
  • A dedicated web UI

The web UI is constructed by the workflow and runs locally on your Mac . The API call is made directly between the workflow and OpenAI, ensuring your chat messages are not shared online with anyone other than OpenAI . Furthermore, OpenAI does not use the data from the API Platform for training .

All messages in a conversation are displayed on a single scrollable page , making it easy to review the full context. You can export the chat data to an external file in simple JSON format , and it is possible to continue the chat by importing it later .

Installation

  1. Download and run OpenAI Chat API Workflow
  2. Set your OpenAI API key
  3. Enable accessibility settings for Alfred in System Preferences → Security & Privacy → Privacy → Accessibility

Setup Hotkeys

You can set up hotkeys in the settings screen of the workflow. To set up hotkeys, double-click on the light purple workflow elements.

  1. Open Web UI (Recommended)
  2. Direct Query
  3. Send Selected Text
  4. Screen Capture for Image Editing
  5. Screen Capture for Image Understanding
  6. Speech to Text
  7. Text to Speech (Selected text)

There is also a "Stop text-to-speech playback" command to stop the playback of the text-to-speech audio stream. Current it needs to be assigned a hotkey different from that of the "Text to Speech" command.

Dependencies

  • Alfred 5 Powerpack
  • OpenAI API key

No external dependencies (Homebrew, etc.) are required. All features work out of the box.

To start using this workflow, you must set the environment variable apikey, which you can obtain by creating a new OpenAI account. See also the Configuration section below.

Note: Voice input uses the browser's built-in Web Audio API in the Web UI. No external dependencies are required.

Recent Changelog

  • 5.6.0:
    • New model gpt-6-astra available as an option (the default remains gpt-5.6-luna, which is far cheaper)
    • Fix: translating an audio file failed unless the transcription model happened to be whisper-1, the only model that supports translation
    • Fix: passing a sound file from Finder or the Universal Action menu ignored the transcription model chosen in the settings
    • Fix: the Text-to-Speech and Transcription settings now fall back to a working model if they were left pointing at one that no longer exists
    • Fix: an image request that kept timing out never gave up
  • 5.5.0:
    • Default chat model is now gpt-5.6-luna — a newer generation at about a quarter of the previous cost, with a 1M-token context window. Use gpt-5.6-terra for very large documents
    • Speech-to-text now defaults to gpt-transcribe, the current recommended transcription model
    • Reasoning effort max added for the GPT-5.6 models; the default effort is now none on a fresh install
    • Models that OpenAI has retired or scheduled for retirement were removed from the menus
    • The mode picker is a segmented control, and only the selected mode's settings are shown
    • Dark mode: code blocks inside a reply are visible again
    • Fixes: the response card no longer says "Assistant" twice; a stalled request now reports itself instead of failing silently; the progress indicator disappears when the answer is done; Memory Span no longer describes the wrong number
  • 5.4.0:
    • Dark mode now follows the system appearance while the page is open, and both themes come from a single stylesheet
    • Layout rebuilt with flexbox: no more button labels breaking across two lines in a narrow window
    • Send with ⌘/Ctrl+Enter; the response area says whether the model is waiting or thinking
    • Max Tokens explains why it is disabled for reasoning models
    • Clear Cache keeps the images your conversation still shows, and no longer breaks the page on reload
  • 5.3.0:
    • No more CDN dependencies: Markdown rendering, syntax highlighting, and icons are bundled with the workflow and served locally
    • Voice recording now uses the browser's built-in recorder instead of an external polyfill
    • Removed the check-for-update keyword and the Web UI's Check for Update button; download the latest version from the link above
  • 5.2.0:
    • New GPT-5.6 frontier models added: gpt-5.6-sol (flagship), gpt-5.6-terra (balanced), gpt-5.6-luna (cost-efficient)
    • All three support reasoning effort none/low/medium/high/xhigh (default: none) and a 1M-token context window
    • Default chat model remains gpt-5.4-mini (the GPT-5.6 family is priced above the mini tier)
    • Fix: gpt-5.5 was missing from the web UI model dropdown
  • 5.1.0:
    • New model gpt-5.5 added as a selectable option (not the default)
    • Default chat model changed from gpt-5-mini to gpt-5.4-mini for a better balance of cost and capability
    • Removed unused expensive-model confirmation dialog mechanism (the pro flagship and o-series models are intentionally not bundled)
  • 5.0.0:
    • New image generation model gpt-image-2 (now default); simplified to gpt-image-2 and gpt-image-1.5
    • File input via OpenAI Files API (file_id reference) for images, PDFs, Office documents, text, code, and more
    • Uploaded files are automatically deleted from OpenAI's storage after each response
    • Structured error display with Status/Code/Message/Request ID and collapsible debug info
    • File input via Alfred Universal Action ("OpenAI File Input") for all supported file types
    • Iterative image editing (Refine Image) with conversation history
    • Automatic context truncation for long conversations
    • Simplified command list: removed 12 legacy prompt modes (Write Program Code, Grammar Correction, etc.) — use natural language prompts instead
    • Removed unused API parameters (Temperature, Top P, Frequency/Presence Penalty, Max Size for Image Understanding) from settings
    • Unified file upload architecture: both starter and chat UIs now use WEBrick /upload endpoint
    • Improved WebSocket stability for large file uploads
    • JSON export/import reliability improvements
    • Cache management: auto-cleanup on server start (7+ days) and manual "Clear Cache" button
    • No external dependencies required (Homebrew install step removed)
  • 4.8.0:
    • New models: gpt-5.4-mini, gpt-5.4-nano
    • Reasoning effort defaults optimized per model
  • 4.7.0:
    • New models: gpt-5.4, gpt-5.3-chat-latest, gpt-5.3-codex
    • Removed deprecated models and added invalid model fallback
    • Fix outdated OpenAI documentation URLs
  • 4.6.0:
    • Fix Large Type parallel firing issue on Alfred 5.7+ / macOS 16
    • Remove date-suffixed TTS/STT model names; use base names as defaults
    • Fix typo in JSON validation error message
  • 4.5.0:
    • Simplified image models: gpt-image-1.5 (default) and chatgpt-image-latest (lightweight)
    • Removed deprecated gpt-image-1 and gpt-image-1-mini models
  • 4.4.0:
    • Added gpt-image-1.5 as default image generation model
    • Removed DALL·E 2 and DALL·E 3 models (deprecated by OpenAI)
  • 4.3.0:
    • New TTS model: gpt-4o-mini-tts-2025-12-15 (now default)
    • New STT model: gpt-4o-mini-transcribe-2025-12-15 (now default)
    • Improved error rates, fewer hallucinations, better instruction following
    • Enhanced support for Chinese, Japanese, Indonesian, Hindi, Bengali, Italian
  • 4.2.0:
    • GPT-5.2 series models now supported (gpt-5.2, gpt-5.2-chat-latest, gpt-5.2-pro)
    • New xhigh reasoning effort level for maximum quality
    • gpt-5.2-pro has very high API pricing - confirmation dialog added
    • Model-specific reasoning effort constraints for GPT-5.2 series
    • Web UI updated with new models and pricing warning
  • 4.1.0:
    • GPT-5.1 series models now supported (gpt-5.1, gpt-5.1-chat-latest, gpt-5.1-codex, gpt-5.1-codex-mini)
    • gpt-5.1 replaces gpt-5 as the flagship model with enhanced reasoning capabilities
    • gpt-5.1-chat-latest replaces chatgpt-4o-latest for latest optimizations
    • New codex variants (gpt-5.1-codex, gpt-5.1-codex-mini) for code generation tasks
    • Model-specific reasoning effort constraints with dynamic UI adjustment
    • Removed older models: gpt-5, gpt-4.1 series, gpt-4o series, chatgpt-4o-latest
    • Default model remains gpt-5-mini for balanced performance
    • gpt-5-mini and gpt-5-nano continue to be supported
  • 4.0.0:
    • GPT-5 series models (gpt-5, gpt-5-mini, gpt-5-nano) supported with Responses API
    • GPT-5 models feature reasoning capabilities with configurable reasoning_effort (minimal/low/medium/high)
    • Note: Only gpt-5 supports minimal reasoning_effort. gpt-5-mini, gpt-5-nano, and other reasoning-capable models do not support minimal.
    • Default model changed to gpt-5-mini
    • Removed support for o1, o3, o4 series reasoning models
    • GPT-4.1 and earlier models continue to use Chat Completion API
    • Full support for PDF and image understanding across all GPT-5 models

Complete Change Log

Methods of Execution

Here are three methods to run the workflow: 1) Using commands within the Alfred UI, 2) Passing selected text to the workflow, 3) Utilizing the Web UI. Additionally, there's a convenient method for making brief inquiries to GPT. All methods share the same conversation history — messages accumulate on a single scrollable page, regardless of how you send them.

Commands within the Alfred UI

You can enter a query directly into Alfred's textbox:

  • Method 1: Alfred textbox → keyword (openai) → space/tab → input query → select a command (see below)
  • Method 2: Alfred textbox → input query → select fallback search (OpenAI Query)

Passing Selected Text

You can select any text on your Mac and send it to the workflow:

  • Method 1: Select text → universal action hotkey → select OpenAI Query
  • Method 2: Set up a custom hotkey to Send selected text to OpenAI

Using Web Interface

You can open the web interface:

  • Method 1: Alfred textbox → keyword (openai-webui)
  • Method 2: Set up a custom hotkey to Open web interface

Using the Default Browser

If your default browser is set to one of the following, the web interface will automatically open in your chosen browser. If not, Safari will be used as the default.

  • Google Chrome (Stable, Beta, Dev, etc.)
  • Microsoft Edge (Stable, Beta, Dev, etc.)
  • Brave Browser

Restart the OpenAI Workflow server by executing openai-restart-server if the web UI does not work as expected after changing the default browser.

Web UI Modes

Switch modes (light/dark/auto) with the Web UI Mode selector in the settings.

Simple Direct Query/Chat

To quickly chat with GPT:

  • Method 1: Type keyword gpt → space/tab → input query (e.g., "gpt what is a large language model?")
  • Method 2: Set up a custom hotkey to OpenAI Direct Query

Basic Commands

With Direct Query, the input text is sent directly to the OpenAI Chat API as a prompt. You can also create a query by prepending or appending text to the input.

Direct Query

The input text is directly sent as a prompt to the OpenAI Chat API.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyaialfredchatbotdall-e

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.