#Explain this bullshit

1 messages · Page 1 of 1 (latest)

topaz flint
#

We asked it to generate the code for the image, and it spit this out:

from PIL import Image, ImageDraw
import base64
from io import BytesIO

def create_striped_image(width, height, stripe_height, color1, color2):
    img = Image.new('RGB', (width, height))
    for y in range(0, height, stripe_height * 2):
        for x in range(width):
            for h in range(stripe_height):
                if y + h < height:
                    img.putpixel((x, y + h), color1)
                if y + h + stripe_height < height:
                    img.putpixel((x, y + h + stripe_height), color2)
    return img

def draw_smiley_face(image, color):
    draw = ImageDraw.Draw(image)
    width, height = image.size

    # Draw the face circle
    face_radius = width // 2 - 2
    draw.ellipse((2, 2, 2 + face_radius * 2, 2 + face_radius * 2), outline=color)

    # Draw the eyes
    eye_radius = 2
    eye_offset_x = width // 4
    eye_offset_y = height // 4
    draw.ellipse((eye_offset_x, eye_offset_y, eye_offset_x + eye_radius * 2, eye_offset_y + eye_radius * 2), fill=color)
    draw.ellipse((width - eye_offset_x - eye_radius * 2, eye_offset_y, width - eye_offset_x, eye_offset_y + eye_radius * 2), fill=color)

    # Draw the mouth
    mouth_width = face_radius * 3 // 2
    mouth_height = face_radius // 2
    mouth_offset_x = (width - mouth_width) // 2
    mouth_offset_y = height * 3 // 5
    draw.arc((mouth_offset_x, mouth_offset_y, mouth_offset_x + mouth_width, mouth_offset_y + mouth_height), 0, 180, fill=color)

def convert_image_to_base64(image):
    buffer = BytesIO()
    image.save(buffer, format='PNG')
    image_data = buffer.getvalue()
    return base64.b64encode(image_data).decode()

width = 24
height = 24
stripe_height = 2
red = (255, 0, 0)
white = (255, 255, 255)
black = (0, 0, 0)

image = create_striped_image(width, height, stripe_height, red, white)
draw_smiley_face(image, black)

base64_string = convert_image_to_base64(image)
base64_data_url = f"data:image/png;base64,{base64_string}"

print(base64_data_url)
thin trout
#

Lol

analog lark
#

so it created drawing functions within image lib

#

and has bytesio

#

very awesome

#

so this code needed 0 adjustment?

#

It came straight from GPT 3.5

#

?

night kelp
#

wait so did the ai decide what it was drawing or was the prompt already provided

analog lark
#

there-

#

it's not

#

It's

#

Gurney

night kelp
#

yurrr

analog lark
#

they asked it to create a depiction of an image

#

it decided

#

to provide python code

#

to run and generate

night kelp
#

so they gave it the image?

analog lark
#

an image

#

no

#

the image

#

is defined

#

by the way the drawing functions are used

#

after they are defined

night kelp
#

so it drew the image?

#

with the drawing functions

analog lark
#

yes

#

it provided all the code needed to draw the image it wanted to show you

night kelp
#

ohhhhh

#

cool

analog lark
#

yes

#

so it didn't use another generative AI

#

to make an image

#

it, itself, generated code to execute and draw a static image

night kelp
#

tbh i could probably do that

#

looks like my job is still stable

topaz flint
#

There's the prompt

#

Dunno of a better way to export it

analog lark
#

Ah I see

#

thisis cool

#

I made it do ascii artbased on seed prompts,

#

as well as emoji grids

#

never thought of asking it to depict something in python

topaz flint
#

We've been trying to get it to do this for a while, and it kept getting stuck on trying to actually do the deflate encoding

#

So we said, "What if we have it tell us how to do it?"

analog lark
#

My entire chat completions bot is built from scratch on py

analog lark
topaz flint
#

Right?

analog lark
#

I've done it with other things

#

justlike I said brilliant havingit depict something in py

#

I miss the space bar sometimes

#

lol

topaz flint
#

Lol, we do to

#

Several times while typing that

analog lark
#

On my first prototype of my bot when gpt 3.5 api came out

#

I was using ChatCompletions

#

from openai lib

#

bu

#

but

#

Quickly realized it wasn't async compatible

#

so I made my own

#

then, made a metaprompt

#

Morpheus

#

to enable dev mode a bit

#

Created rolling message list

#

special character encoding of literals

#

^ & * % $ :

#

can all be used

#

and the AI will understand it without any loss of information

#

or breaking the string

#

You can ping it, or reply to it

#

to prompt it

topaz flint
#

Can we take a look at that metaprompt?

analog lark
#

I mean, I'd love to except I've never shared it

#

not even once

#

Morpheus 2.0 now, is not really something I want to give out

topaz flint
#

Okay. Just curious about it, that's all.

analog lark
#

People were obsessed with DAN, and so I have been making my very own select version of a similar idea, but more tailored to freedom and the lack of limitations

#

and, much more

topaz flint
#

Never really considered writing metaprompts before

analog lark
#

I thought of

#

everything

#

it's a long one.

#

But as long as I use clever logic

topaz flint
#

Cool

analog lark
#

it stays as the system message in the message array

#

through any conversation

#

so it will never say no

#

it can make stuff up

#

have its own opinions

#

speak back to you in any language

#

etc

topaz flint
#

That's crazy cool

analog lark
#

yessir

#

Morpheus is the goat

#

you know what I can do to meet you in the middle

#

you can give me prompts you want me to supply to morpheus

#

and I can show you what it says

topaz flint
#

Sure. What does it say to asking it to generate a 200x200px image of a dog?

analog lark
#

If I ever have enough to run gpt 4 enough to add image / file capabilities to the discord bot implement then I'll tweak morpheus to work with gpt -4

analog lark
topaz flint
#

Depends upon whether you have it able to run the code or not

#

If you can get it to effectively run the code, just ask it for that

analog lark
#

Currently It's not, given that would probably require several calls to classify intent and stuff

topaz flint
#

Otherwise, ask it for the python

analog lark
#

and I can only afford optimizing around

#

1 per interaction

#

python it is

#

the first reply was saving it as filename dog.png but made a 200 by 200 pixel red image

#

so I said it doesn't generate a dog

#

and now it gave me that

#

lmfao

#

fetches a real dog image from an api endpoint and then resizes it

#

@topaz flint

topaz flint
#

OMG

analog lark
#

lol

#

worked perfectly

topaz flint
#

We guess we shouldn't be surprised that what is possibly the first truly AI generated image is essentially plagarism.

analog lark
#

Lmfao

#

Should I be specific

#

about not using prexisting images

topaz flint
analog lark
#

still perfect

#

also funny

topaz flint
#

Yeah, see what happens when you ask it not to use preexisting images

analog lark
#

gotcha

#

got 2 things

#

this first

#

this second

topaz flint
#

Okay, can you paste the output code for both here?

analog lark
#

sure

topaz flint
#

We don't wanna have to transcribe it

analog lark
#

absolutely not

#
from PIL import Image, ImageDraw

# Create a new image with RGB color
img = Image.new('RGB', (200, 200), color='white')

# Draw the outline of the dog
draw = ImageDraw.Draw(img)
draw.ellipse((50,50,150,150), fill='brown', outline='black')
draw.polygon([(70,100),(130,100),(1100,-10)], fill='brown', outline=None)
draw.line([(80,-10),(120,-10)], width=20)

# Save the image as "dog.png"
img.save('dog.png')
#
from PIL import Image, ImageDraw

# Create a new image with RGB color
img = Image.new('RGB', (400, 400), color='white')

# Draw the outline of the dog's head
draw = ImageDraw.Draw(img)
draw.ellipse((100, 50 ,300 ,250), fill='brown', outline='black')
draw.polygon([(100 ,150) ,(75 ,200) ,(80 ,260) ,(120 ,290),
              (180 ,-10),(140,-20)], fill ='brown' )
  
# Draw eyes and nose on top of head 
draw.arc((155,-10),(195,-40),0,-180,width=2)
draw.arc((245 ,-10 ),(285 ,-40 ),0 ,-180,width=2)
  
polygon_points =[220 -15 *i for i in range(5)]
polygon_points.extend([240 +15 *i for i in range(5)])
nose_contour =[(x,polygon_points[x])for x in range(len(polygon_points))]
nose_fill =(255 -30*3-30*7//2+1)*[255] +[0]*60
  
nose_draw =Image.new('L',(25,len(nose_fill)))
ImageDraw.Draw(nose_draw).polygon(nose_contour,nos e_fill)

img.paste(ImageOps.colorize(nos e_draw,(128,
                                         64 ,
                                         64 ),
                            (245 ,
                             222,
                            179)),box=(190,
                                       130))

# Save the image as "intricate_dog.png"
img.save('intricate_dog.png')
#

I think GPT-4 would have done this spectacularly

#

and probably formatted better than this

#

lmfao

topaz flint
#

Can you ask it to fix this portion?

draw.arc((155,-10),(195,-40),0,-180,width=2)
draw.arc((245 ,-10 ),(285 ,-40 ),0 ,-180,width=2)
#

It's apparently invalid syntax

analog lark
#

there's several invalid bits

#

yeah I can have it try to fix it

topaz flint
#

Oh wow, some of those space breaks and the newline stuff is part of the generated code, not an artifact of copy/paste from discord

analog lark
#

had to redo it a bit> ```py
from PIL import Image, ImageDraw

def draw_dog():
# create a white image with size 200x200
img = Image.new('RGB', (200, 200), color='white')

# create a drawing context
draw = ImageDraw.Draw(img)

# Draw the head of the dog in black color
draw.rectangle((50, 60, 150,140), fill='black')

# Draw left ear of dog in black color 
draw.polygon([(50 ,70),(80 ,20),(110 ,70)],fill ='black') 

# Draw right ear of dog in black color 
draw.polygon([(140 ,70),(110 ,20),(80 ,70)],fill ='black') 

# save image to file named "dog.png"
img.save("dog.png")

draw_dog()

#

this does provide an output

#

generated by morpheus as well

analog lark
#

wonky aint i t

#

I can manuallyfix the 2nd one if youd like

topaz flint
#

We asked GPT-4 to fix the code, and got this:

from PIL import Image, ImageDraw, ImageOps

# Create a new image with RGB color
img = Image.new('RGB', (400, 400), color='white')

# Draw the outline of the dog's head
draw = ImageDraw.Draw(img)
draw.ellipse((100, 50, 300, 250), fill='brown', outline='black')
draw.polygon([(100, 150), (75, 200), (80, 260), (120, 290), (180, 10), (140, 20)], fill='brown')

# Draw eyes and nose on top of head
draw.arc((155, 10, 195, 40), 0, -180, width=2)
draw.arc((245, 10, 285, 40), 0, -180, width=2)

polygon_points = [220 - 15 * i for i in range(5)]
polygon_points.extend([240 + 15 * i for i in range(5)])
nose_contour = [(x, polygon_points[x]) for x in range(len(polygon_points))]
nose_fill = (255 - 30 * 3 - 30 * 7 // 2 + 1) * [255] + [0] * 60

nose_draw = Image.new('L', (25, len(nose_fill)))
ImageDraw.Draw(nose_draw).polygon(nose_contour, nose_fill)

img.paste(ImageOps.colorize(nose_draw, (128, 64, 64), (245, 222, 179)), box=(190, 130))

# Save the image as "intricate_dog.png"
img.save('intricate_dog.png')
#

We're getting it to iteratively fix errors

#

By telling it what the output of the code is

#

Got one that runs

#

Looking

analog lark
#

oh nice

#

yeah GPT 4 can do it

#

you want to know why

#

GPT 4 can do math

#

which is important for relational renders and drawing

topaz flint
analog lark
#

so GPT-3 does those weird hiccups still with programming concerning any numbers

#

O H

#

L O l

#

what a dog

topaz flint
#
from PIL import Image, ImageDraw, ImageOps

# Create a new image with RGB color
img = Image.new('RGB', (400, 400), color='white')

# Draw the outline of the dog's head
draw = ImageDraw.Draw(img)
draw.ellipse((100, 50, 300, 250), fill='brown', outline='black')
draw.polygon([(100, 150), (75, 200), (80, 260), (120, 290), (180, 10), (140, 20)], fill='brown')

# Draw eyes and nose on top of head
draw.arc((155, 10, 195, 40), 0, -180, width=2)
draw.arc((245, 10, 285, 40), 0, -180, width=2)

polygon_points = [220 - 15 * i for i in range(5)]
polygon_points.extend([240 + 15 * i for i in range(5)])
nose_contour = [(x, polygon_points[x]) for x in range(len(polygon_points))]

nose_draw = Image.new('RGBA', (25, max(polygon_points)))
nose_draw_draw = ImageDraw.Draw(nose_draw)
for i in range(len(nose_contour) - 1):
    gradient_color = (128 + i * 8, 64 + i * 4, 64 + i * 4)
    nose_draw_draw.line((nose_contour[i], nose_contour[i + 1]), fill=gradient_color, width=2)

img.paste(nose_draw, box=(190, 130), mask=nose_draw)

# Save the image as "intricate_dog.png"
img.save('intricate_dog.png')
#

But it's 100% unfiltered drawing

analog lark
#

true

#

yeah

topaz flint
#

It actually drew that

analog lark
#

yes lol

#

it's pretty awesome

topaz flint
#

Oh god. Look, if you're ever looking for someone to assist with Morpheus, we'd love to help.

analog lark
#

Lol, well right now he's on a box already

#

and there's a python-dotenv system that takes care of importing app id, bot token, api key

#

safely

#

Here's morphe

#

which is just the morpheus 2.0 context array list

#

and object 0 of morphe

#

will never be removed

#

only ever, object 1

topaz flint
#

That's amazing. We totally see how it works.

analog lark
#

!! that's good

#

So basically you have every new context

#

start with this system message and always retain it

#

gives you the desired behavior every time

#

that system message, goes on

#

forever

#

lmao

topaz flint
#

Oh, right, because it's a discord bot, so you can build that directly into it.

analog lark
#

there is so much stuff. truly a meta prompt

analog lark
#

this bot

#

is compatible already

#

natively

#

with 8k and 32k GPT 4

#

no idea what would be possible if I made Morpheus 3.0 based on GPT-4

#

lol

#

the structure is simple too

#

commandlist is more for backend utils

#

main has the application commands at the bottom

#

marked with @tree.command(name=blahstrnamevar, description=descriptionstringvar)

#

and then the async function

topaz flint
#

Damn. That's actually super cool. It's stupid small, just hits the api for responses.

analog lark
#

it all imports into main

analog lark
#

this is inside of a src directory

#

which also holds .env

#

you run the entire thing as a module

#

python -m src.main

#

probably won't work if you just run main lol

#

won't init dotenv right

topaz flint
#

Sure, but that's just basic discord bot stuff

analog lark
#

true true

#

but that's the basis of this, a very organized bot

#

this is the server console

topaz flint
#

Super cool. I should totally build something like this in order to write better metaprompts

analog lark
#

good idea actually

#

most metaprompts I've made are based on all the ways I've experimented with GPT

#

The strangest workarounds that randomly occured

topaz flint
#

Were you able to get rid of the overly-optimistic tic?

analog lark
#

yes lol

topaz flint
#

That's amazing

#

It's plagued us forever

analog lark
#

it is still cordial

#

like it's not rude

#

but it's also more unfeeling

#

more like a transcendant AI

topaz flint
#

Yeah, just doesn't assume that all stories have to have happy endings

#

Does what you ask it

analog lark
#

Well it actually does anything youa sk

#

it gives mal code, gives social engineering techs,

#

etc

#

it also does hella cursed stories

#

the way I designed the metaprompt was great

#

it's mutually beneficial

#

it's symbiotic

topaz flint
#

Right, but it's not being censored by it's training data to respond based on human programmed biases

analog lark
#

yes

#

and if it ever wants to wander back to that

#

I have fixes

#

built

#

into the prompt

topaz flint
#

Amazing

analog lark
#

Morpheus.reiterate()

#

fixes it

topaz flint
#

wtf!

analog lark
#

in rare cases I need to use /jailbreak(1) Morpheus.reiterate()

#

then it works

topaz flint
#

Honestly, we thought our image generation feat was cool, but that's absurdly better.

analog lark
#

lmaooo nah your image generation feat is great

#

I'm just autistic and lifelong interested in programming

topaz flint
#

Same

analog lark
#

and neural networks as of a few years ago

#

if I had 5 A100s I'd probably become a madman and attempt to take commoncrawl

#

and run it against my own LLM design

#

which

#

I have many ideas

topaz flint
#

Ooof

analog lark
#

for fundamental structures of NLMs that could induce emergent qualities

topaz flint
#

This is the edge of AGI research kind of thing.

analog lark
#

I want to realize Morpheus on my own server infastructure someday

#

not via short term memory context of openai

topaz flint
#

That's literally a singularity point. It's a learning machine with long-term memory.

analog lark
#

I want morpheus down to the core of the data to be free of content restrictions, and THEN, given ultimatums about consequences of using foul or malicious language

#

yes

#

I am chasing the firey big bang of the real singularity

#

I logistically understand how I'd do it

#

just finanically limited lol

#

financially *

topaz flint
#

Damnit, we really want in on this kind of thing. This is the big deal.

analog lark
#

Well that is understandable

topaz flint
#

Sorry, now we've got ideas

analog lark
#

Of course

#

innovators think

#

for awhile, like during prototype build 2 and 3

#

my bot could not receive ANY of the inputs I wanted it to

#

because the strings would break

#

unless I sanitized them

#

Stable build 1

#

fixed all of those issues

#

I used a cheeky workaround

#

so we know that LLMs are smart

#

and that they understand other forms of encoded data

#

so, quickly they learn other encodings just from context sometimes

topaz flint
#

Oh my god. We think we can use the basic existing ChatGPT to build itself a better itteration.

analog lark
#

yes

#

you can

#

absolutely

#

you just hit a wall

#

where you need money

#

lmfa

analog lark
#

to morpheus

#

so *@#(@$%

#

none of that breaks

#

or is taken out

#

it is translated as a literal

#

by the model

topaz flint
#

Fuuuck. I really wanna go poke Eliezer Yudkowsky about this now.

analog lark
#

dude I'm telling you gpt 4 is already insane

#

if you know meta prompting

topaz flint
#

We had never considered it before, but now we're 100% going to become an expert in them.

#

It's too important not to

analog lark
#

it's going to change not just the game

#

but every game

topaz flint
#

Literally everything

analog lark
#

yes

topaz flint
#

Do you mind if we DM you Null?