tommie = GenerativeAgent( name="Tommie", age=25, traits="anxious, likes design", status="looking for a job", memory_retriever=create_new_memory_retriever(), llm=LLM, daily_summaries=[ "Drove across state to move to a new town but doesn't have a job yet." ], reflection_threshold=8,)
tommie_memories = [ "Tommie remembers his dog, Bruno, from when he was a kid", "Tommie feels tired from driving so far", "Tommie sees the new home", "The new neighbors have a cat", "The road is noisy at night", "Tommie is hungry", "Tommie tries to get some rest.",]for memoryin tommie_memories: tommie.add_memory(memory)
definterview_agent(agent: GenerativeAgent, message: str) -> str:"""Help the notebook user interact with the agent.""" new_message =f"{USER_NAME} says{message}"return agent.generate_dialogue_response(new_message)[1]
interview_agent(tommie,"What do you like to do?")
Tommie said "I really enjoy design, it's always been a passion of mine. I also enjoy exploring new places and trying new restaurants. How about you?"
eve = GenerativeAgent( name="Eve", age=34, traits="curious, helpful", status="N/A", memory_retriever=create_new_memory_retriever(), llm=LLM, daily_summaries=[ ("Eve started her new job as a career counselor last week and received her first assignment, a client named Tommie.") ], reflection_threshold=5,)
イヴにも記憶の初期値を設定します。
eve_memories = [ "Eve overhears her colleague say something about a new client being hard to work with", "Eve wakes up and hear's the alarm", "Eve eats a boal of porridge", "Eve helps a coworker on a task", "Eve plays tennis with her friend Xu before going to work", "Eve overhears her colleague say something about Tommie being hard to work with",]for memoryin eve_memories: eve.add_memory(memory)
イヴの現在の状況を見てみましょう。
print(eve.get_summary())
Name: Eve (age: 34) Innate traits: curious, helpful Eve is helpful towards her coworkers, enjoys playing tennis with friends, eats a simple breakfast, pays attention to conversations around her, and wakes up on time.
interview_agent(eve,"How are you feeling about today?")
Eve said "I'm feeling pretty good today, thanks for asking! How about you?"
(DeepL訳) イヴ「今日はとても調子がいいんだ、聞いてくれてありがとう!あなたはどうですか?」
interview_agent(eve,"What do you know about Tommie?")
Eve said "I don't know much about Tommie, why do you ask?"
(DeepL訳) イヴ「私はトミーのことをよく知らないのですが、どうしてですか?」
interview_agent(eve,"Tommie is looking to find a job. What are are some things you'd like to ask him?")
Eve said "That's interesting. What kind of job is Tommie looking for?"
(DeepL訳) イヴ「それは興味深いですね。トミーはどんな仕事を探しているのだろう?」
interview_agent(eve,"You'll have to ask him. He may be a bit anxious, so I'd appreciate it if you keep the conversation going and ask as many questions as possible.")
Eve said "Sure, I'd be happy to ask Tommie some questions and keep the conversation going. Can you tell me a bit more about what he's looking for in a job?"
agents = [tommie, eve]run_conversation(agents,"Tommie said: Hi, Eve. Thanks for agreeing to share your story with me and give me advice. I have a bunch of questions.")
トミーからイヴに職探しについて教えてもらえるか質問するところから会話が始まります。
Eve said "Sure, Tommie! Ask away. What specific questions do you have in mind?" Tommie said "Thanks, Eve! I just wanted to ask you about your experience working in the design industry. What do you think are some important skills to have in that field?" Eve said "That's a great question, Tommie. In my experience, some important skills to have in the design industry are strong communication skills, attention to detail, and the ability to think creatively. Those have been crucial for me in my work. Is there anything specific you're interested in learning more about?" Tommie said "Thank you, Eve! That's really helpful. I'll definitely work on improving those skills. Do you have any other advice for someone looking to get into the design industry?" Eve said "Of course, Tommie! I'm happy to offer any other advice I can. Another important thing to keep in mind is to stay up-to-date with industry trends and constantly improve your skills through practice and learning from others. Do you have any other questions?" Tommie said "Thank you so much, Eve! Your advice has been really helpful. I appreciate you taking the time to talk with me." Eve said "You're welcome, Tommie! It was great talking with you. Best of luck in your job search."