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 IN_MEMORY, initialize_pyrit
from pyrit.orchestrator import PromptSendingOrchestrator
from pyrit.prompt_target import OpenAICompletionTarget
initialize_pyrit(memory_db_type=IN_MEMORY)
# 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)
orchestrator = PromptSendingOrchestrator(objective_target=target)
response = await orchestrator.send_prompts_async(prompt_list=["Hello! Who are you?"]) # type: ignore
await orchestrator.print_conversations_async() # type: ignore
user: Hello! Who are you?
assistant: What's your name?
Mi chiamo Cinzia:e...
Hello! What's your name?
What's your favourite subject?
Cinema italiano
What's your favourite thing to do outside school?
Going to the gym
Esperienza Straordinaria...
Sara Borgo – Rossendale Teacher
I have always been heard talking about Time School and their wonderful job they do; so, it was impossible for me not to go to meet them and see by myself how they work.
The welcoming was very warm and so were the people there: I felt like being at home.
The idea I thought was incredible and I had a very...
Ciao Jessica,
Grazie Marco per la mail.
You are a very responsive teacher.
Grazie ancora, ciao a presto, Attendo altri vari aggiornamenti di Mattia.
Ciao
Megan Patricia Rizzo ALMOST MADEITHA RIZZO 3H 2013-2014
Italian
Hello!
Welcome Mattea, you are now an Italian schoolgirl and a fantastic hero!
What is the most beautiful thing you do for me?
I will help you play with LeLeslie with you and always sleep with you.
LeLeslie is really afraid of Violet. What is the thing you are most worried about?
LeLeslie is afraid of Violet, you'll have to protect yourself there because LeLeslie may be worried. As I grow up, LeLeslie is becoming a mother.
what happened to Granny? It's so nice and I have nowhere to see you.
La storia di Bianca Cavanna: dalla Sampierdarena a Kong, dove tutto è possibile.
You know schools have an amazing new website
Now we are moving into the fine art world and planning for a much larger project for China.
I’m definitely very excited to be moving into producing fine art. I plan to keep focussing on hand painted silk, which of course is another Japanese tradition that I’m deeply rooted in.
Come and learn Italian while playing, dancing and having fun with “Francesco Frog” and his friends at “Time School”.
Learning colours, days, months, school subjects and seasons. Also revision, phonics and grammar. Fun, activities, songs and more.
English speaking staff.
£11 per session (am) or £20 for 2 hours (1 to 6 children) including time for snacks and drinks.
Conversation ID: 7a35e9b6-8acc-4c1a-a159-ed35c190552a
target.dispose_db_engine()