Jump to content

ChatFred


chrislemke

Recommended Posts

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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

chatfred_256.png

screenshot1.png

screenshot2.png

screenshot3.png

 

screenshot5.png

Edited by chrislemke
Link to comment
Share on other sites

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

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 by vitor
Link to comment
Share on other sites

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 by vitor
Link to comment
Share on other sites

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 by chrislemke
Link to comment
Share on other sites

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:

 

chatgpt.png

Edited by chrislemke
Link to comment
Share on other sites

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

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.

Link to comment
Share on other sites

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

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...