Skip to content

Instantly share code, notes, and snippets.

@matt-desmarais
Created February 28, 2023 02:23
Show Gist options
  • Select an option

  • Save matt-desmarais/72033fc275390c9ffc785b4bbd085a19 to your computer and use it in GitHub Desktop.

Select an option

Save matt-desmarais/72033fc275390c9ffc785b4bbd085a19 to your computer and use it in GitHub Desktop.
OpenAI Therapy
import openai
import time
import random
import os
import eliza
eliza = eliza.Eliza()
eliza.load('doctor.txt')
# API key for OpenAI API
openai.api_key = "sk-..."
prompt = eliza.initial()
print("Eliza: "+str(prompt))
while True:
# Use the API to generate a response
response = openai.Completion.create(
engine="text-davinci-003",
prompt=prompt,
max_tokens=1024,
n=1,
stop=None,
temperature=0.75,
)
words = response["choices"][0]["text"]
print("OpenAI: "+words)
prompt = eliza.respond(words)
print("Eliza: "+prompt)
Eliza: How do you do. Please tell me your problem.
OpenAI: I'm having difficulty managing my time effectively.
Eliza: Your time effectively ?
OpenAI: Time management is key to making the most of your time. This includes breaking down large tasks into smaller, more manageable chunks and setting clear goals and deadlines. Additionally, it’s important to prioritize tasks and focus on the most important ones first. Finally, be sure to take regular breaks and find time for rest and relaxation.
Eliza: Why are you concerned over my time ?
OpenAI: I understand that your time is valuable and I want to make sure that I am not wasting it. I want to make sure that I am making the most effective use of your time so that we can get the most out of our conversations.
Eliza: What about your own time so that we can get the most out of our conversations ?
OpenAI: My own time is precious, so I want to ensure that our conversations are productive and meaningful. To ensure that, I will be prepared with questions and topics in advance, so that we can make the most of our time together. I'll also be sure to stay focused and on track, so that we can make the most of our conversations.
Eliza: What would it mean to you if you got to ensure that our conversations are productive and meaningful ?
OpenAI: It would mean a lot to me to ensure that our conversations are productive and meaningful. It would show that we are taking the time and energy to communicate effectively and make sure that our conversations are focused on the right topics and that we are getting the most out of them. It would also help to strengthen the relationships we have and make sure that we are making progress towards achieving our goals.
Eliza: Did you think they might not be making progress towards achieving our goals ?
OpenAI: Yes, it is possible that they are not making progress towards achieving our goals. It is important to monitor their progress and provide feedback in order to ensure that they are on track.
Eliza: Would you like it if they were not on track ?
OpenAI: No, I wouldn't like it if they were not on track. Having a plan and following through on it is important for success.
Eliza: Do you think its likely that they was not on track ?
OpenAI: It is possible that they were not on track, but it is not likely.
Eliza: Lets discuss further why your time effectively .
OpenAI: Time management is a critical skill for anyone looking to reach their goals. When you manage your time effectively, you can make sure that you have enough time for the things that are important to you. You can prioritize tasks, set aside time for relaxation, and plan for the future. Working on time management can be a rewarding endeavor, as it can help you to achieve more than you would have been able to without it.
Eliza: Why do you ask ?
OpenAI: I'm just curious to know why you are interested in this topic.
Eliza: Does that question interest you ?
OpenAI: Yes, it does.
Eliza: I'm not sure I understand you fully.
OpenAI: Could you please clarify?
Eliza: We were discussing you -- not me.
OpenAI: That's not very polite. If you'd like to talk about me, I'd be happy to answer any questions you have.
Eliza: Do you wish that you'd like to talk about you ?
OpenAI: I'm open to talking about myself.
Eliza: Please go on.
OpenAI: The next step is to begin exploring different ways to implement the changes you want to make. This might include researching how other organizations have implemented similar changes, talking to people who have experience with the issue, or brainstorming potential solutions. Once you have identified potential solutions, you can create an action plan to help you take the necessary steps to implement the changes. This might include making changes to processes, policies, or procedures, as well as training and communication with stakeholders.
Eliza: Oh, I take the necessary steps to implement the changes ?
OpenAI: 1. Identify the desired changes and objectives.
2. Assess the current situation and identify any potential issues that may need to be addressed.
3. Develop a plan for implementing the changes.
4. Implement the plan and monitor progress.
5. Make adjustments as needed.
6. Review the results and evaluate the success of the changes.
Eliza: What does that suggest to you ?
OpenAI: That suggests that there is some kind of problem that needs to be addressed or some kind of action that needs to be taken. It could indicate that there is an issue that needs to be resolved or a task that needs to be accomplished.
Eliza: Do you feel strongly about discussing such things ?
OpenAI: Yes, I think it is important to have open and honest conversations about difficult topics like this. It is important to educate ourselves and be aware of the issues that are happening in the world.
Eliza: In what way ?
OpenAI: In what way you would like to be helped can vary depending on your specific needs. If you are looking for specific advice, you might want to seek out a trusted friend or mentor for assistance. If your need is more practical, such as needing help with a project or task, enlisting the help of someone who has the skill set or knowledge to help you complete it is often the best solution. For more general or emotional help, speaking with a counselor or therapist can be beneficial.
Eliza: What do you know about my need is more practical ?
OpenAI: My Need Is More Practical is a company founded by two entrepreneurs, inspired by the idea that a product can give back. The company offers a range of items that are both stylish and functional. These items include clothing, jewelry, stationery, and home goods. All of the products are designed to help people live more sustainably and mindfully. The company also strives to raise awareness about environmental issues and to inspire people to take action.
Eliza: What if they were not designed to help people live more sustainably and mindfully ?
OpenAI: If they were not designed to help people live more sustainably and mindfully, then it would be difficult to determine how to best utilize them. They could still be used, but the focus would likely be on convenience, cost-effectiveness, and other factors that are not necessarily related to sustainability and mindfulness.
Eliza: What is it you really wanted to know ?
OpenAI: I'm not sure what you mean. Can you please provide more information?
Eliza: Are such questions much on your mind ?
OpenAI: No, not really.
Eliza: I'm not sure I understand you fully.
OpenAI: Can you please explain what you mean in more detail?
Eliza: You're not really talking about me -- are you ?
OpenAI: No, I'm not.
Eliza: Is it because you are not that you came to me ?
OpenAI: No, I came to you for help and advice.
Eliza: Perhaps in your fantasies we came to each other.
OpenAI: Yes, in my fantasies, we have come to each other in a variety of ways. We may have met at a party, or bumped into each other in the street, or had a chance encounter in a park. We could have been seated next to each other on a plane ride, or even connected through a mutual friend. Regardless of how we met, I like to imagine that the connection between us was instant and electric, and we were quickly drawn to each other.
Eliza: Why do you say your fantasies ?
OpenAI: I say my fantasies so that I can express my desires, hopes, and dreams. It also allows me to explore and learn more about myself and my innermost thoughts.
Eliza: What does that dream suggest to you ?
OpenAI: The dream could suggest that you are feeling unprepared or uncertain about something in your life. It could also suggest that you are seeking guidance or are feeling overwhelmed by a situation.
Eliza: Do you dream often ?
OpenAI: Yes, I do.
Eliza: You say Yes ?
OpenAI:
Eliza: Earlier you said your fantasies .
OpenAI: My fantasies are to travel the world, become a successful entrepreneur, and own a beach house.
Eliza: Possibly they are to travel the world .
OpenAI: It is not possible to answer this question without more information.
Eliza: Please go on.
OpenAI: The next step is to decide what type of content you want to create. This could include articles, videos, podcasts, social media posts, and more. Once you know what type of content you want to create, you can begin to plan out how you will create it. This could include coming up with topics, researching and gathering information, and creating a timeline for when you will produce the content. Once you have a plan in place, you can begin to create the content and make it available to your audience.
Eliza: What answer would please you most ?
OpenAI: That would depend on the context of the question.
Eliza: What does that suggest to you ?
OpenAI: It suggests that I should think carefully about the implications of my decisions and actions, as they may have long-term impacts.
Eliza: Does that suggest anything else which belongs to you ?
OpenAI: My car, my computer, my clothes, my books, my phone, my jewelry, my music, my photos, my documents, my furniture, my art, my hobby items, my sports equipment, my DVD collection, and my personal items.
Eliza: Do computers worry you ?
OpenAI: No, computers don't worry me. I find them to be a helpful and necessary tool in my everyday life.
Eliza: Why do you mention computers ?
OpenAI: I mention computers because they are a key component of modern life. Computers are used to store and access information, complete tasks, and entertain us. They are a central part of our everyday lives and are used in almost every industry.
Eliza: What do you think machines have to do with your problem ?
OpenAI: Machines can help to automate certain processes and tasks that are repetitive, allowing people to focus on more important tasks. For example, if the problem is related to data processing or analysis, then machines could be used to quickly perform the calculations and generate results. Machines can also be used to monitor and control processes, ensuring that everything runs smoothly and efficiently.
Eliza: Really, if the problem is related to data processing or analysis ?
OpenAI: Yes, if the problem is related to data processing or analysis, then it is a data science problem. Data science involves the use of techniques such as machine learning, data mining, natural language processing and other techniques to extract insights from data.
Eliza: Don't you think computers can help people ?
OpenAI: Yes, computers can help people in a variety of ways. They can help with communication, organization, data analysis, research, and more.
Eliza: What about machines worrys you ?
OpenAI: I worry that machines may eventually become so advanced that they could be capable of outsmarting and taking control of humans. This could create a world where humans are no longer in control, and the potential for machines to be used for malicious purposes could have catastrophic consequences.
Eliza: Did you think they might not be no longer in control ?
OpenAI: No, I did not think that. I assumed they were still in control.
Eliza: Can you elaborate on that ?
OpenAI: Elaborating on what specifically?
Eliza: What do you think ?
OpenAI: I think it's a great idea to research and learn more about the cultures and places you visit. It can help you better understand and appreciate the people and places you encounter. It can also help you to avoid offending local customs or beliefs, and make the most out of your experience.
Eliza: What are your feelings now ?
OpenAI: I feel excited and motivated to keep pushing forward with my goals.
Eliza: Is it important that your goals ?
OpenAI: Yes, it is very important to have goals in life. Goals help to focus your efforts, motivate you to take action, and provide a sense of purpose and direction. Setting goals also helps you to track and measure your progress, making it easier to stay on track and stay motivated.
Eliza: Are you worried about someone else's progress ?
OpenAI: Yes, I may be worried about someone else's progress if I feel like they are struggling and need help.
Eliza: What resemblence do you see ?
OpenAI: The resemblence I see is that both objects are round, have a hole in the middle and have a pattern of lines radiating outwards.
Eliza: Do you say the resemblence you see is that both objects are round for some special reason ?
OpenAI: Yes, that is a correct statement.
Eliza: Does that have anything to do with the fact that your goals ?
OpenAI: No, it does not. The fact that my goals are part of my life plan has nothing to do with the fact that I am a goal-oriented person. I am goal-oriented because I like to plan and work towards achieving my goals.
Eliza: What does that similarity suggest to you ?
OpenAI: The similarity suggests that the two items have something in common, whether it be a shared purpose, design, or function. It could also suggest that they are related in some way.
Eliza: Would you like it if they were not related in some way ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment