Created
August 4, 2025 00:53
-
-
Save KyMidd/8516a3f08d1d013c30e97f9f15f80fb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_teams_conversation_history(user_graph_auth_token, event_body): | |
| # ... | |
| if conversation_type == "channel": | |
| # ... | |
| elif conversation_type == "personal": | |
| # ... | |
| # This excludes the bot's loading messages, the authentication card, and any messages which are invalid or blank | |
| messages = massage_messages(messages, conversation_type) | |
| # Initialize conversation and content lists | |
| conversation = [] | |
| content = [] | |
| # Iterate through messages and build conversation | |
| for message in messages: | |
| # Iterate over content | |
| conversation_turn = build_conversation_turn(content, message, headers) | |
| # Append the conversation turn to the conversation | |
| conversation.append(conversation_turn) | |
| return conversation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment