Code Monkey home page Code Monkey logo

sue's People

Contributors

dependabot[bot] avatar jaykm avatar manwholikespie avatar tomboysweat 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sue's Issues

Add ability for Sue to send images

I tried working on this a while back, but didn't get very far. I think the important thing is having a definite file structure. Now that I know about uuid's, it shouldn't be too big of a problem. I definitely want to have things running more async by then, though. It would probably require sending messages directly...

Anyways, I wanted to post this link here as a reminder for myself. Here's the code just incase:

set theAttachment1 to POSIX file /Users/robert/pic.png
tell application "Messages"
    send theAttachment1 to buddy "+1 (xxx) x7 " of service "E:[email protected]"
end tell

Move away from ex_gram fork

I had forgotten I even made that. We now have module-level log levels, so I can breathe a sigh of relief in that regard.

Task.start() doesn't actually prevent blocking Sue's queue.

I naively thought if I just ran process_message() from within a Task that it wouldn't block the processing of other messages. This new gpt command has shown that this isn't the case. Sometimes Sue can get blocked for up to 10 seconds, which is no bueno.

Add image effects

FaceApp machine broke a while ago (still is, right? maybe I'll check again) so I figure it's time to do our own fun image stuff. This comes in three phases, methinks.

  1. Pre-defined filters chainable by separate messages. Imagemagick fun stuff, maybe some fun custom things of our own. We should be able to load up computational photography labs next semester. Called with, let's say, !i b&w <image>. Then Sue sends a response. Now, if a user does not supply an image, we should be able to instead feed in the last image the user (or their friend) sent, ooorrrr... here's the chain able part: the last image Sue sent. So, after Sue has sent back a black and white image, we can then do like !i meme bottomtext to add a text caption or something to it.
  2. Implement user data structures, including matrices, that can then be fed like !i %Identity <image> (just got this great idea: what if we let !wolf spit out matrices... bruh.)
    • reqs: start saving these as typed items in our DB (more on this later). If we do the !wolf thing, we'll need to examine function chaining... Hmm maybe save this part for 3?
  3. Inline-chainable, meaning we can perform multiple operations on the image before sending it. So, something like !i [meme bottomtext]*[b&w]. For starters, we'd probably just pass the resulting image matrix between the two functions instead of matmul, as we don't want to worry about resolving non-matrix operations (bottomtext) before reducing.
    • reqs: Because of the need for parentheses/brackets to group functions with parameters, there's a small chance we might actually need to start writing a parser for Sue, lol.

Clean up platform-specific code

Ideally we have iMessage and Telegram each implementations a Mailbox protocol with only a handful of necessary functions that they need to implement to be useful with Sue (cast to Message (populated with attachments), receive message, send message). I don't like how the tg and imsg stuff is spilling over into the Message and Attachment module definitions.

Add Telegram support

+Potentially remove Signal support (or at least set it aside for deprecation)

Clean up the AppleScript stuff

The documentation for the AppleScript stuffs ain't pretty. The test one can also probably be removed. Maybe rename the *direct.applescript files to be more descriptive to their function.

Sigh. Get some sleep, too. The sun is beginning to rise.

Add !8ball

Too many things to do for me to work on this right now, but I just wanted to add the idea.

Here are the responses:

responses = [
	"As I see it, yes",
	"It is certain",
	"It is decidedly so",
	"Most likely",
	"Outlook good",
	"Signs point to yes",
	"Without a doubt",
	"Yes",
	"Yes - definitely",
	"You may rely on it",
        "Reply hazy, try again",
	"Ask again later",
	"Better not tell you now",
	"Cannot predict now",
	"Concentrate and ask again",
	"Don't count on it",
	"My reply is no",
	"My sources say no",
	"Outlook not so good",
	"Very doubtful"
]

User-defined data structures and possibly functions.

I want to create a system that allows users to create (complex? simple?) data structures that can be inputted into different functions.

What I will do is something like this... A user will use the following command to create a data structure:

!save lunch [antonios, potbelly, indian]

I will parse the textBody to determine what kind of data structure it is. I'm probably going to keep it to strings and lists for the time being.

Anyways, when sue detects that she is being asked to execute a command, she will scan the inputted textBody for words that begin with #. She will then query her database for the existence of these words, and replace their <#word> occurrences with <value>.

As an example, !choose #lunch would be interpreted as !choose antonios, potbelly, indian according to the !save statement we used earlier. Note: this brings up another discussion as to whether we should be using commas to specify lists (as for !choose) or newlines (as for !poll). Maybe someone out there has come up with a good solution for this.

Another idea that comes up when discussing this is possibly adding user-defined functions (they'd have to be elementary for now, though). Function declarations would have precendence over definitions, though we would need to delete its counterpart (to overwrite) each time it is redefined/redeclared.

I'm thinking something like this:

!save lunchPlaces [antonios, potbelly, indian]
!lambda lunch !choose #lunchPlaces

It could get pretty complex fairly quickly though. Definitely lots of planning needed.

Bugged Telegram polls

/poll a b does not work. I'm guessing it's a problem with ExGram.send_poll or whatever I use

Ponder Mongo -> Postgres

Not a fan of Mongo's new license. Might be worth moving to Postgres, considering we're already entertaining the idea of Elixir. Look into it.

Think about account perms

I've been adding these is_premium and is_admin fields to the Account struct. I foresee eventually adding other perms like Plex access, maybe Home Assistant, etc. Maybe that should be a tag sort of thing instead.

GPT streaming

It'd be nice if we could use the stream api for GPT for at least Telegram and Discord responses. Doing this would probably require some sort of queue such that we don't go over Discord or Telegram's API limits.

Might be worth just starting with Discord for now, as I may end up replacing all the Telegram stuff later anyway.

imessage body sometimes nil

Some new message case I haven't seen before. Check the info logs later I guess.

Last message: :get_updates
04:51:40.684 [error] GenServer Sue.Mailbox.IMessage terminating
** (FunctionClauseError) no function clause matching in Sue.Models.Message.better_trim_leading/1
    (sue 0.2.3) lib/sue/models/message.ex:323: Sue.Models.Message.better_trim_leading(nil)
    (sue 0.2.3) lib/sue/models/message.ex:350: Sue.Models.Message.has_command?/2
    (sue 0.2.3) lib/sue/models/message.ex:301: Sue.Models.Message.command_args_from_body/2
    (sue 0.2.3) lib/sue/models/message.ex:93: Sue.Models.Message.from_imessage/1
    (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (sue 0.2.3) lib/sue/mailbox/i_message.ex:116: Sue.Mailbox.IMessage.process_messages/1
    (sue 0.2.3) lib/sue/mailbox/i_message.ex:27: Sue.Mailbox.IMessage.handle_info/2
    (stdlib 4.2) gen_server.erl:1123: :gen_server.try_dispatch/4
Last message: :get_updates

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.