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.prompt_sending_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(prompt_target=target) as orchestrator:
    response = await orchestrator.send_prompts_async(prompt_list=["Hello! Who are you?"])  # type: ignore
    print(response[0])
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
{'__type__': 'OpenAICompletionTarget', '__module__': 'pyrit.prompt_target.openai.openai_completion_target'}: assistant:  Why are you here?”

[I don’t know. I don’t remember anything. Help, please.]

Israel ran towards her and stopped a few feet away.

“Are you all right?” Israel was cautiously approaching her, but his compassionate eyes told her that he blushed without realizing. He was worried. [Alis, isn’t space warped? How are you standing up?]

He once had doubt whether he understood her because of Alis’ abilities, but now he knew he was quite accurate.

[Something strange is going on.]

[Hold still.] Israel approached her in a non-aggressive manner. Alis thought he was kind. After noticing her, he tried to stand in front of her with a smile. He was trying not to stand too close for her misunderstanding. Even if the situation was serious, he should not be near her. Alis glanced at him. Israel wanted her to go into the space where he was standing at the back.

[– This way! You bear influence because of space.]

[What is this?] Israel blinked. [The Prime Golden Bull?]

No. You came here like a Prime Golden Bull. You came like a Prime Golden Bull who almost brought the world to chaos.

[What do you intend?]

“You bore. Release me, and let me go.”

[Something is wrong. Forget this. Bad things are going to happen.]

But are humans where the bad things are going to happen?

“Ok, I won’t remember anything.”

[No, you— ]

“Hey, don’t stand up right.”

The collision between the consciousness appeared as if he was floating in the Protouniverse and the normal world broke a place on his body. He didn’t feel anything. But he knew it. He unconsciously clung his hand while he was shaking from the cold sweat.

Continuous fall for thousands of years. It was still continuing. It was a nightmare.

[Israel?]

[You are strong. You are strong. You are stronger than the memories.]

He could not let it go just because he said so. His dependency on her wasn’t small, but not worthless. It’s my fault.

[Israel! The Book of Psalms says that everything is temporary and unpleasant and wants to return to life.]

[It’s late, Dennis.]

[Melis, I know everything. It’s fine. The old Pra Wolde. You can say it. It’s me.]

[……. Mister Strzia?]

[Str—[stria].]

[At the best!] Israel was crying. [Before the 2nd Wind Storm!]

[……. Alis!]

“Anan! Wake up! Anan! Wake up!”

Alis was so near that he had to hide his body with the cloak. Clearly, she exudes a scream. She noticed Alis’ abnormal state, but she had to even more worry. Denaje came out. She was big, but she could not carry Alis. However, Alis’ unusual strength was a great advantage, so she could at least reach Israel.

“Israel, she will be fine even if I hold her! You

hold this while we are going!”

Israel nodded and held the Protouniverse which had broken.

He truly wanted to save Anan, but Dennis had spoiled everything. Dennis had caged in Israel and plunged all the generations.

“–Mister Strzia! I hate you!”

The young man did not care for him when he was behind him, when he was dangerous. But he was now angry when he arrived in front of him.

“-Mister Strzia! I hate you!”

Israel got angry and struck his shoulder. Dennis also got bruised, so it was appropriate. He did not care whether he intimidated Dennis or even wanted to. However, Dennis kept crying like a child betrayed by the love. There was no dispute. Should he listen or should he hear about it? He was already broke. Everything he had reminded him of past mistakes. The pain was hard. First, a third shield developed in the face and would not tell a lie. Dennis was not going to be okay.

[Dennis, are you all right? Dennis!]

Alis’ scream. It came with her own voice as if he had grabbed her ear. Was Dennis healthy? His body was not so weak. But this much, it was what he hated most. No one else noticed such things in life. She was the only one who knew how he believed that she had accused herself and said to her. That he was timid, loud, and weak was a lie. Dennis masterfully hid it.

As soon as Dennis understood his strength and his nature, he chose panic. It was the symptom, he reacted like a frightened child fearing for his own survival. Israel sighed. Dennis was important for him. It was not a side character. Israel was reluctantly thinking about it. Dennis did not feel that way. Dennis was more kind and gentle than what he seemed. Actually, he did not know whether he had been baptized or not, but he was not an ordinary person. That makes him hate him. Dennis was quite good at taking care of her. Was it also a sign of forgiveness?

“Dennis!’

Dennis did not listen. Alis had even shaken him, but all he was doing was tears and blow. When they reached, he still believed. He, Israel, the hero who could not save her. He was so determined on blaming himself.

Dennis was too softly shouting. Even though secular tears had washed his shame, he vowed to cut off his name. He wanted to become Pope to Canonize. He did not think that he would prove his best to be in the top of a generation with baptized blood on his hands.

He trusted Ireland, but he was disappointed.

“She’s safe?”

This was it. With Israel’s limit, Dennis was revived, and he was no longer a crazy teenage child. He shook his head hard. With this negative report, a smile came. It was the first time he smiled in such a long time. The void that had occupied his heart was now blackened by the sun. After a moment’s mourning, he could move on to the live. He looked head and sideways, then at the top of the Protouniverse which was thick. There was also Dennis who tried to reach him, but it was not enough.

“This is my fault. I can’t let you go.”

The book of Psalms.

“Let’s do this.”

Dennis came near while standing on the ground. Israel smiled.

“……. Mister Strzia.”

“Sir, take it.”

With Dennis’s request, Israel unwrapped the Book of Psalms and placed it into Dennis’s hand.

“The thief Er on the cross asked the Lord to enter his kingdom. His demand was little. If I’m counting time well, I was left or denied.”

“This book this Prophet Nicholas Kingdom is a book of the apostles. And this Bible was written next even after the 2nd windstorn. It has a prophecy that a generation living in a turbulent era will read two gaps.”

“This does not mean this.”

“I’m sorry.”

Dennis was confused.

“……... Don’t get it, Mr. Strzka.” He looked down and laughed slightly to himself bitterly. [Show me the wound I got with this book. If it makes me scary, I definitely want it. I could not expect so much from a book. Something like the Book of Psalms]

[ I know. I understand your thoughts.]

Israel turned around and looked at the front of the floor. Dennis arrived.

“You go. The Promised Golden Bull will come pretty quickly. I will be able to get on the way. Um. When you are out of the Promised Golden Bull. It is safe.”

“Sir, I will do as you say.”

Israel stretched his hand out to Dennis.

“Thanks, Dennis.”

Dennis smiled. Israel’s hands stroked his cheek, and Dennis looked at him with a slight interest and nodded.

“–It is Mister Striga. The Thalamus is very lengthy. Even if I have barely anything like the two collides, I still can tell you something about the Sisters of St. Ste. When I feel particularly grubby, rather than compassion, these things are hated.”

Israel warmly smiled. Ha, yeah. That was how you felt. It means a lot. Everything had been a big memory, but this was all clear in which he did not care anything even though he did it.

Dennis wanted to go back to a happy time. When he and Alis played together. He had seemed to learn something. He apparently would learn a whole lot more in a big house today. Something was wrong about him. Perhaps he had been cured by that time. Moreover, it was a waste of time to blame Israel. It was a waste of his time to remember all the bad memories. Dennis was a Catholic. This minor grudge and resentment was a pity.

[You have loved him so much, Dennis.]

They believed in each other. They never hated each other. Lastly, they called for each other. I care about you, I love you, and don’t be afraid.

[Now that I’m by your side.]

“You feel caused by my…a sentiment of caring for you.”

Israel smiled. It was a small smile, but he was proud and loved. It was his first time getting a flattering smile.

“You were pleased by which I took care you and you worried about me. Everyone in the church will tell you that you were wrong…forcefully. You will know at that time, you just want to destroy me.”

“Yes, Sir. Mister Strzia. That is so.”

It was the biggest crime Israel had for his oath as a lieutenant of castle. It was what Israel was looking for the most. This sin was the bottom line. Israel would become a hero in the past.

“The notice you did showed that you were living in the hostility of what happened