# Create a question interactiondialectic_interaction = epistemic_me.DialecticInteraction.create( dialectic_id=dialectic.id, proposed_answer="...", question="What is the meaning of life?", status="Pending Answer")# Answer the questiondialectic_interaction.modify( answer="...", status="Answered")# Confirm the belief updatedialectic_interaction.modify( belief_updates="Confirmed", status="Beliefs Updated")
The update method supports both structured question-answer pairs and unstructured chat blobs:
Copy
# Using structured Q&Adialectic.update( question="What is your sleep schedule?", answer="I sleep 8 hours per night")# Using chat blobsdialectic.update( question_blob="How would you describe your sleep habits?", answer_blob="I usually get about 8 hours of sleep per night")
The chat blob format is particularly useful when processing conversations from chat interfaces, where the interaction may be more natural and less structured.
conversation = [ {"role": "assistant", "content": "How would you describe your sleep habits?"}, {"role": "user", "content": "I usually get about 8 hours of sleep per night"}]dialectic = epistemic_me.Dialectic.create(self_model_id="user123")for message in conversation: if message["role"] == "assistant": dialectic.update(question_blob=message["content"]) else: dialectic.update(answer_blob=message["content"])
The belief system will be automatically updated based on the content of the conversation.