Skip to content

Latest commit

 

History

History
49 lines (26 loc) · 4.32 KB

README.md

File metadata and controls

49 lines (26 loc) · 4.32 KB

Roleplay-Therapy-GPT-4

Roleplay Therapy is a Python script that utilizes the OpenAI API to generate a conversation between two actors discussing a given topic. The script simulates a therapeutic conversation between two actors, where they take turns to talk to each other and share their thoughts on a given topic.

Want to help me help people help themselves? Contribute to this script.

Roleplay Therapy

Roleplay Therapy is a Python script that utilizes the OpenAI API to generate a conversation between two actors discussing a given topic. The script simulates a therapeutic conversation between two actors, where they take turns to talk to each other and share their thoughts on a given topic.

How to Use

To use this script, follow the instructions below:

Install the openai package by running pip install openai==0.10.2 in your terminal or command prompt.

Obtain an OpenAI API key from https://beta.openai.com/signup/

Clone this repository to your local machine.

Open the script and replace the API key on lines 11 and 29 with your own API key.

Replace the topic variable with your own desired topic.

Run the script by running python app.py in your terminal or command prompt.

The script will initiate a conversation between two actors, simulating a therapeutic conversation. The actors will take turns to talk to each other, and their responses will be generated by the OpenAI API based on the given topic. The conversation will continue until the loop is finished, generating a total of 50 responses.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Example chat between Sigmund Freud and Carl Jung talking about a boys love for his mother.

Roleplaying Carl Jung and Sigmund Freud discussing Discuss a boys love of his mother. (GPT-3.5-Turbo)

(expand the Tweet to see the conversation)

I wrote a script in python to have GPT talk to itself but by role playing two different characters.

The Conversation

Carl Jung: Freud, while I acknowledge the significance of the Oedipus complex in your theory, suggesting a boy's love for his mother is inherently sexual in nature, I propose a broader, more symbolic interpretation. This affection, from my perspective, embodies the boy's initial encounter with the feminine aspect of the collective unconscious, an archetype, rather than being solely the manifestation of repressed desires or competition with the father figure.

Sigmund Freud: Sigmund Freud: Jung, your interpretation, while intriguing in its expansiveness, seems to me to dilute the profound, tangible impact of early psychosexual development on the individual's psyche. The Oedipus complex, as I propose, is crucial for understanding the intricacies of the human mind, particularly in how a boy navigates his desires and identifies with his father, ultimately resolving these feelings to form his superego. This is not merely symbolic but a necessary stage in personal development, deeply rooted in our biological and psychological makeup.

Carl Jung: Carl Jung: Freud, I appreciate your emphasis on psychosexual stages, but I believe focusing solely on the Oedipus complex limits our understanding of the psyche's complexity. The resolution of a boy's feelings towards his mother, in my view, goes beyond the establishment of the superego and involves the integration of various aspects of the self. This integration is part of a larger individuation process, where the symbolic meanings attached to these early relationships play a crucial role in the development of the individual's personality, transcending the purely biological or sexual interpretations.

Sigmund Freud: Sigmund Freud: Carl, while I respect your broader view on the individuation process and the symbolic significance of early relationships, I must assert that the psychosexual stages, and specifically the Oedipal conflict, provide a concrete foundation for understanding the formation of the personality. The dynamics of love, jealousy, and rivalry experienced in the Oedipus complex are essential for the development of the neuroses we later encounter in adults. Your focus on symbolism and the collective unconscious, though fascinating, risks overlooking the direct influence of these early, tangible, familial relationships on the individual’s psyche. -- how can we make it even more real?