INNER CODE UNIT · Python

prepare_and_share_thread_summary

seratch/ChatGPT-in-Slack · app/bolt_listeners.py:608

def prepare_and_share_thread_summary(
    payload: dict,
    client: WebClient,
    context: BoltContext,
    logger: logging.Logger,
):
    try:
        openai_api_key = context.get("OPENAI_API_KEY")
        selected_option = extract_state_value(payload, "where-to-share-summary")[
            "selected_option"
        ]
        where_to_display = selected_option.get("value", "modal")
        prompt = extract_state_value(payload, "prompt").get("value")
        private_metadata = json.loads(payload.get("private_metadata"))
        thread_content = build_thread_replies_as_combined_text(
            context=context,
            client=client,
            channel=private_metadata.get("channel"),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…