GithubHelp home page GithubHelp logo

openai-workflow's People

Contributors

vitorgalvao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

openai-workflow's Issues

Blank output when cmd+enter (start a new chat)

Frequently Asked Questions

Workflow version

v2024.7

Alfred version

5.5 [2257]

macOS version

Sonoma 14.4.1

Debugger output

[10:47:32.226] ChatGPT / DALL-E[Keyword] Processing complete
[10:47:32.233] ChatGPT / DALL-E[Keyword] Passing output 'tell me something short' to Arg and Vars
[10:47:32.234] ChatGPT / DALL-E[Arg and Vars] Processing complete
[10:47:32.235] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Run Script
[10:47:32.313] ChatGPT / DALL-E[Run Script] Processing complete
[10:47:32.322] ChatGPT / DALL-E[Run Script] Passing output '' to Call External Trigger
[10:47:32.323] ChatGPT / DALL-E[External] Processing complete
[10:47:32.324] ChatGPT / DALL-E[External] Passing output '' to Arg and Vars
[10:47:32.324] ChatGPT / DALL-E[Arg and Vars] Processing complete
[10:47:32.325] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Conditional
[10:47:32.325] ChatGPT / DALL-E[Conditional] Processing complete
[10:47:32.326] ChatGPT / DALL-E[Conditional] Passing output '' to Run Script
[10:47:32.436] ChatGPT / DALL-E[Run Script] Processing complete
[10:47:32.446] ChatGPT / DALL-E[Run Script] Passing output '' to Arg and Vars
[10:47:32.447] ChatGPT / DALL-E[Arg and Vars] Processing complete
[10:47:32.448] ChatGPT / DALL-E[Arg and Vars] Passing output '/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai
/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai' to Split Arg
[10:47:32.449] ChatGPT / DALL-E[Split Arg] Processing complete
[10:47:32.450] ChatGPT / DALL-E[Split Arg] Passing output '(
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Automation Task
[10:47:32.451] ChatGPT / DALL-E[Automation Task] Running task 'New Folder' with arguments (
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)
[10:47:32.549] ChatGPT / DALL-E[Automation Task] Processing complete
[10:47:32.557] ChatGPT / DALL-E[Automation Task] Passing output '(
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Arg and Vars
[10:47:32.558] ChatGPT / DALL-E[Arg and Vars] Processing complete
[10:47:32.559] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[10:47:32.567] ChatGPT / DALL-E[Text View] Running with argument ''
[10:47:32.692] ChatGPT / DALL-E[Text View] Script with argv '' finished
[10:47:32.699] ChatGPT / DALL-E[Text View] {"response":"","behaviour":{"scroll":"end"}}

More details

Ever since 2024.6 or 2024.7 (not sure which one, I updated both before trying this) cmd+enter no longer works. Simply pressing Enter to continue an existing conversation does work.

Typed: gpt tell me something short (gpt is my custom trigger word) and pressed cmd+enter.

Expected output from ChatGPT, got:

Screenshot 2024-04-16 at 10 50 15

Universal Action: Start a New Chat

Feature details

Request: I'd love a second universal action that allows me to send in text and start straight from a new, clean chat with GPT. Right now the universal action appends to the prior.

I tried to do this myself, but I'm getting a behavior I can't sort out. It works, but the text area doesn't pop up until the full answer has been streamed. So unlike for the existing universal action, and unlike for when you do it "in workflow", it sits "silently" (appearing if nothing is going on) and then the text area pops open with the question and answer fully populated.

My attempt was to add a universal action node (New Question for GPT) that connected to a variable set to put the query into the same variable as the normal flow (init_question), and then connected into the chat.json node where the contents are reset.

Love this workflow. Thanks so much for making it.

Support setting network proxy for this workflow (wokflow level)

Feature details

Thanks @vitorgalvao 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? E.g. https/socks. Although Alfred can utilize the system proxy in macOS, setting a system proxy would affect all other apps.

Getting `[Connection Stalled]` - cannot query both ChatGPT and Dalle

Frequently Asked Questions

Workflow version

v2024.9 - latest

Alfred version

Alfred 5.5 [2257] - latest

macOS version

14.4.1 (23E224)

Debugger output

[12:24:09.893] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:10.037] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:10.043] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### How can I set a type in typescript, that changes the options by inner property provided\n\n[Answer Interrupted]\n\n### hi\n\n[Answer Interrupted]\n\n### How can I use time command in order to measure time for bash commands?\n\n[Answer Interrupted]\n\n### How can I use time command in order to measure time for bash commands?\n\n[Answer Interrupted]\n\n### How can I use time command in order to measure time for bash commands?\n\n"}
[12:24:10.145] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:10.209] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:10.216] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[12:24:10.316] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:10.449] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:10.456] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:10.553] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:10.622] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:10.628] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:10.728] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:10.778] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:10.784] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:10.883] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:11.022] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:11.030] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:11.128] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:11.199] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:11.206] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:11.308] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:11.384] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:11.391] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:11.490] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:11.626] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:11.633] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:11.729] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:11.865] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:11.872] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:11.969] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:12.033] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:12.040] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:12.141] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:12.274] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:12.282] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:12.376] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:12.449] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:12.455] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:12.553] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:12.621] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:12.627] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:12.729] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:12.849] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:12.856] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:12.953] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.023] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.030] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:13.131] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.177] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.185] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:13.283] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.341] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.348] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:13.449] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.591] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.598] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:13.694] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.818] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.826] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:13.924] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:13.991] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:13.998] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.099] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:14.161] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:14.169] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.268] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:14.324] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:14.329] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.432] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:14.490] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:14.497] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.594] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:14.669] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:14.676] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.773] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:14.843] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:14.850] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[12:24:14.947] ChatGPT / DALL-E[Text View] Running with argument 'How can I use time command in order to measure time for bash commands?'
[12:24:15.079] ChatGPT / DALL-E[Text View] Script with argv 'How can I use time command in order to measure time for bash commands?' finished
[12:24:15.086] ChatGPT / DALL-E[Text View] {"response":" [Connection Stalled]","footer":"You can ask ChatGPT to continue the answer","behaviour":{"response":"replacelast","scroll":"end"}}

More details

When trying to query ChatGPT, I'm not getting any response but this:

CleanShot 2024-04-20 at 12 28 32@2x

Support setting network proxy for this workflow (wokflow level)

Feature details

Thanks @vitorgalvao 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? E.g. https/socks. Although Alfred can utilize the system proxy in macOS, setting a system proxy would affect all other apps.

If possible, the workflow environment variables seem to be a good place for this setting.

CMD+Enter does not start new chat

Workflow version

2024.1

Alfred version

5.5 beta

macOS version

14.3.1

Debugger output

[10:24:10.354] ChatGPT / DALL-E[Keyword] Processing complete
[10:24:10.357] ChatGPT / DALL-E[Keyword] Passing output '300 euro in chf' to Arg and Vars
[10:24:10.357] ChatGPT / DALL-E[Arg and Vars] Processing complete
[10:24:10.358] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Call External Trigger

More details

External Trigger needs to point to self.new_chat instead of self.clear_chat

Screenshot 2024-02-27 at 10 28 28 Screenshot 2024-02-27 at 10 29 17

Out of credits

Frequently Asked Questions

Workflow version

2024.11

Alfred version

5.5

macOS version

14.5

Debugger output

[16:48:53.914] ChatGPT / DALL-E[Keyword] Processing complete
[16:48:53.922] ChatGPT / DALL-E[Keyword] Passing output '' to Arg and Vars
[16:48:53.923] ChatGPT / DALL-E[Arg and Vars] Processing complete
[16:48:53.925] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Run Script
[16:48:54.002] ChatGPT / DALL-E[Run Script] Processing complete
[16:48:54.009] ChatGPT / DALL-E[Run Script] Passing output '' to Automation Task
[16:48:54.010] ChatGPT / DALL-E[Automation Task] Running task 'Does Path Exist?' with arguments (
    "/Users/michael/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/chat.json"
)
[16:48:54.012] ChatGPT / DALL-E[Automation Task] Processing complete
[16:48:54.012] ChatGPT / DALL-E[Automation Task] Passing output 'true' to Conditional
[16:48:54.013] ChatGPT / DALL-E[Conditional] Processing complete
[16:48:54.014] ChatGPT / DALL-E[Conditional] Passing output 'true' to Arg and Vars
[16:48:54.014] ChatGPT / DALL-E[Arg and Vars] Processing complete
[16:48:54.015] ChatGPT / DALL-E[Arg and Vars] Passing output '/Users/michael/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai
/Users/michael/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai' to Split Arg
[16:48:54.016] ChatGPT / DALL-E[Split Arg] Processing complete
[16:48:54.023] ChatGPT / DALL-E[Split Arg] Passing output '(
    "/Users/michael/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/michael/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Automation Task
[16:48:54.024] ChatGPT / DALL-E[Automation Task] Running task 'New Folder' with arguments (
    "/Users/michael/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/michael/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)
[16:48:54.052] ChatGPT / DALL-E[Automation Task] Processing complete
[16:48:54.055] ChatGPT / DALL-E[Automation Task] Passing output '(
    "/Users/michael/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/michael/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Arg and Vars
[16:48:54.057] ChatGPT / DALL-E[Arg and Vars] Processing complete
[16:48:54.057] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[16:48:54.082] ChatGPT / DALL-E[Text View] Running with argument ''
[16:48:54.193] ChatGPT / DALL-E[Text View] Script with argv '' finished
[16:48:54.199] ChatGPT / DALL-E[Text View] {"response":"### do i need a new tent\n\n[Answer Interrupted]\n\n### what is toast\n\n[Answer Interrupted]\n\n","behaviour":{"scroll":"end"}}
[16:49:04.691] ChatGPT / DALL-E[Text View] Running with argument 'what shape is the earth'
[16:49:04.762] ChatGPT / DALL-E[Text View] Script with argv 'what shape is the earth' finished
[16:49:04.768] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### do i need a new tent\n\n[Answer Interrupted]\n\n### what is toast\n\n[Answer Interrupted]\n\n### what shape is the earth\n\n"}
[16:49:04.868] ChatGPT / DALL-E[Text View] Running with argument 'what shape is the earth'
[16:49:04.995] ChatGPT / DALL-E[Text View] Script with argv 'what shape is the earth' finished
[16:49:05.001] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[16:49:05.104] ChatGPT / DALL-E[Text View] Running with argument 'what shape is the earth'
[16:49:05.163] ChatGPT / DALL-E[Text View] Script with argv 'what shape is the earth' finished
[16:49:05.169] ChatGPT / DALL-E[Text View] {"response":"[You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.]  \n(Sat, 18 May 2024 23:49:05 GMT)","behaviour":{"response":"replacelast"}}

More details

I have configure and applied a new api key.
When I trigger chatgpt - the result is always I am out of credits. However if I look at the usage history, monthly spend is $0, with $18 available.

Also I am able to use https://chatgpt.com

Model does not exist or no access

Workflow version

v2024.5

Alfred version

5.5 [2257]

macOS version

Sonoma 14.4.1

Debugger output

[18:21:54.317] ChatGPT / DALL-E[Keyword] Processing complete
[18:21:54.317] ChatGPT / DALL-E[Keyword] Passing output '' to Arg and Vars
[18:21:54.317] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:21:54.317] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Automation Task
[18:21:54.320] ChatGPT / DALL-E[Automation Task] Running task 'Does Path Exist?' with arguments (
    "/Users/amelio/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai/chat.json"
)
[18:21:54.342] ChatGPT / DALL-E[Automation Task] Processing complete
[18:21:54.343] ChatGPT / DALL-E[Automation Task] Passing output 'true' to Conditional
[18:21:54.343] ChatGPT / DALL-E[Conditional] Processing complete
[18:21:54.343] ChatGPT / DALL-E[Conditional] Passing output 'true' to Arg and Vars
[18:21:54.343] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:21:54.343] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[18:21:54.353] ChatGPT / DALL-E[Text View] Running with argument ''
[18:21:54.414] ChatGPT / DALL-E[Text View] Script with argv '' finished
[18:21:54.414] ChatGPT / DALL-E[Text View] {"response":"### What are the news today?\n\n[Answer Interrupted]\n\n### what are the news today?\n\n[Answer Interrupted]\n\n### What are the news today?\n\n[Answer Interrupted]\n\n### What are the news today? \n\n[Answer Interrupted]\n\n### Yes?\n\n[Answer Interrupted]\n\n### What time is it/\n\n[Answer Interrupted]\n\n","behaviour":{"scroll":"end"}}
[18:21:56.997] ChatGPT / DALL-E[Text View] Running with argument 'What time is it?'
[18:21:57.158] ChatGPT / DALL-E[Text View] Script with argv 'What time is it?' finished
[18:21:57.159] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### What are the news today?\n\n[Answer Interrupted]\n\n### what are the news today?\n\n[Answer Interrupted]\n\n### What are the news today?\n\n[Answer Interrupted]\n\n### What are the news today? \n\n[Answer Interrupted]\n\n### Yes?\n\n[Answer Interrupted]\n\n### What time is it/\n\n[Answer Interrupted]\n\n### What time is it?\n\n"}
[18:21:57.265] ChatGPT / DALL-E[Text View] Running with argument 'What time is it?'
[18:21:57.404] ChatGPT / DALL-E[Text View] Script with argv 'What time is it?' finished
[18:21:57.405] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[18:21:57.506] ChatGPT / DALL-E[Text View] Running with argument 'What time is it?'
[18:21:57.590] ChatGPT / DALL-E[Text View] Script with argv 'What time is it?' finished
[18:21:57.591] ChatGPT / DALL-E[Text View] {"response":"[The model `gpt-4` does not exist or you do not have access to it.]  \n(Mon, 01 Apr 2024 01:21:57 GMT)","behaviour":{"response":"replacelast"}}

More details

Created a key for it, and tried to use it bu tno luck.

Keyboard shortcuts enhancements

Frequently Asked Questions

Feature details

↩ Ask question  same
⌘↩ New Chat     same - but do not auto send the prompt in the new chat, just populate the input field
⌥↩ Copy Last    ⌘C (if there is no text selection)
⌃↩ Copy All     ⌥⌘C (if there is no text selection)
⇧↩ Stop         Esc
New Line        ⌥↩
Next Chat       ??
Previous Chat   ??

Update to v2024.6 doesn't seem to work

Frequently Asked Questions

Workflow version

v2024.5

Alfred version

5.5 [2257]

macOS version

Sonoma 14.4.1

Debugger output

[16:28:20.511] Logging Started...

(nothing else shows up)

More details

When I go to Settings -> Workflows, right click on ChatGPT / DALL-E, and click "Update from Alfred Gallery", I see the dialog showing up showing the settings for adjusting. However, when I press Update on this dialog, it goes away, but the workflow stays not-updated (same version).

Also interesting: right clicking on that workflow in Alfred to show the menu no longer works (menu doesn't appear). I have to close and reopen settings to be able to right click a workflow.

⌃+↵ and ⌥+↵ don't work.

Frequently Asked Questions

Workflow version

v2024.6

Alfred version

5.5

macOS version

14.4.1

Debugger output

[21:40:22.840] ChatGPT / DALL-E[Keyword] Processing complete
[21:40:22.848] ChatGPT / DALL-E[Keyword] Passing output '' to Arg and Vars
[21:40:22.849] ChatGPT / DALL-E[Arg and Vars] Processing complete
[21:40:22.849] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Run Script
[21:40:22.853] ChatGPT / DALL-E[Run Script] Processing complete
[21:40:22.854] ChatGPT / DALL-E[Run Script] Passing output '' to Automation Task
[21:40:22.854] ChatGPT / DALL-E[Automation Task] Running task 'Does Path Exist?' with arguments (
    "/Users/dysaniacn/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/chat.json"
)
[21:40:22.921] ChatGPT / DALL-E[Automation Task] Processing complete
[21:40:22.930] ChatGPT / DALL-E[Automation Task] Passing output 'true' to Conditional
[21:40:22.931] ChatGPT / DALL-E[Conditional] Processing complete
[21:40:22.931] ChatGPT / DALL-E[Conditional] Passing output 'true' to Arg and Vars
[21:40:22.932] ChatGPT / DALL-E[Arg and Vars] Processing complete
[21:40:22.933] ChatGPT / DALL-E[Arg and Vars] Passing output '/Users/dysaniacn/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai
/Users/dysaniacn/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai' to Split Arg
[21:40:22.934] ChatGPT / DALL-E[Split Arg] Processing complete
[21:40:22.935] ChatGPT / DALL-E[Split Arg] Passing output '(
    "/Users/dysaniacn/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/dysaniacn/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Automation Task
[21:40:22.935] ChatGPT / DALL-E[Automation Task] Running task 'New Folder' with arguments (
    "/Users/dysaniacn/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/dysaniacn/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)
[21:40:23.038] ChatGPT / DALL-E[Automation Task] Processing complete
[21:40:23.046] ChatGPT / DALL-E[Automation Task] Passing output '(
    "/Users/dysaniacn/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/dysaniacn/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Arg and Vars
[21:40:23.048] ChatGPT / DALL-E[Arg and Vars] Processing complete
[21:40:23.049] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[21:40:23.061] ChatGPT / DALL-E[Text View] Running with argument ''
[21:40:23.175] ChatGPT / DALL-E[Text View] Script with argv '' finished
[21:40:23.179] ChatGPT / DALL-E[Text View] {"response":"### hi\n\nHello! How can I assist you today?\n\n","behaviour":{"scroll":"end"}}
[21:40:29.052] ChatGPT / DALL-E[Text View] Processing complete
[21:40:29.058] ChatGPT / DALL-E[Text View] Passing output '' to Run Script
[21:40:29.156] ERROR: ChatGPT / DALL-E[Run Script] /Users/dysaniacn/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/7C24FF6D-1D1E-4231-965D-A596708E1898: execution error: Error: SyntaxError: JSON Parse error: Unexpected identifier "undefined" (-2700)
[21:40:29.167] ChatGPT / DALL-E[Run Script] Processing complete
[21:40:29.169] ChatGPT / DALL-E[Run Script] Passing output '' to Transform
[21:40:29.170] ChatGPT / DALL-E[Transform] Processing complete
[21:40:29.172] ChatGPT / DALL-E[Transform] Passing output '' to Copy to Clipboard

More details

When I want to copy a conversation, the ⌃+↵ and ⌥+↵ don't work.

Error when using cf-openai-azure-proxy

Workflow version

2024.5

Alfred version

5.5 [2257]

macOS version

Sonoma 14.4

Debugger output

[11:27:09.690] ERROR: ChatGPT / DALL-E[Text View] Code 1: /Users/huadeity/Library/CloudStorage/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.3EFAE712-0A37-4377-8DC8-A487A6F6658C/chatgpt: execution error: Error: TypeError: undefined is not an object (evaluating 'item["choices"][0]["delta"]') (-2700)

More details

I used cf-openai-azure-proxy to proxy Azure OpenAI for using Workflow.

The top three data in stream.txt is:

data: {"id":"","object":"","created":0,"model":"","prompt_filter_results":[{"prompt_index":0,"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}],"choices":[]}

data: {"id":"chatcmpl-94KQ1fkLhyMRL11BnpYZrD0mc64Lm","object":"chat.completion.chunk","created":1710818829,"model":"gpt-35-turbo","choices":[{"finish_reason":null,"index":0,"delta":{"role":"assistant","content":""},"content_filter_results":{}}]}

data: {"id":"chatcmpl-94KQ1fkLhyMRL11BnpYZrD0mc64Lm","object":"chat.completion.chunk","created":1710818829,"model":"gpt-35-turbo","choices":[{"finish_reason":null,"index":0,"delta":{"content":"Hello"},"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}]}

I believe the error may be related to the first response not having the "delta" value under item["choices"][0], as indicated by the ERROR message. Additionally, it appears that this response is missing other necessary keys such as "id" and "object". To resolve this issue, we could consider checking for the presence of an "id" key in order to skip over the first response.

Support custom OpenAI API base URL

Feature details

I'm using OpenAI with a non-default base URL, not openai.com/api/v1. Could you please support using non-default API base as an option in the workflow? Thanks!

Adding External Trigger to increase reusability

Feature details

I want an External Trigger to ask from another workflows.

image

For instance, it makes it easier to ask specific generic questions to ChatGPT from the workflow.

image

Input: Simple keyword input summary

Run Script: Script to construct prompts from clipboard text like the following

echo -n "Please summarize the following text within 100 characters.
---
$(pbpaste)
---"

Call External: Call the ask trigger of ChatGPT workflow

Workflow error: EXCEEDED QUOTA... Except my quota is fine.

Workflow version

2024.4

Alfred version

5.5

macOS version

14.4

Debugger output

[14:51:01.494] Logging Started...
[14:51:06.082] ChatGPT / DALL-E[Keyword] Processing complete
[14:51:06.100] ChatGPT / DALL-E[Keyword] Passing output 'why is the sky blue?' to Arg and Vars
[14:51:06.102] ChatGPT / DALL-E[Arg and Vars] Processing complete
[14:51:06.103] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Call External Trigger
[14:51:06.105] ChatGPT / DALL-E[External] Processing complete
[14:51:06.106] ChatGPT / DALL-E[External] Passing output '' to Write Text File
[14:51:06.108] ChatGPT / DALL-E[Write Text File] Processing complete
[14:51:06.110] ChatGPT / DALL-E[Write Text File] Passing output '/Users/juicyslut/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai/chat.json' to Arg and Vars
[14:51:06.112] ChatGPT / DALL-E[Arg and Vars] Processing complete
[14:51:06.114] ChatGPT / DALL-E[Arg and Vars] Passing output 'why is the sky blue?' to Text View
[14:51:06.195] ChatGPT / DALL-E[Text View] Running with argument 'why is the sky blue?'
[14:51:06.341] ChatGPT / DALL-E[Text View] Script with argv 'why is the sky blue?' finished
[14:51:06.346] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### why is the sky blue?\n\n"}
[14:51:06.446] ChatGPT / DALL-E[Text View] Running with argument 'why is the sky blue?'
[14:51:06.575] ChatGPT / DALL-E[Text View] Script with argv 'why is the sky blue?' finished
[14:51:06.581] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}


[14:51:06.679] ChatGPT / DALL-E[Text View] Running with argument 'why is the sky blue?'
[14:51:06.814] ChatGPT / DALL-E[Text View] Script with argv 'why is the sky blue?' finished

[14:51:06.823] ChatGPT / DALL-E[Text View] **{"response":"[You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.]  \n(Fri, 08 Mar 2024 22:51:06 GMT)","behaviour":{"response":"replacelast"}}**

More details

I asked why the sky is blue. Attempted to create new chat and start from earlier (even though no earlier exists because it's first run of workflow).

I went to my account, checked my api, everything is perfect. I tested chatGPT (3.5) and it's working. No error from their end. This is the error:
image

Thanks a lot Victor, you're truly a lovely specimen.

Cannot continue conversation from history

Frequently Asked Questions

Workflow version

v2024.8

Alfred version

Alfred 5.5 [2257]

macOS version

Sonoma 14.4.1

Debugger output

[23:20:22.962] ChatGPT / DALL-E[Keyword] Processing complete
[23:20:22.972] ChatGPT / DALL-E[Keyword] Passing output '' to Script Filter
[23:20:22.979] ChatGPT / DALL-E[Script Filter] Queuing argument '(null)'
[23:20:23.123] ChatGPT / DALL-E[Script Filter] Script with argv '(null)' finished
[23:20:23.129] ChatGPT / DALL-E[Script Filter] {"items":[{"type":"file","match":"undefined undefined","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.14.44-F37798C6.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.06.16-28070C79.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.05.18-3D152882.json"},{"type":"file","title":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.04.21-B501A358.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.03.36-53BA42EC.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.00.49-4C133A54.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.18.47.44-81D1A714.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.09.00.55.53-EA6F6F29.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.08.18.48.19-44251A8F.json"},{"type":"file","title":"<REDACTED>","subtitle":"<REDACTED>","match":"<REDACTED>","arg":"/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.08.18.45.07-5EE03AEF.json"}]}
[23:20:34.113] ChatGPT / DALL-E[Script Filter] Processing complete
[23:20:34.126] ChatGPT / DALL-E[Script Filter] Passing output '/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai/archive/2024.04.17.23.00.49-4C133A54.json' to Arg and Vars
[23:20:34.127] ChatGPT / DALL-E[Arg and Vars] Processing complete
[23:20:34.128] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Run Script
[23:20:34.220] ChatGPT / DALL-E[Run Script] Processing complete
[23:20:34.224] ChatGPT / DALL-E[Run Script] Passing output '' to Arg and Vars
[23:20:34.225] ChatGPT / DALL-E[Arg and Vars] Processing complete
[23:20:34.226] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Call External Trigger
[23:20:34.227] ChatGPT / DALL-E[External] Processing complete
[23:20:34.228] ChatGPT / DALL-E[External] Passing output '' to Arg and Vars
[23:20:34.228] ChatGPT / DALL-E[Arg and Vars] Processing complete
[23:20:34.234] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Conditional
[23:20:34.235] ChatGPT / DALL-E[Conditional] Processing complete
[23:20:34.235] ChatGPT / DALL-E[Conditional] Passing output '' to Run Script
[23:20:34.337] ChatGPT / DALL-E[Run Script] Processing complete
[23:20:34.339] ChatGPT / DALL-E[Run Script] Passing output '' to Arg and Vars
[23:20:34.340] ChatGPT / DALL-E[Arg and Vars] Processing complete
[23:20:34.340] ChatGPT / DALL-E[Arg and Vars] Passing output '/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai
/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai' to Split Arg
[23:20:34.341] ChatGPT / DALL-E[Split Arg] Processing complete
[23:20:34.342] ChatGPT / DALL-E[Split Arg] Passing output '(
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Automation Task
[23:20:34.343] ChatGPT / DALL-E[Automation Task] Running task 'New Folder' with arguments (
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)
[23:20:34.443] ChatGPT / DALL-E[Automation Task] Processing complete
[23:20:34.446] ChatGPT / DALL-E[Automation Task] Passing output '(
    "/Users/max/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/max/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Arg and Vars
[23:20:34.447] ChatGPT / DALL-E[Arg and Vars] Processing complete
[23:20:34.448] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[23:20:34.469] ChatGPT / DALL-E[Text View] Running with argument ''
[23:20:34.584] ChatGPT / DALL-E[Text View] Script with argv '' finished
[23:20:34.590] ChatGPT / DALL-E[Text View] {"response":"","behaviour":{"scroll":"end"}}

More details

Note: in the debugger output I inserted <REDACTED> to save some privacy, although you can still see parts of those strings in the attached vid.

  1. I enter gpt (my custom trigger word) and press alt+enter to bring up chat history.
  2. I see previous conversations, select one (press down, down, down), and press Enter.
  3. I see blank screen instead of existing conversation. (Expected to see the chat.)
  4. I write a new message and press Enter.
  5. The OpenAI response is out of context. (Expected it to continue the previous chat).
alfred-openai-history-bug-480p.mov

Often over limit for simple massages

Frequently Asked Questions

Workflow version

2024.9

Alfred version

5.5

macOS version

sonoma

Debugger output

[09:25:41.780] Logging Started...
[09:25:45.301] ChatGPT / DALL-E[Keyword] Processing complete
[09:25:45.310] ChatGPT / DALL-E[Keyword] Passing output 'how' to Arg and Vars
[09:25:45.311] ChatGPT / DALL-E[Arg and Vars] Processing complete
[09:25:45.312] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Automation Task
[09:25:45.314] ChatGPT / DALL-E[Automation Task] Running task 'Does Path Exist?' with arguments (
    "/Users/chuanhe/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai/chat.json"
)
[09:25:45.357] ChatGPT / DALL-E[Automation Task] Processing complete
[09:25:45.363] ChatGPT / DALL-E[Automation Task] Passing output 'true' to Conditional
[09:25:45.364] ChatGPT / DALL-E[Conditional] Processing complete
[09:25:45.365] ChatGPT / DALL-E[Conditional] Passing output 'true' to Arg and Vars
[09:25:45.366] ChatGPT / DALL-E[Arg and Vars] Processing complete
[09:25:45.366] ChatGPT / DALL-E[Arg and Vars] Passing output 'how' to Text View
[09:25:45.429] ChatGPT / DALL-E[Text View] Running with argument 'how'
[09:25:45.634] ChatGPT / DALL-E[Text View] Script with argv 'how' finished
[09:25:45.642] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### i have .zsh_history that contains dups, i want to dedup and writes to itself in bash\n\nGiven that you have a `.zsh_history` file that contains duplicates, you can de-duplicate it in bash with the help of awk, sort and sponge commands. \n\nFirst, a backup is recommended:\n\ncp ~/.zsh_history ~/.zsh_history.bak\n\n\nThen you can remove duplicates like this:\n```bash\nawk '!a[$0]++' ~/.zsh_history | sponge ~/.zsh_history\n```\n\nAnother way is to use sort and uniq commands:\n```bash\nsort ~/.zsh_history | uniq | sponge ~/.zsh_history\n```\n\n**Please note:** The `sponge` command is part of moreutils. If you don't have `sponge`, you would need to install it or use an equivalent like `tee`. If `sponge` is not installed, you can perform it using the below command:\n\n```bash\nsudo apt install moreutils  #Debian based systems\nsudo yum install moreutils  #RedHat based systems\n```\n\nAlso note that using `sort` and `uniq` will sort your history which may not be desirable. The `awk` approach will maintain the original order.\n\n### what is this awk arg?\n\nThe AWK command is often used for manipulating files and strings in shell scripting. \n\nThe argument `!a[$0]++` in the AWK command is a one-liner to remove duplicates while preserving the order of lines.\n\nHere is a breakdown of what it does:\n\n- `a` is an associative array that AWK automatically creates.\n- `$0` is the whole line in the file.\n- `!a[$0]++` is a logical not `!` and a post-increment `++`. This syntax exploits the fact that in AWK, an uninitialized variable has the numeric value 0 and the empty string value \"\".\n- So, when a line is first encountered, `a[$0]` is 0 (which is false), so `!a[$0]` is true. The line gets printed, and then `a[$0]` is incremented to 1.\n- When the same line is encountered again, `a[$0]` is 1 (which is true), so `!a[$0]` is false, and the line does not get printed.\n\nThis means that each unique line will only be printed the first time it's encountered by AWK, effectively removing duplicates from the file.\n\n### where is launchtl xml stored macos\n\nLaunchd and its configuration files play a very main role in macOS systems. Launchd items are essentially just XML files that are stored in various locations on your Mac’s file system.\n\nEach `launchd` job is described by a separate `.plist` file. These `.plist` files are stored in a handful of specific locations on the macOS file system:\n\n- `/System/Library/LaunchAgents`: These are the system level agents provided by Apple. Generally, you shouldn't modify anything here.\n- `/System/Library/LaunchDaemons`: These are the system level daemons provided by Apple. Again, you shouldn't modify anything here.\n- `/Library/LaunchAgents`: Agents for all users.\n- `/Library/LaunchDaemons`: Daemons for all users.\n- `~/Library/LaunchAgents`: Agents for the currently logged in user.\n\nEach file specifies one job to be run, and the name of the plist file minus the extension is usually referred to as the `label` or `id` of the job.\n\nNote that changes to the system directories may not persist through system updates and reinstallations. Changes to the user directories will only affect the current user. Make sure not to change or remove system files unless you know what you're doing.\n\n### does subshell respec .zshrc\n\nIn Zsh, as well as in other shells like Bash, a subshell does not automatically source (i.e., read and execute commands from) the shell's startup files like `.zshrc`.\n\nNormally, `.zshrc` is sourced when an interactive shell starts. A subshell, however, is not interactive and therefore does not source `.zshrc`.\n\nIf you want to ensure that certain settings or variables are set in subshells, you should put those settings or variables in a configuration file that the shell reads for non-interactive sessions, such as `.zshenv`.\n\nHowever, it's also possible to force the sourcing of `.zshrc` in a subshell by manually sourcing it, like so:\n\n```zsh\n(source ~/.zshrc; other_commands...)\n```\n\nRemember to be careful with this approach, as `.zshrc` may contain settings or commands that aren't suitable for non-interactive sessions.\n\n### so if an alias is set in .zshenv, does it need to be set again in zshrc?\n\nNo, if an alias is set in `.zshenv`, it does not need to be set again in `.zshrc`. \n\nThe `.zshenv` file will be loaded for all Zsh sessions, both interactive and non-interactive, which means that anything declared within `.zshenv` such as variables and aliases will be accessible in any zsh session.\n\nOn the other hand, `.zshrc` is sourced only for interactive sessions. \n\nSo, if you create an alias within `.zshenv`, it will be globally available in all your zsh sessions, including those that source `.zshrc`. This is why you don't have to declare the alias again in `.zshrc` if it's already declared in `.zshenv`. \n\nBear in mind that you should only put environment settings in `.zshenv` that are needed by graphical applications or non-interactive scripts, not anything that's specifically for the command-line.\n\n### where do i put my username and email in my git repo\n\nYou can add your username and email to your Git configuration at the global level or per individual Git repository. This information is used by Git to associate your name and email address with each commit you make.\n\nFor a global setting, open a terminal and use the following commands:\n\n```bash\ngit config --global user.name \"Your Name\"\ngit config --global user.email \"[email protected]\"\n```\n\nIf you want to specify the username and email for a specific Git repository only, navigate to the directory of that repository and use these commands (without `--global`):\n\n```bash\ngit config user.name \"Your Name\"\ngit config user.email \"[email protected]\"\n```\n\nThis associates \"Your Name\" and \"[email protected]\" with all future commits in the current repository. Please replace these with your real name and email. Be aware that this information will be publicly accessible if you push commits, e.g. to public repositories on platforms such as GitHub.\n\n### ssh-keygen -t ed25519 -C \"[email protected]\"\n### what is the point of adding in email\n\nThe `-C` flag in the `ssh-keygen` command is used to provide a comment to the generated key. The comment doesn't have a functional role in SSH operations. It is mainly used for identifying the SSH key. This can be beneficial if you use multiple SSH keys and you want to keep track of each one.\n\nIn your example, `ssh-keygen -t ed25519 -C \"[email protected]\"` generates a new SSH key of type ed25519, and the comment associated with that key will be \"[email protected]\".\n\nOften, people use their email as the comment to quickly identify to whom or to which machine the SSH key belongs. However, it can really be any string you want. \n\nJust bear in mind that, if you publish the public part of the key, the comment is fully visible to others. So, avoid putting sensitive information in it.\n\n### permission 0644 are too open for private key files\n\nYes, SSH private key files should not have overly permissive permissions as it's a security risk. SSH strictly requires that your private key files are not accessible by others on your system. Anyone who can access your private key file could potentially initiate a session to a remote server, impersonate you, or perform malicious activity.\n\nErring on the right side of caution, SSH will not use a private key file if it's accessible by others. Therefore, a private key file should be readable/writable by only the owner.\n\nTo ensure the right permissions, use the chmod command to change your private key file permissions so only you have read access. No other permissions should be set. Here's how:\n\n```bash\nchmod 600 ~/.ssh/id_rsa\n```\nReplace `~/.ssh/id_rsa` with the path to your actual private key file if it's different.\n\nIn this command, `chmod 600` sets the file permissions to \"readable and writable by owner, not accessible by anyone else\". This is the permission level you want for your private key files.\n\n### what is text debounce in terms of neovim plugins\n\nThe term `debounce` is a concept borrowed from electronics and applied to software. In the context of neovim plugins and text editing, `debounce` is often used in relation with real-time functions such as autocompletion or live-previews that constantly update as you type.\n\nNormally, an action (e.g. autocomplete suggestion or syntax check) would be triggered every time a key is pressed. This could lead to performance issues while typing in the editor if the event handlers attached to these actions are heavy operations.\n\nDebouncing in this context is used to limit how often a function can fire, by introducing a delay for a certain amount of time after the last action. This way, the event will only be handled after you have stopped typing for a certain amount of time, and not on every single keystroke.\n\nFor instance, if you have a linter plugin in neovim that checks your syntax on every keystroke, if `debounce` is set to 500 milliseconds, then the linter will only run 500 milliseconds after you've stopped typing. This can make the neovim smoother as it reduces load on the system.\n\nIn summary, text debouncing in terms of neovim plugins helps improve performance by controlling how frequently real-time update functions are run.\n\n### so its bascially a delay?\n\nYes, in a sense, debounce is a delay mechanism. \n\nHowever, it's not just any delay. Debouncing is a software practice used to ensure that time-consuming tasks do not fire so often, so that they don't overload the capacity of the performance. \n\nIn an editor, like NeoVim, when you type, if there are actions attached to every keystroke like syntax checking, autocomplete suggestions, etc., and if these tasks are directly fired at every keystroke without a control mechanism, it can notably slow down the system.\n\nWith debouncing, these tasks will be bundled and executed after a specified delay once the user has stopped typing, rather than at each keystroke. It's a way to increase the efficiency of the system. So while it acts like a delay, it is a delay with the intent of limiting the frequency of a function execution, and thus increasing performance.\n\n### how to close a pane in vim\n\nYou can close a pane in Vim using the `:q` or `:close` commands:\n\n- `:q` (short for `:quit`) will close the current window. If it's the last window (containing the last buffer), Vim will quit altogether.\n- `:close` will close the current window, but if it's the last window with the last buffer, Vim will refuse to do this.\n\nYou can also use `:bd` (buffer delete) to wipe out the buffer and close the window.\n\nAltering between panes can be done using `Ctrl-w` followed by the direction. For instance:\n\n- Ctrl-w + h will move to the left window.\n- Ctrl-w + j will move to the bottom window.\n- Ctrl-w + k will move to the top window.\n- Ctrl-w + l will move to the right window.\n\nNote: Case is important in Vim commands, so make sure you use lowercase.\n\n### how to close a buffer in vim without closing that window, when having more than 1 windows\n\nYou can close a buffer without closing the window by using the `:bdelete` command or its abbreviated version `:bd`. This command deletes the buffer, but your window layout is preserved.\n\nHowever, simply calling `:bd` will typically end up showing a different buffer in the window, or a blank buffer if there are no other buffers to show. If you want to have explicit control over what shows up in your window after deleting the buffer, you might want to manually switch to a different buffer first using the `:buffer` or `:b` command, followed by a buffer number or a part of the file/buffer name, before you delete the buffer. \n\nFor example:\n\n```vim\n:b otherFile    \" switch to buffer containing 'otherFile'\n:bd1            \" delete buffer number 1\n```\n\nYou can use `:ls` or `:buffers` to list the open buffers if you're unsure what else is open.\n\nRemember, `:bd` deletes a buffer (removing it from the buffer list and memory). If you just want to hide a buffer, you can use `:hide`, which closes the current window but keeps the buffer in the buffer list.\n\n### no bd closes the windows as well\n\nApologies for the confusion earlier. You are correct. The `:bd` command does close the window as well as the buffer.\n\nIf you would like to delete a buffer in vim but keep the window layout, then you need to first change to another buffer before deleting the one you want to get rid of.\n\nHere's how you can do that:\n\n1. List the open buffers by typing `:ls` or `:buffers`. Each buffer will have an associated number.\n2. Switch to a different buffer using `:b #`, where '#' is replaced by the number of the buffer (For example, `:b 2` will switch to the buffer 2).\n3. Now, you can delete the other buffer using `:bd #` (like `:bd 1` to delete the buffer 1).\n\nThis will delete a specific buffer while keeping the window layout. \n\nAlternatively, you can open a new empty buffer in the current window with `:enew` before deleting the old buffer, if you don't want to switch to a specific existing buffer. Here's how:\n\n```bash\n:enew    # open a new empty buffer\n:bd#     # delete the alternate buffer (which is what your old buffer becomes after you :enew)\n```\n\n### what is good evening in spanish\n\nThe phrase \"Good evening\" translates to \"Buenas noches\" in Spanish.\n\n### whats the name of the god in dragon ball z that loves to eat and has the ability to destroy planets\n\nThe character you're referring to is Beerus, the God of Destruction in \"Dragon Ball Z: Battle of Gods\" and \"Dragon Ball Super\". He's known for his immense power, capable of destroying planets, as well as his love for food.\n\n### is it good to have mac as a passthrough charger\n\nYes, you can safely use your Mac as a pass-through charger. Apple's modern Mac computers, particularly those with USB-C ports, are designed to handle pass-through power without any issues.\n\nYou can connect your device (like an iPhone or iPad) to your Mac's USB or USB-C port to charge it. If your Mac is plugged into a power source, it will charge the device while maintaining its own battery level. If your Mac is not plugged into a power source, it may drain its battery to provide power to the device.\n\nHowever, this is not going to cause any damage to your MacBook. The power management system is clever enough to cut off power to other devices when the MacBook's battery gets too low. Additionally, it won’t strain the Mac’s power supply because the power for charging a connected device comes directly from the charger, not from the MacBook's battery.\n\nAs a note, the charging speed may be slower since USB ports on Macs typically don't supply as much power as a dedicated wall charger.\n\n### User\n### so i have an table called EntityTag, and its children EntityTagging, i want to write a query that would give me the count of entries where the entitytag's active_entity_tagging_counts column is not the same as its active count of the children EntityTagging as well as the count for both entities and updated_at, ordered by the most recent updated_at of entity_tagging\n\nYou'll require a SQL query using the JOIN statement to compare columns of two different tables. Here is a sample query based on your requirements:\n\n```sql\nSELECT\n  EntityTag.id AS entity_id,\n  EntityTag.active_entity_tagging_counts AS active_entity_tagging_counts,\n  COUNT(EntityTagging.entity_tag_id) AS actual_tag_count,\n  MAX(EntityTagging.updated_at) AS most_recent_update\nFROM EntityTag\nLEFT JOIN EntityTagging ON EntityTagging.entity_tag_id = EntityTag.id\nWHERE EntityTagging.active = true\nGROUP BY EntityTag.id\nHAVING COUNT(EntityTagging.entity_tag_id) <> EntityTag.active_entity_tagging_counts\nORDER BY most_recent_update DESC;\n```\n\nPlease replace the column names and table names with your actual column and table names if they are different.\n\nThis query will return the entity ID, the count of active taggings as stored in the EntityTag table, the actual active count of associated EntityTaggings, and the most recent `updated_at` date among associated active taggings.\n\nThe results are filtered to include only those entities for which the stored count and actual count differ, and are ordered by the most recent associated tagging `updated_at` date in descending order.\n\nPlease be aware this is just an example. The actual query can differ based on your exact schema and SQL dialect.\n\n### this is not correct\n\nI'm sorry for the confusion. It appears there has been a misunderstanding of your database schema and requirements. Could you please provide additional details? Here are a few questions that would help create a better query:\n\n- What are the exact column names in your `EntityTag` and `EntityTagging` tables that need to be compared for equality (or lack of it)?\n- You mentioned \"active count of the children EntityTagging\". Can you confirm if this count is represented within a single column in the 'EntityTag' or 'EntityTagging' table? Or does it need to be calculated, and if so, how?\n- What is the exact relation between the `EntityTag` and `EntityTagging` tables? Is there a foreign key in `EntityTagging` pointing to `EntityTag`?\n\nThe more specifics you provide, the better I can help you formulate your SQL query.\n\n### your assumptions are correct, however im getting entityTag.active_entity_tagging_counts must appear in the group by\n\nMy apologies for the confusion. Some DBMS like PostgreSQL require all selected fields that aren't being aggregated to appear in the GROUP BY clause.\n\nYou can try the following query:\n\n```sql\nSELECT\n  EntityTag.id AS entity_id,\n  EntityTag.active_entity_tagging_counts AS active_entity_tagging_counts,\n  COUNT(EntityTagging.entity_tag_id) AS actual_tag_count,\n  MAX(EntityTagging.updated_at) AS most_recent_update\nFROM \n  EntityTag\nLEFT JOIN\n  EntityTagging \nON \n  EntityTagging.entity_tag_id = EntityTag.id\nWHERE \n  EntityTagging.active = true\nGROUP BY \n  EntityTag.id, EntityTag.active_entity_tagging_counts\nHAVING \n  COUNT(EntityTagging.entity_tag_id) <> EntityTag.active_entity_tagging_counts\nORDER BY \n  most_recent_update DESC;\n```\n\nThis version of the SQL query includes `EntityTag.active_entity_tagging_counts` in the `GROUP BY` clause, which should avoid the error you were encountering. This will group the results not only by `EntityTag.id`, but also by each distinct `active_entity_tagging_counts` value.\n\nRemember to replace `EntityTag`, `EntityTagging`, `active_entity_tagging_counts`, `updated_at`, `id`, `entity_tag_id` and `active` with your correct table and column names if they are different.\n\n### what is the -g in npm install\n\nThe `-g` flag in `npm install -g` stands for \"global\". When you install a package with this flag, it means the package is installed globally on your system.\n\nA globally installed package can be accessed from anywhere on your system, not just the directory you're currently in. It's commonly used for packages that provide command line tools that you want to be able to access from any location, such as Grunt, Gulp, or create-react-app.\n\nFor example, `npm install -g create-react-app` will install the `create-react-app` package globally, allowing you to use the `create-react-app` command in any directory on your system to create a new React application.\n\nWithout the `-g` flag, `npm install` will install the package only in the current directory under the `node_modules` folder, and it will only be accessible from scripts running in that directory. This is known as a local installation.\n\n### how do i git blame a range in a file\n\nYou can use the `git blame` command along with a revision range to see who last edited certain lines in a specified file over a specific range of commits.\n\nFor instance, if you wanted to see who modified lines in a file between two specified commits, you would use the following command:\n\n```sh\ngit blame COMMIT1..COMMIT2 -- filename\n```\n\nHere, `COMMIT1..COMMIT2` is your commit range (hashes or references), and `filename` is the file you want to investigate.\n\nPlease note that `COMMIT1..COMMIT2` will show the difference between the end of the range and its start. That means it will include all changes made in `COMMIT2` since `COMMIT1`.\n\nFor instance, if you have two commits `a1b2c3d` and `e4f5g6h`, you can blame changes to a file \"myfile.txt\" in that range as follows:\n\n```sh\ngit blame a1b2c3d..e4f5g6h -- myfile.txt\n```\n\nThis will show who last changed each line in \"myfile.txt\" over the selected commit range.\n\n### i meant a code block, a range with in the file\n\nTo investigate a specific line range within a file, you can also do that with git blame. Here's how you can combine git blame with a line range:\n\n```bash\ngit blame -L startLine,endLine filename\n```\n\nYou replace `startLine` and `endLine` with your specific lines of interest.\n\nFor example, if you want to inspect lines 50 through 100 in a file named `index.js`, you would use the command:\n\n```bash\ngit blame -L 50,100 index.js\n```\n\nThis command will show you who last modified each line in that specific range within `index.js`. Note that all lines in your file are 1-indexed (i.e., count starts from 1).\n\n### where do i set the secrets for github action\n\nYou can set secrets for your GitHub Actions workflows in your repository's settings. Follow these steps:\n\n1. Navigate to your GitHub repository in your web browser.\n2. Click on the \"Settings\" tab (note you have to be an owner or have admin rights to see this tab).\n3. Click on \"Secrets\" in the left sidebar.\n4. Click on \"New Repository Secret\" button.\n5. Enter a name for the secret. This is the name you will use to access the secret in your GitHub Actions workflow file.\n6. Enter the value for the secret.\n7. Click \"Add secret\" to save it.\n\nYou can now refer to this secret in your GitHub Actions workflows using the `secrets` context. For example, if you added a secret with the name `MY_SECRET`, you could refer to the secret in your workflow file (`.github/workflows/workflow.yml`) like so:\n\n```yaml\nsteps:\n  - name: Example step\n    env:\n      MY_SECRET_ENV_VAR: ${{ secrets.MY_SECRET }}\n    run: echo \"The secret is $MY_SECRET_ENV_VAR\"\n```\n\nThis would print the secret to the console, which is generally a bad practice. Just remember, your secrets are masked in the log output of GitHub Actions, so they will not be exposed. In the example provided, \"***\" will be printed to the console instead of the actual secret value.\n\n### can you put this into a table of contents for me, they are all of the same heading [How to get started?](#how-to-get-started)\n### [Daily dev commands](#daily-dev-commands)\n### [Localization](#localization)\n### [Pre-commit hooks](#pre-commit-hooks)\n### [Migration](#migrations)\n### [Testing](#testing)\n### [Dependency management](#dependency-management)\n### [Port assignments](#port-assignments)\n### [TODO linting](#todo-linting)\n### \n\nAbsolutely, you can use the following format to create a table of contents from the headings you provided.\n\n## Table of Contents\n- [How to get started?](#how-to-get-started)\n- [Daily dev commands](#daily-dev-commands)\n- [Localization](#localization)\n- [Pre-commit hooks](#pre-commit-hooks)\n- [Migration](#migrations)\n- [Testing](#testing)\n- [Dependency management](#dependency-management)\n- [Port assignments](#port-assignments)\n- [TODO linting](#todo-linting)\n\nWhen placed at the top of your README or other Markdown document, this table of contents will allow users to click on an item to quickly navigate to the relevant section of the document.\n\n### ctrl-b and ctrl-f in vim\n\nIn Vim, `Ctrl-b` and `Ctrl-f` are related to navigating through pages of the document.\n\n- `Ctrl-b` stands for \"back\", it's used to move the view one full screen backward (upward) in your open file. The cursor position is not changed unless it went off of the screen, in which case it will try to stick to the same column but appear on the last row of the screen. Note that `Ctrl-b` works in normal, visual and command-line modes.\n\n- `Ctrl-f` stands for \"forward\", it's used to scroll the window view one full page forward (downward) in your open file. Just like with `Ctrl-b`, the cursor position will remain the same unless it goes off of the screen due the page down action. If this happens, it will be moved to the first character on the top line on the screen. The `Ctrl-f` command also works in normal, visual and command-line mode.\n\nThese key bindings in Vim are similar to the page up and page down keys in other text editors. Remember, these commands scroll roughly by the number of lines that your window is tall. If you have a two-line window, you'll only scroll two lines with Ctrl-b/f. If you have a 60-line window, you'll scroll by about 60 lines (actually a bit fewer, to provide some overlap).\n\n### Error response from daemon: network aefd74b2c3a7576d493888a9ef8d9a4ee45c1dffb0a869c35367ed93cee5299b not found\n\nThis error occurs when Docker can't find the specified network. Here are a few potential solutions.\n\n1. **Remove the network directly**. If the network is no longer needed, you can try removing it. Check your network list with:\n```shell\ndocker network ls\n```\nAnd then try to remove the network.\n```shell\ndocker network rm <NETWORK_ID/NAME>\n```\n\n2. **Stop the containers using the network**. If there are any containers still using this network, you will need to stop and remove those containers.\n\n```shell\ndocker ps -a\ndocker stop <CONTAINER_ID/NAME>\ndocker rm <CONTAINER_ID/NAME>\n```\nReplace `<CONTAINER_ID/NAME>` with the actual IDs or names of the containers from your output of the `docker ps -a` command.\n\n3. **Restart Docker**. Sometimes, the problem can also stem from Docker's internal issues, and a restart of Docker could resolve the problem.\n\n\n4.**Prune networks**. Use the following command prune to remove all unused networks.\n\n```shell\ndocker network prune\n```\nBe careful with this command: Apart from the network which causes the problem, Docker will remove all networks not used by at least one container.\n\nRemember to replace `<NETWORK_ID>` and `<CONTAINER_ID>` with your actual network and container IDs. It's also important that you understand that these commands will delete your network and containers, which may contain data you may want to keep.\n\n### i have a few lines of code that i put in .zshrc, i want it to be put in another file, do i just source that file in the original .zshrc?\n\nYes, you can move those lines of code into another file and then `source` that file in your `.zshrc`.\n\nHere are the steps:\n\n1. Move the code lines to another file. Let's call this file `extra_config.zsh`. You can create and place this file wherever you like, but a common place would be the home directory `~` or within a sub-directory in the home directory.\n\n2. Open your `.zshrc` file with a text editor from the terminal:\n\n    ```bash\n    vim ~/.zshrc\n    ```\n\n    (Substitute `vim` with your preferred text editor, like `nano` or `emacs`.)\n\n3. Insert a line to source your `extra_config.zsh` file by providing the full path. Here's an example:\n\n    ```bash\n    source ~/extra_config.zsh\n    ```\n\n4. Save and exit. The changes will take effect in your new terminal sessions.\n\nRemember: Paths beginning with `~/` refer to your home directory. If your `extra_config.zsh` file is located elsewhere, you should adjust the path accordingly.\n\n### how to create a revert commit\n\nIf you want to undo a commit that was already pushed, you can use `git revert`.\n\nHere's how you can do it:\n\n1. Find the commit hash you want to revert. You can view the commit log by using the `git log` command. This will show you a history of all commits, from newest to oldest.\n\n2. Once you have identified the commit you want to revert (it will be a string of numbers and letters like `a1b2c3d4e5f`), you can create a revert commit by using the `git revert` command followed by the commit hash.\n\n```bash\ngit revert a1b2c3d4e5f\n```\n\n3. This will open your configured text editor in the terminal and prompt you to enter a new commit message for this revert. Save and exit your text editor to complete the revert commit.\n\n4. Finally, push your changes to the repository:\n\n```bash\ngit push origin main\n```\n\nReplace \"main\" with the branch name you want to push to, if it's not the main branch.\n\nThis will create and push a new commit that undoes the changes made in the specified commit. Note that this doesn't delete any commits or history, making it a safe operation to perform even on commits that have already been pushed.\n\n### how about a revert on a merge\n\nIf you want to undo a merge commit, you can do this by using the `git revert` command along with the `-m` option. The `-m` option specifies the parent number. \n\nHere's how to do it:\n\n1. Find the commit hash of the merge commit you want to revert. You can use `git log` to view the commit history.\n\n2. Execute `git revert -m 1 commit_hash`, replacing 'commit_hash' with the hash of the merge commit you want to revert.\n\nThe `1` in `-m 1` specifies the first parent of the merge, usually the branch you were on when you performed the merge. If you want to keep the changes from the other branch and remove the changes from your branch, you could specify the other parent with `-m 2`.\n\nFor example, if `abc123` is the commit hash of the merge commit:\n\n```bash\ngit revert -m 1 abc123\n```\n\n3. You will be prompted to enter a commit message for the revert commit in your text editor. After saving and closing the file, the revert commit will be created.\n\n4. Finally, push your changes to the repository:\n\n```bash\ngit push origin main\n```\n\nAgain, replace \"main\" with the branch you want to push to if it's not the main branch. \n\nNote that this will only reverse the changes introduced by the merge commit, not the entire history of the branch that was merged. If you want to completely remove a merged branch from your git history, you might have to look into more advanced techniques such as `git rebase` or `git reset`.\n\n### how can i modify the payload of railssemantic logger\n\nIf you'd like to modify the payload of your logs with Semantic Logger for Rails, you can accomplish that by using custom formatters or by modifying the payload in a Semantic Logger Appender. \n\nFormatters handle creating the output for each log entry in Semantic Logger. By creating your own custom formatter and specifying it in the configuration, you can control how logs are formatted and what information they contain.\n\nHere's an example of a custom formatter:\n\n```ruby\nclass MyCustomFormatter < SemanticLogger::Formatters::Default\n  def call(log, logger)\n    # Call the default formatter to create a Hash of the data we will log\n    log_structure = super\n\n    # Modify the payload here\n    log_structure[:payload][:extra_info] = \"my_extra_info\"\n\n    # Return a JSON formatted log entry\n    log_structure.to_json + \"\\n\"\n  end\nend\n```\n\nYou can add this class somewhere in your Rails application (like in `config/initializers` folder) and use it in your Semantic Logger configuration:\n\n```ruby\nconfig.rails_semantic_logger.format = MyCustomFormatter.new\n```\n\nPlease note this example modifies the payload of all logged entries. Be sure to check `log` and `logger` or any other variable if you only want to modify the payload in certain scenarios to ensure the correct data is being modified.\n\nRemember to adjust the actual modification of the payload (`log_structure[:payload][:extra_info] = \"my_extra_info\"`) according to your needs.\n\n### i need something that can get the active record sql\n\nTo capture SQL statements made by ActiveRecord when Semantic Logger is in use, you can create a LogSubscriber. LogSubscriber is a class in Rails that's used for collecting instrumentation events.\n\nBelow is an example of a LogSubscriber that logs SQL queries:\n\n```ruby\nrequire 'active_support/log_subscriber'\n\nclass QueryLogger < ActiveSupport::LogSubscriber\n  def sql(event)\n    # Avoid logging schema loading (such as `structure.sql`)\n    return if event.payload[:name] == 'SCHEMA'\n\n    # Build a structured hash. Semantic Logger will take care of logging it correctly.\n    log_info = {\n      name: event.payload[:name],\n      duration: event.duration,\n      statement: event.payload[:sql]\n    }\n\n    # Use Semantic Logger to log the information\n    SemanticLogger['QueryLogger'].info(**log_info)\n  end\nend\n\n# Attach this new LogSubscriber to ActiveRecord\nQueryLogger.attach_to :active_record\n```\n\nThis LogSubscriber logs all SQL queries executed by ActiveRecord (except for schema loading operations, which tend to be noisy). The logs use the INFO level and output structured entries (as long as your logger is configured to produce structured log entries).\n\nYou can add this code in an initializer file (like `config/initializers/query_logger.rb`) in your Rails application.\n\nRemember to adjust the `log_info` hash and logger name (`QueryLogger`) according to your needs.\n\n### can you have multiple of this file? or only one, i have one existing querylogger\n\nYou can certainly have multiple LogSubscribers in a Rails application. If you want to create another LogSubscriber, you can follow the same steps with a different class name.\n\nFor instance, if you have an existing `QueryLogger`, you may create another logger called `QueryLogger2` (or any other descriptive name).\n\n```ruby\nclass QueryLogger2 < ActiveSupport::LogSubscriber\n  def sql(event)\n    # Your logging code\n  end\nend\n\nQueryLogger2.attach_to :active_record\n```\n\nGenerally speaking, it might be a good idea to have just one subscriber for each type of instrumentation event (in this case, SQL events from Active Record). If you want to log different kinds of information from these events, you can differentiate within a single `sql` method based on the `event` or other conditions.\n\nRemember to put this in a new initializer or add it to an existing one. Then, remember to restart your Rails server so that the new initializer is picked up.\n\n### when you attach mulitiple, they all work?\n\nYes, if you attach multiple LogSubscribers to the same component in Rails (such as `:active_record`), they all get triggered when the corresponding events occur.\n\nEach LogSubscriber gets called independently of the others when an event happens. The LogSubscriber's methods that match the event get called with the event data. So if you have multiple LogSubscribers, each with an `sql` method attached to `:active_record`, each of those `sql` methods gets called when an SQL event occurs in ActiveRecord.\n\nThis can be useful if you want to log different aspects of the same events, but remember that it also can increase the overhead of event logging. It can slow down your application if your logging operations are computationally expensive, or if you have a large number of LogSubscribers.\n\nSo, it is highly recommended to keep your logging code efficient, especially in a high-traffic production application.\n\n### whats the point of using the :reject option in sidekiq unique jobs to send duplicate to the dead set as opposed to just let it fail silently?\n\n[Answer Interrupted]\n\n### how\n\n[Answer Interrupted]\n\n### how\n\n"}
[09:25:46.190] ChatGPT / DALL-E[Text View] Running with argument 'how'
[09:25:46.322] ChatGPT / DALL-E[Text View] Script with argv 'how' finished
[09:25:46.328] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[09:25:46.432] ChatGPT / DALL-E[Text View] Running with argument 'how'
[09:25:46.645] ChatGPT / DALL-E[Text View] Script with argv 'how' finished
[09:25:46.654] ChatGPT / DALL-E[Text View] {"response":"[This model's maximum context length is 8192 tokens. However, your messages resulted in 8215 tokens. Please reduce the length of the messages.]  \n(Thu, 18 Apr 2024 16:25:46 GMT)","behaviour":{"response":"replacelast"}}

More details

I really like the simplicity of this workflow, however, its been burning a whole in my pocket. I

{"response":"[This model's maximum context length is 8192 tokens. However, your messages resulted in 8215 tokens. Please reduce the length of the messages.]  \n(Thu, 18 Apr 2024 16:25:46 GMT)","behaviour":{"response":"replacelast"}}

I think there might be a problem with the whole chat history being sent to gpt each time when using continue chat, which is what I do all the time. I have only done 3 simple gpt questions today, only about at best 200 words for answers + question. But i have already spent a dollar today using GPT4.

My last message only contains a how, and i was told that im over the limit

See previous chat histories

Feature details

We'd like to navigate between all the new conversations we had with ChatGPT and be able to view/continue that conversation. Is that on the roadmap, by any chance?

Sticky Window

Frequently Asked Questions

Feature details

I love the extension. It's very useful to have Alfred snippets directly input in the extension.

But there's a UX caveat that makes the UX a bit clunky when using ChatGPT through Alfred. The Alfred popup vanishes when we click on other windows. If there were an option to keep the Alfred popup open while we could click on other windows and read/copy & paste from Alfred, that would be awesome.

This is probably an Alfred limitation and not an issue with this extension, but maybe posting this here can drive a change in Alfred...

Completions from OpenRouter Won't Stream

Frequently Asked Questions

Workflow version

2024.11

Alfred version

5.5

macOS version

14.5

Debugger output

[18:09:25.644] ChatGPT / DALL-E[Keyword] Processing complete
[18:09:25.661] ChatGPT / DALL-E[Keyword] Passing output '' to Arg and Vars
[18:09:25.664] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:09:25.666] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Run Script
[18:09:25.724] ChatGPT / DALL-E[Run Script] Processing complete
[18:09:25.736] ChatGPT / DALL-E[Run Script] Passing output '' to Arg and Vars
[18:09:25.739] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:09:25.742] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Call External Trigger
[18:09:25.744] ChatGPT / DALL-E[External] Processing complete
[18:09:25.747] ChatGPT / DALL-E[External] Passing output '' to Arg and Vars
[18:09:25.749] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:09:25.750] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Conditional
[18:09:25.751] ChatGPT / DALL-E[Conditional] Processing complete
[18:09:25.761] ChatGPT / DALL-E[Conditional] Passing output '' to Run Script
[18:09:25.863] ChatGPT / DALL-E[Run Script] Processing complete
[18:09:25.872] ChatGPT / DALL-E[Run Script] Passing output '' to Arg and Vars
[18:09:25.875] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:09:25.876] ChatGPT / DALL-E[Arg and Vars] Passing output '/Users/name/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai
/Users/name/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai' to Split Arg
[18:09:25.878] ChatGPT / DALL-E[Split Arg] Processing complete
[18:09:25.880] ChatGPT / DALL-E[Split Arg] Passing output '(
    "/Users/name/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/name/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Automation Task
[18:09:25.882] ChatGPT / DALL-E[Automation Task] Running task 'New Folder' with arguments (
    "/Users/name/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/name/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)
[18:09:25.966] ChatGPT / DALL-E[Automation Task] Processing complete
[18:09:25.978] ChatGPT / DALL-E[Automation Task] Passing output '(
    "/Users/name/Library/Application Support/Alfred/Workflow Data/com.alfredapp.vitor.openai",
    "/Users/name/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.alfredapp.vitor.openai"
)' to Arg and Vars
[18:09:25.979] ChatGPT / DALL-E[Arg and Vars] Processing complete
[18:09:25.980] ChatGPT / DALL-E[Arg and Vars] Passing output '' to Text View
[18:09:25.997] ChatGPT / DALL-E[Text View] Running with argument ''
[18:09:26.123] ChatGPT / DALL-E[Text View] Script with argv '' finished
[18:09:26.131] ChatGPT / DALL-E[Text View] {"response":"","behaviour":{"scroll":"end"}}
[18:09:29.653] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:29.798] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:29.807] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### Hello\n\n"}
[18:09:29.905] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:30.039] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:30.048] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[18:09:30.145] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:30.287] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:30.298] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:30.391] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:30.462] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:30.472] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:30.566] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:30.691] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:30.701] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:30.796] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:30.933] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:30.942] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:31.036] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:31.112] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:31.122] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:31.216] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:31.344] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:31.353] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:31.447] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:31.588] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:31.598] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:31.691] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:31.828] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:31.837] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:31.933] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:32.070] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:32.080] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:32.174] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:32.311] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:32.321] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:32.416] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:32.490] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:32.500] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:32.592] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:32.712] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:32.722] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:32.816] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:32.956] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:32.966] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:33.062] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:33.201] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:33.210] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:33.307] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:33.446] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:33.455] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:33.549] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:33.625] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:33.634] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:33.729] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:33.787] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:33.796] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:33.893] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.011] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.020] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:34.116] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.252] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.262] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:34.357] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.433] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.443] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:34.539] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.600] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.610] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:34.705] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.760] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.769] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:34.866] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:34.924] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:34.934] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.030] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.087] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.097] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.192] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.247] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.256] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.349] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.403] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.412] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.507] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.561] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.570] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.666] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.715] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.725] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:35.819] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:35.933] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:35.942] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:36.038] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:36.176] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:36.185] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:36.281] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:36.423] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:36.432] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"Hello! How can I assist you today?","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:36.528] ChatGPT / DALL-E[Text View] Running with argument 'Hello'
[18:09:36.607] ChatGPT / DALL-E[Text View] Script with argv 'Hello' finished
[18:09:36.616] ChatGPT / DALL-E[Text View] {"response":"Hello! How can I assist you today? [Connection Stalled]","footer":"You can ask ChatGPT to continue the answer","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:48.641] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:48.734] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:48.742] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### Hello\n\nHello! How can I assist you today?\n\n### reply the string 'hi' back to me\n\n"}
[18:09:48.840] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:48.953] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:48.963] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[18:09:49.057] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:49.192] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:49.202] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:49.296] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:49.432] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:49.442] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:49.537] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:49.676] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:49.686] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:49.777] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:49.913] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:49.923] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:50.016] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:50.154] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:50.164] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:50.260] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:50.399] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:50.410] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:09:50.501] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:50.637] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:50.648] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:50.742] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:50.880] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:50.891] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:50.983] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:51.120] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:51.130] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:51.225] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:51.362] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:51.373] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:51.466] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:51.603] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:51.614] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:51.707] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:51.846] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:51.856] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:51.951] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:52.089] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:52.099] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:52.193] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:52.329] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:52.339] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:52.432] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:52.573] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:52.583] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:52.677] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:52.817] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:52.828] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:52.923] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:53.061] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:53.071] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:53.166] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:53.304] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:53.314] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:53.408] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:53.546] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:53.557] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:53.649] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:53.789] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:53.800] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:53.893] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:54.030] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:54.042] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:54.133] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:54.270] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:54.281] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:54.374] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:54.516] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:54.526] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:54.619] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:54.754] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:54.764] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:54.859] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:54.999] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:55.010] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:55.104] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:55.243] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:55.253] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"hi","behaviour":{"response":"replacelast","scroll":"end"}}
[18:09:55.349] ChatGPT / DALL-E[Text View] Running with argument 'reply the string 'hi' back to me'
[18:09:55.490] ChatGPT / DALL-E[Text View] Script with argv 'reply the string 'hi' back to me' finished
[18:09:55.500] ChatGPT / DALL-E[Text View] {"response":"hi [Connection Stalled]","footer":"You can ask ChatGPT to continue the answer","behaviour":{"response":"replacelast","scroll":"end"}}
[18:10:10.262] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:10.410] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:10.420] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true,"stream_marker":true},"response":"### Hello\n\nHello! How can I assist you today?\n\n### reply the string 'hi' back to me\n\nhi\n\n### reply the string hi back to me\n\n"}
[18:10:10.517] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:10.655] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:10.665] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true},"response":"…","behaviour":{"response":"append"}}
[18:10:10.759] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:10.895] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:10.906] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:10:10.999] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:11.136] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:11.147] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:10:11.241] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:11.380] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:11.390] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:10:11.482] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:11.623] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:11.633] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:10:11.726] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:11.861] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:11.872] ChatGPT / DALL-E[Text View] {"rerun":0.1,"variables":{"streaming_now":true}}
[18:10:11.966] ChatGPT / DALL-E[Text View] Running with argument 'reply the string hi back to me'
[18:10:12.108] ChatGPT / DALL-E[Text View] Script with argv 'reply the string hi back to me' finished
[18:10:12.118] ERROR: ChatGPT / DALL-E[Text View] Code 1: /Users/name/Documents/Dropbox - Maestral/Alfred Preferences/Alfred.alfredpreferences/workflows/user.workflow.17ED2632-C76A-4536-8A1A-84E4D3FF7A9D/chatgpt: execution error: Error: TypeError: undefined is not an object (evaluating 'chunks.slice(-1)[0]["choices"]') (-2700)

More details

Thank you for making this workflow compatible with models from outside OpenAI.

But sometimes this workflow won't stream the reply. I typed my prompt and hit return, it continues to show "…" below and only if I hit return again, the reply will show.

Screenshot 2024-06-09 at 6 10 41 PM Screenshot 2024-06-09 at 6 05 41 PM

Even if a reply is streamed, there's a [Connection Stalled] error following it.

I'm guessing the reason being the response from such model uses a different mark for finished streams. Or the stream started and ended too fast to be detected by the workflow. In another word, the reply is too short so the workflow does not know that the stream happened…

ollama

Feature details

make support for local work using ollama

connectionless

Workflow version

Version 2024.5

Alfred version

Alfred 5.5

macOS version

14.4.1 (23E224)

Debugger output

When I use the current workflows the link fails to report an error, probably because of the proxy problem, but I have a local proxy for the openai related domain, what address should I add a proxy for when I use it in alfred?

More details

CleanShot 2024-04-02 at 13 56 02@2x

Locally hosted AI

Feature details

Love this new Alfred workflow, well done on the implementation.

It got me thinking: OpenAI API tokens always come at a cost. Furthermore, you have to be connected to the web. What if we could swap API calls to OpenAI to talk to a locally running AI service instead? Thinking we could use Ollama for this, make native API calls and listen to the input stream: https://github.com/ollama/ollama

Once Ollama is running, which we could start with bash, we can make API calls such as

POST http://127.0.0.1:11434/api/chat
{
"model": "llama2",
"messages": [
{ "role": "user", "content": "what is the difference between chatGPT and llama?" }
],
"stream": true
}

We can most likely re-use a lot of the GPT listen and display code?

Happy to help with the implementation.
Terence

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.