Jump to content

ChatGPT / DALL-E - OpenAI integrations


Recommended Posts

Setup

  1. Create an OpenAI account and log in.
  2. On the API keys page, click + Create new secret key.
  3. Name your new secret key and click Create secret key.
  4. Copy your secret key and add it to the Workflow’s Configuration.

Usage


ChatGPT


Query ChatGPT via the chatgpt keyword, the Universal Action, or the Fallback Search.


chatgptkeyword.png


chatgpttextview.png

  • ↩ Ask a new question.
  • ⌘↩ Clear and start new chat.
  • ⌥↩ Copy last answer.
  • ⌃↩ Copy full chat.
  • ⇧↩ Stop generating answer.

Chat History


View Chat History with ⌥↩ in the chatgpt keyword. Each result shows the first question as the title and the last as the subtitle.


chatgpthistory.png


↩ to archive the current chat and load the selected one. Older chats can be trashed with the Delete Universal Action. Select multiple chats with the File Buffer.


DALL·E


Query DALL·E via the dalle keyword.


dallekeyword.png


dalletextview.png

  • ↩ Send a new prompt.
  • ⌘↩ Archive images.
  • ⌥↩ Reveal last image in the Finder.

⤓ Install on the Alfred Gallery | Source

Link to comment

Frequently Asked Questions (FAQ)


How do I set up an alternative AI model?


The workflow offers the ability to change the API end points and override model names in the Workflow Environment Variables. This requires advanced configuration and is not something we can provide support for, but our community are doing it with great success and can help you on a different thread.


How do I access the service behind a proxy?


Add a new https_proxy key in Workflow Environment Variables. Or configure the proxy for all workflows under Alfred Preferences → Advanced → Network.


Why can’t I use the workflow with a ChatGPT Plus subscription?


The ChatGPT Plus subscription does not include access to the ChatGPT API and are billed separately.

 

How can I reuse pre-made prompts?

 

Make a new workflow with a Keyword Input and connect it to an Arg and Vars Utility with your custom prompt text plus {query}, which will be replaced with new input from the Keyword. Then connected it to a Call External Trigger Output set to open continue_chat from this workflow.


Is there a video which shows how to use the workflow?


Yes, on YouTube.


How do I report an issue?


Accurate and thorough information is crucial for a proper diagnosis. When reporting issues, please include your exact installed versions of:

  • The Workflow.
  • Alfred.
  • macOS.

In addition to:

  • The debugger output. Perform the failing action, click “Copy” on the top right and paste it here.
  • Details on what you did, what happened, and what you expected to happen. A short video of the steps with the debugger open may help to find the problem faster.

 

Why does nothing happen after I press ↩?

 

Something always happens, so check the debugger. Chances are you’re missing the Automation Tasks. Install them.

 

Why do I keep getting Quota exceeded?

 

You need API credits to use the workflow, which are distinct from a ChatGPT Plus subscription. You can view your remaining credits and top up your account on the OpenAI website.

 

Why do I keep getting [Connection Stalled]?

 

This happens when the workflow takes too long to receive a reply from the API. It indicates a problem either with your connection or OpenAI’s service.


Open a terminal and run the following (replace the YOUR_API_KEY text within the quotes with your API key):

 

openai_key="YOUR_API_KEY"
time /usr/bin/curl "https://api.openai.com/v1/chat/completions" --header "Authorization: Bearer ${openai_key}" --header "Content-Type: application/json" --data '{ "model": "gpt-3.5-turbo", "messages": [{ "role": "user", "content": "What is red?" }], "stream": true }'


It should provide a clue as to what is happening. Include the result in your report.

Link to comment
  • Vero changed the title to ChatGPT / DALL-E - OpenAI integrations

Thanks vitor for the great work, this generative AI finally arrives in Alfred!

 

Since OpenAI is not available in some countries/regions, would it be possible to enhance this workflow to have a dedicated network proxy setting, or is that possible to configure a proxy only for this workflow? E.g. https/socks. Although Alfred can utilize the system proxy in macOS, setting a system proxy would affect all other apps.

 

Thanks!

Link to comment

Thanks @vitor, this workflow is truly a game-changer and I've already been using it quite a bit. 

One issue I found: if you open the Alfred prompt, start querying ChatGPT with the set keyword (I changed mine to "c"), and then hit CMD-Enter (which should start a new chat session), the Alfred prompt disappears and doesn't show any results. If I had invoked it normally (with just "Enter") it works fine, but with "Cmd-Enter" it does not. 

Link to comment

@Vero Thanks for getting back to me. I was actually wondering if there was rough data on what average consumer usage was for sending API requests via the workflow. No worries if this is not available, just thought I would check. Take care.

Link to comment

I have accidentally cleared convo so many times. To me command enter for delete is risky as it is also new line in a lot of other interfaces. 

 

Also, why not just GPT as a keyword?

 

Realize I can customize this but was feedback for the default flow!

 

Finally - would be great to have a shorcut to copy code block from response.

Edited by Benjamin Thomas
Link to comment
4 hours ago, Benjamin Thomas said:

To me command enter for delete is risky as it is also new line in a lot of other interfaces.

 

In the macOS paradigm, ⌘↩ is a submit. Try it e.g. on a comment box on GitHub or this forum. It submits what you have in the textarea. Newlines are typically ⌥↩ and/or ⇧↩.

 

4 hours ago, Benjamin Thomas said:

Also, why not just GPT as a keyword?

 

Realize I can customize this

 

ChatGPT is the name of the service. A GPT is a related but different thing. This makes the keyword more obvious. And as you noted, you can customise it to your liking very easily. Some people use just c.

Link to comment
23 hours ago, Buffer said:

I was actually wondering if there was rough data on what average consumer usage was for sending API requests via the workflow.

 

@Buffer Just to clarify, we don't track your data so Alfred doesn't hold any knowledge of your API usage. Your privacy has always been a priority for us, so we don't keep aggregate data of users' Alfred usage, don't track your searches and don't host your preferences. 

 

You could create a quick keyword-based shortcut to launch the API usage page of the OpenAI site so you can easily pop it up to see how much data you've used. It won't take long for you to get a feel for your own usage level, I'm sure! :) 

Link to comment

Thank you everyone, great ideas about individual usage tracking! I'll keep up the hunt for consumer use cases as well. It would be interesting to see what user groups as a whole vs individuals are consuming API requests.

 

8 hours ago, Vero said:

 

@Buffer Just to clarify, we don't track your data so Alfred doesn't hold any knowledge of your API usage. Your privacy has always been a priority for us, so we don't keep aggregate data of users' Alfred usage, don't track your searches and don't host your preferences. 

 

You could create a quick keyword-based shortcut to launch the API usage page of the OpenAI site so you can easily pop it up to see how much data you've used. It won't take long for you to get a feel for your own usage level, I'm sure! :) 

 

@Vero I love that y'all take privacy seriously. Just another reason I recommend Alfred so often. :) Thanks again!

Link to comment

Hello, so far only gpt3.5 and gpt4 models are being offered on the workflow. However, gpt4 is the older but more expensive model. Are there any plans to bring the newer and cheaper gpt4turbo model to the workflow? Or is there any way for us to change ourselves?

Link to comment
12 hours ago, Vero said:

Curious to see how easy and quick the ChatGPT / DALL-E workflow is to use? I've created a quick video introducing the workflow and its configuration.

 

 

Hope this helps you discover this most awesome workflow :) 

 

Super amazing workflow and thank you for this video!

Link to comment

You can copy the current chat to the clipboard with a shortcut, then use another workflow with a keyword to save the chat in the format and name you want to the folder you want.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...