The Dinner Party API allows you to create conversations where multiple historical figures interact with each other and respond to your questions. This creates dynamic, multi-perspective discussions.
curl -X POST http://localhost:5000/api/dinner-party/chat \ -H "Content-Type: application/json" \ -d '{ "guests": ["einstein", "davinci", "cleopatra"], "message": "What is the most important quality for a leader?", "history": [], "model": "openai/gpt-4o-mini" }'
{ "responses": [ { "figure_id": "einstein", "response": "Ah, from my experience, I would say curiosity is paramount! A leader must constantly question, explore, and remain open to new ideas. Imagination is more important than knowledge, after all. Without curiosity, how can one lead others into uncharted territories?" }, { "figure_id": "davinci", "response": "I must agree with my learned friend, though I would add observation. A true leader must observe everything - the needs of the people, the patterns in nature, the consequences of actions. From observation comes understanding, and from understanding, wisdom." }, { "figure_id": "cleopatra", "response": "Gentlemen, while I respect your scholarly perspectives, I submit that decisiveness is the most crucial quality. A leader who cannot make difficult choices when necessary, no matter how curious or observant, will fail their people. I learned this ruling Egypt in turbulent times." } ], "raw_response": "[einstein]: Ah, from my experience...\n\n[davinci]: I must agree...\n\n[cleopatra]: Gentlemen, while I respect...", "guests": [ { "id": "einstein", "name": "Albert Einstein", "title": "Theoretical Physicist" }, { "id": "davinci", "name": "Leonardo da Vinci", "title": "Artist, Inventor, and Polymath" }, { "id": "cleopatra", "name": "Cleopatra VII", "title": "Queen of Egypt, Last Pharaoh of the Ptolemaic Kingdom" } ]}
curl -X POST http://localhost:5000/api/dinner-party/chat/stream \ -H "Content-Type: application/json" \ -d '{ "guests": ["einstein", "davinci", "cleopatra"], "message": "What is the most important quality for a leader?" }'
data: {"content": "[einstein]: "}data: {"content": "Ah, from "}data: {"content": "my experience..."}data: {"content": "\n\n[davinci]: "}data: {"content": "I must agree..."}data: {"done": true}