chrislemke Posted February 15 Share Posted February 15 (edited) Alfred-workflow using OpenAI's GPT model for chatting, text completion, etc. I'm the author of this workflow (Chris Lemke). Feel free to check out the GitHub repository. I am looking forward to getting your feedback! Many thanks for considering my request. Edited February 20 by chrislemke Link to comment Share on other sites More sharing options...
vitor Posted February 15 Share Posted February 15 Welcome @chrislemke, The OpenAI Model configuration is a set of fixed options so it should be a Popup Selection rather than a Text Field. Also, avoid with input as {query} in favour of with input as argv (there is a reason it’s the default) as it removes the need for escaping. Also, variables in shell languages should be quoted to avoid issues: var="${1}" var="${var//\?/|Q|}" var="${var//\!/|E|}" var="${var//\./|S|}" python3 src/main.py "${var}" Link to comment Share on other sites More sharing options...
chrislemke Posted February 15 Author Share Posted February 15 Hey @vitor! Thanks for the fast response. I will implement your proposals. Thanks a lot! Link to comment Share on other sites More sharing options...
chrislemke Posted February 15 Author Share Posted February 15 (edited) Hi @vitor, I made all the requested changes and created a new version. Would be great if you can check it again. Thanks in advance! Edited February 16 by chrislemke Link to comment Share on other sites More sharing options...
vitor Posted February 17 Share Posted February 17 (edited) Unfortunately, there are a number of unsigned binary files in the dependencies. E.g. src/libs/charset_normalizer/md.cpython-310-darwin.so. macOS will stop those from running and throw a number of warnings. Are there alternative libraries you could use, or a way to use those without the need for the binaries? Edited February 17 by vitor Link to comment Share on other sites More sharing options...
chrislemke Posted February 17 Author Share Posted February 17 (edited) Hey! I was able to remove those files. Here you can find the new version. Edited February 17 by chrislemke Link to comment Share on other sites More sharing options...
vitor Posted February 17 Share Posted February 17 (edited) Nice! We’re nearly there, the one thing I see remaining is that the File directory configuration should be a File Picker instead of a Text Field. That will allow uses to choose a folder with a GUI. You can set ~ as the default and Alfred will know what that means. You don’t even have to convert it in your code, as Alfred will pass along the correct home path. Are you sure you still want to call this ChatFred now that it also does images? Your call, just making sure you noticed. Edited February 17 by vitor Link to comment Share on other sites More sharing options...
chrislemke Posted February 17 Author Share Posted February 17 (edited) Hey! Just changed it to the file picker. Thanks for the hint. I actually thought about renaming it too. But since it is still somehow like talking to a machine I will leave this name - also because I kind of like it 😉 Here is the link to the new version and to the changes. Thanks for your help! Edited February 20 by chrislemke Link to comment Share on other sites More sharing options...
xilopaint Posted February 20 Share Posted February 20 @chrislemkeIs this true? Why do you mention the $18 credit then? Link to comment Share on other sites More sharing options...
chrislemke Posted February 20 Author Share Posted February 20 (edited) Unfortunately, this is incorrect in two ways. First, OpenAI's APIs are not for free, and second, OpenAI does not yet offer a ChatGPT API - at least as far as I know. Also, ChatGPT research release seems to provide wrong information on this as well: Edited February 20 by chrislemke Link to comment Share on other sites More sharing options...
vitor Posted February 20 Share Posted February 20 Regarding the above, it is crucial to note that GPT and similar systems are very good at confidently providing wrong information. They imitate language, they do not understand what the words mean or their connections to facts. GPT answers are straight banned from StackOverflow sites. It is awkward that they can’t even get information about themselves right, but that is far from the only situation. Do not blindly trust the answers, always verify. Link to comment Share on other sites More sharing options...
chrislemke Posted February 20 Author Share Posted February 20 True. At the end it’s just statistics. Those systems are probably ignorant about themselves since they were never trained on information about themself. Link to comment Share on other sites More sharing options...
vitor Posted February 20 Share Posted February 20 This is close to being added. Only thing missing is a version of the icon in 256x256 px. That can either be included in the workflow or you can share it here. Also, this is minor but in the subtitle of the chat command you inform that options are available with ⇧⌃⌘ but do not mention ⌥, despite it being valid too. Keep in mind that for GitHub releases, after the initial release Gallery updates will be made for stable releases. Meaning future pre-releases won’t be taken into account. chrislemke 1 Link to comment Share on other sites More sharing options...
chrislemke Posted February 20 Author Share Posted February 20 Great! I added the icon to the workflow/assets folder and the first post of this thread. I also adjusted the subtitle and created new screenshots accordingly. Here you can find the latest version. Thanks for the hint concerning the versioning. I will have that in mind. Really looking forward to seeing this workflow in the gallery! Link to comment Share on other sites More sharing options...
vitor Posted February 20 Share Posted February 20 Will be live soon at http://alfred.app/workflows/chrislemke/chatfred/. chrislemke 1 Link to comment Share on other sites More sharing options...
chrislemke Posted February 20 Author Share Posted February 20 Wonderfull! Thanks for all your help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now