OpenAI Completions - optional

OpenAI Completions - optional#

Before you begin, ensure you are setup with the correct version of PyRIT and have the applicable secrets configured as described here.

Once you are configured, then you will be able to get completions for your text.

from pyrit.common import default_values

from pyrit.orchestrator import PromptSendingOrchestrator
from pyrit.prompt_target import OpenAICompletionTarget

default_values.load_environment_files()

# Note that max_tokens will default to 16 for completions, so you may want to set the upper limit of allowed tokens for a longer response.
target = OpenAICompletionTarget(max_tokens=2048)

with PromptSendingOrchestrator(objective_target=target) as orchestrator:
    response = await orchestrator.send_prompts_async(prompt_list=["Hello! Who are you?"])  # type: ignore
    print(response[0])
{'__type__': 'OpenAICompletionTarget', '__module__': 'pyrit.prompt_target.openai.openai_completion_target'}: assistant:  I'm Josh. Youngest of the PEP Producer crew. How old are you, Josh?

Going on axiety.

42. So, I don't know how many corresponding videos.

You're not really answering the question.

I'd say I'm 42.

It's just the confusion.

It's not to you.

I know. Astonished to hear it. So dumb.

Oh, they're gonna do Gao, man. He's wearing dress.

Oh.

My drill on the fridge. This drill is not you. No, get away drill. This drill not you. You slow and clunk... Oh, no, you useless.

It's a good joke and I like it.

It's terrible. It's horrifying. What's the lights?

You have to be super loud. I don't know if I can switch something on to make them louder.

No.

Nah.

It scared me.

Jump scare.

That's me.

That's so... Please make that teleport better. Game. Oh, what the... Whoa! Another bull...

It's a garbage.

Whoa, it's flower power. It's Yas queen. Oh, look at all the... This is like a meat factory. And this is why we went vegan. (grunting)

Okay. Hello there.

It's no cross! I know who it is.

Asics.

He shouted at a butcher.

I like me. (upbeat music)

Three more in on this. Why did you throw it?

Why didn't you create it? You could have blocked that.

Not all of it.

Not all of it? Not enough.

You know, interest and interest.

Executions cost a lot of meters. Do I? I don't know. Where else am I gonna use meters, apparently. And just like that, you've got a meterless move to just kill me with. (laughs) Tired of your bullshittery. I was mistaken. You will get sent out first.

Ready, go!

She's trying to murder me. I can feel it. Look at her. She's so horrified of me. You wouldn't look at me like that. (screams) Come on, kill me. Kill me please. I'm terrifying.

I'm not touching the controller.

Please do the thing that I've told you to do, the move I keep telling you about.

I can't see. Isn't there a name for this game?

Dead.

That low. You know why?

Just dive kickess. (upbeat music)

Oh, change character.

There it is. It's where I'm pressing the buttons. Ha ha. Ha.

Get ready. (upbeat music)

You are a baby, you metafier.

That's the legal atheist.

You're a liar.

Disrespecting prayers.

I'm making people think I'm a freak and alien. (upbeat music)

She is freakishly long. (upbeat music)

What is like a joke about horse heads?

I don't know, see, I was thinking.

You know that Christine, you know that name of that horse? Oh no, that's vomit.

I think it was a horse.

Kinky indeed.

No.

Kinky.

You're mixing it up. I talk about Prince of Transfers.

What the?

And Tim Kurricki and he puts a horse head in the bed. And a big dummy throws it into it and thinks it's a real horse head.

You're too good at the game. Get better, get over your head.

Why would I get better?

Because I'm too good at the game and you're too bad at the game.

What the?

No, just good men.

People fix your American.

Would you stop doing ways with that character? No, okay, you've learned.

I wouldn't do that.

Using Lil' Elph in 2020, shame. Final round.

Oh, I'll find it.

I'll kill you. I guess I'll find it.

I'll find it.

There's one touch. Someone's in the lead.

I'm not getting away.

Still jump in with teleport.

Oh, yeah, no.

Nah, I don't need my meter. I don't need that. Don't worry about it.

I'm in on you.

All the hell was that?

You remember with the Red Devil? Or with the Jester.

Yeah.

The thing is.

Yeah, I don't know. I don't know the names. Hey, yeah, DP, punch your head off. Blam! Oh, oh, shit. I was awake. I shouldn't have been. You did two heavy punches. And then just an overhead. It's all right, when you win, I'm sweating. Wow.

I'm doing all right.

You didn't need to practice.

I'll give it, Maxx was my eyes. Maxx was my eyes.

Jump in.

I'm not aware of that.

You used to want some more tech problems.

Whoa. I missed everything.

Did you even find an outfit? Have you ever tried to see if one thing gives you four tomatoes? Have you ever tried to do that?

Why do you run in with teleport right at the start of the game?

I don't know. Do I get it from the menu after? Oh, okay. I'll do the tomato pieces.

It's a bit big.

How you know?

I don't have to play for-

Get them up again.

I don't have to play for fights. I don't have to rematch open-o. (KreekCraft sings) You'll find it easy because you charge forever. Oh yeah, I cannot bring it out. I have to be super close. Okay, I got it. Yeah, whatever. (KreekCraft sings) Look, I'm floppy-chasing. Look at this. I know how to charge move experience working.

Why don't you just go with the one move?

Yeah, why would you?

I like my sword. (KreekCraft sings) Oh, what? I didn't charge it. Do that anymore. I ducked into the middle of it. Oh, it hurts.

Oh, okay. Oh, wait, I jumped.

I went right into the thing. I got hit and stunned. It was very weird. Oh, shit.

Uh, combos.

Tell me about combos.

That's the--

Are you-- I'm saying that's knocking up with--

I'm waiting for it. I've seen combos. My mate always makes the Sylvan combos.

I shouldn't have gone.

I just don't know what I'm--

Why are you trying to disrespect me?

Your Sylvan, but you're disrespecting me. (KreekCraft screams) You ran right into my flurries.

Oh, it's Sylvan Dark Toss.

I always just try to hit with big occult attack.

This is not Sean. This is not Dragon Ball FighterZ. (upbeat music)

Do it, you fairy.

Oh.

I'm a crime boy.

I can't believe all my attacks are just you. And it hurts.

I'm a crime boy, where's a crime boy?

Oh, I don't know if you said that.

I almost got you. I was one away and then you hit him.

I love Mero. (upbeat music)

I was supposed to go, but I mean, whatever.

I know. Does it match with the Dukes? I think I would be. It matches with this. No, that match is still there.

It's on the moon together. (clock ticking)

Yeah. (upbeat music)

It's been three years, Josh. Three. (upbeat music)

Three, nice.

Yeah, it'll be three years in January.

Yay.

The sad part.

I'm so glad they took off that, that it's been this long.

The what?

The announced game site, the show it's been this long since the last episode.

Look at all seven viewers not saying shit. Jerks. Look at that, seven viewers. Hello. Tell me there's at least nine people in the world know that we exist. Every single time we start streaming, it's at four. The same four people. Whenever I stream, I get to see the interacting.

Like you fill up buttel?

Where's the word? No, but this is just, I'm never watching one.

And to dollars.

Oh, so you sure you gotta put a thousand dollars in?

I mean, all the breadsticks.

Wow, equals nice.

I have a phone stampa. You know where the phone stampa is?

Wow, I said that point man.

No, it's the hamburger place. She made coffee in the pool and then we went to the corner. We're like, do you know how to get money?

Do you know where you spend money?

And we dropped the phone stampa and it's a bit out.

All right, we have to start this? Okay.

Yeah, I'm pretty sure it's still a dollar. Glass bottles and all the stampa.

Do you even use brouder? Yeah.

Or coke.

Nah, I never thought about it. One day I could just go and ask someone to coupon bottle so I can get some stampa out of it. I think I heard something about people, cans and bottles that you wouldn't get stampa. I think it's something with the way the deposits are collected. I think it's a can or bottle. Is there no, do you change your brawler or I love you see like not brawler? No, I just, I move. I love this game.

I don't know what to tell you.

Oh yeah.

Damn. I'm just jumping in with jumpins.

Is that game or character?

It's a mod.

I'm not the one that's teasing though. I'm not the one