Examples using official OpenAI Python API library
Use quit
, exit
or bye
commands to end conversation on conversation and persuasion examples.
Confirm:
- Connection
- Personalization
- Conversation
- Persuasion
Install OpenAI Python API library
pip install openai
Set OPENAI_API_KEY environment variable. Replace your-api-key-here with your actual OpenAI API key.
export OPENAI_API_KEY=your-api-key-here
These examples are quick prototypes designed to validate core assumptions and demonstrate key features. They are not production-ready and have several limitations:
- Lack proper design patterns and architectural best practices
- Missing comprehensive error handling and validation
- No security considerations or performance optimizations
- Limited testing and documentation
Do not deploy this code to production environments. Use these examples as learning materials and starting points for properly architected solutions.
- OpenAI Python API library
- On the conversational persuasiveness of GPT-4
- AI is more persuasive than a human in a debate, study finds
- AI-based chatbots in conversational commerce and their effects on product and price perceptions
- AI's new power of persuasion: Study shows LLMs can exploit personal information to change your mind