[Python] Stream Chat System Message Customization

Discussão em 'Python' iniciado por Stack, Janeiro 30, 2025.

  1. Stack

    Stack Membro Participativo

    I've created a custom message type that I send via Python backend as a regular message type, howvever I can't figure out how to set the 'profile pic' or the name for the system message. I want to use our app's logo and name instead of the default picture and the name "system".

    This is my message:

    message = {
    "text": f"Today's reading: {passage_reference}",
    "isGroupPlanPassage": True,
    "passageReference": passage_reference,
    "passageData": {
    "planId": plan_data.get("groupPlanID"),
    "passageNumber": current_passage_number
    },
    "user": {"id": system_user_id},
    "type": "regular"
    }


    I tried this, but it didn't work:

    message = {
    "text": f"Today's reading: {passage_reference}",
    "isGroupPlanPassage": True,
    "passageReference": passage_reference,
    "passageData": {
    "planId": plan_data.get("groupPlanID"),
    "passageNumber": current_passage_number
    },
    "user": {
    "id": system_user_id,
    "name": app_name,
    "image": image_url},
    "type": "regular"
    }


    Anyone tried this themselves? Is it even possible? Thanks!

    Continue reading...

Compartilhe esta Página