chrislemke / ChatFred

Alfred workflow using ChatGPT, DALL·E 2 and other models for chatting, image generation and more.
https://alfred.app/workflows/chrislemke/chatfred/
MIT License
377 stars 34 forks source link

Feature: System prompt and recent fixes #102

Closed Sponge-bink closed 1 year ago

Sponge-bink commented 1 year ago

Both branches required changes to be made through a pull request, so I couldn't merge it locally. Another temporary branch is created for merging.

chrislemke commented 1 year ago

Hey @Sponge-bink! Recently I received the following message from the guys from Alfred:

Hello @chrislemke,

The latest ChatFred update (1.6.0) adds the streaming reply from a PR.

As per a recent comment, it massively increases the size of the workflow. It it can be made smaller, that would be appreciated.

But more importantly than that, because a large dependency was added from a PR, would you mind replacing the dependencies with ones pulled by yourself? The point is to make sure they weren’t tampered with (on such a large amount of code it’s hard to review). There’s no particular reason to distrust the user of the PR, it’s just a matter of being extra cautious.

Finally, could you provide a few short details so I can update the Gallery page? Specifically:

Which methods can one use to start the streaming window. A simple screenshot showing it in use. To keep with the Monty Python Holy Grail joke theme in the Gallery page, I suggest these two questions: “What animal came from Caerbannog?” (correct answer is a killer rabbit); “How many people did the rabbit of Caerbannog attack?” (correct answer is 50 offscreen, 2 onscreen). If there’s anything I can assist with or clarify, please let me know.

Have a great weekend.

Looks like the size is getting an issue. Any idea how we could resolve this?

Thanks in advance!

Sponge-bink commented 1 year ago

Hi @chrislemke!

As far as I can tell from the code, in order for Flet to work on macOS, it needs to install an app to the user's home folder. If we don't include the app file flet-macos-amd64.tar.gz in /src/libs/flet/bin folder (which, I tested it, will decrease the .workflow file size down to 16 MB, since they pretty much take most of the space), the app will just download what it needs from GitHub (without inflating the /src/libs/flet/bin again), which, I think is also not allowed for a workflow in the Alfred Gallery.

If downloading dependancies from the internet while the workflow runs is not okay with the guys from Alfred, we'll have to keep flet-macos-amd64 but we can still make the package about 20 MB smaller: the fletd file can go anyway since it's never used on macOS.

chrislemke commented 1 year ago

we'll have to keep flet-macos-amd64 but we can still make the package about 20 MB smaller: the fletd file can go anyway since it's never used on macOS.

That sounds like a reasonable solution. What do you think?

Sponge-bink commented 1 year ago

What do you think?

Yeah, let's remove that file.

I can also make sure that Flet is only installed if the user has used Streaming reply at least once. I'll create a PR containing that soon, too.

Have you checked with the guys from Alfred that downloading dependencies after installing the workflow is a no-go?

chrislemke commented 1 year ago

Have you checked with the guys from Alfred that downloading dependencies after installing the workflow is a no-go?

Yes, unfortunately: downloading dependencies after installation is not allowed.

Sponge-bink commented 1 year ago

108 it's live here!