1

Format your test data

Make sure the data you want to upload is in the following format:

data = [
    {
        "input_payload": {
            "message": "I want to book a stay in London",
        },
        "conversation_history": [
            {
                "role": "assistant",
                "content": "Hi! How can I help you today?"
            },
        ],
        "output_payload_expected": {  # Optional
            "answer": "Sure! Where in London would you like to stay?",
        },
    },
    {
        "input_payload": {
            "message": "I want to book a stay in San Francisco",
        },
        "conversation_history": [
            {
                "role": "assistant",
                "content": "Hi! How can I help you today?"
            },
        ],
        "output_payload_expected": {  # Optional
            "answer": "Sorry, I can't help with that. I only know about London.",
        },
    },
]
2

Upload dataset

from maihem import Maihem

maihem_client = Maihem()

maihem_client.upload_dataset(
    name="dataset_a",
    label="Dataset A", # (Optional) Name of the dataset to be displayed
    data=data
)

Your dataset called dataset_a will now be available to use in your tests.