Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created August 4, 2025 00:53
Show Gist options
  • Select an option

  • Save KyMidd/8516a3f08d1d013c30e97f9f15f80fb1 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/8516a3f08d1d013c30e97f9f15f80fb1 to your computer and use it in GitHub Desktop.
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