10000 API Docs: Update AI tutorial to include markdown block by haleychaas · Pull Request #2486 · slackapi/bolt-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

API Docs: Update AI tutorial to include markdown block #2486

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 4, 2025

Conversation

haleychaas
Copy link
Contributor

Summary

Now that we have the markdown block available to help with markdown translations, we should have it in the tutorial as an option.

Requirements (place an x in each [ ])

Copy link
codecov bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.59%. Comparing base (9410015) to head (2d0b797).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2486   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          36       36           
  Lines        7472     7472           
  Branches      653      653           
=======================================
  Hits         6919     6919           
  Misses        545      545           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@@ -370,6 +370,27 @@ After getting the thread replies, we map them to the appropriate object structur

The entirety of the user message processing in this example is wrapped in a try-catch block to provide the user an error message when something goes wrong, which is a best practice. If successful, the final action we take is to call the `say` method with the LLM response.

#### Using the markdown block in `say` {#markdown-block}

To safeguard against any markdown translation errors, we can return our text response inside of a [`Markdown block`](https://docs.slack.dev/reference/block-kit/blocks/markdown-block) in the `say` block, instead of relying on providing precise enough instructions to the LLM. Here's how that would look:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To safeguard against any markdown translation errors, we can return our text response inside of a [`Markdown block`](https://docs.slack.dev/reference/block-kit/blocks/markdown-block) in the `say` block, instead of relying on providing precise enough instructions to the LLM. Here's how that would look:
To safeguard against any markdown translation errors, we can return our text response inside of a [markdown block](https://docs.slack.dev/reference/block-kit/blocks/markdown-block) in the `say` block, instead of relying on providing precise enough instructions to the LLM. Here's how that would look:

i don't think we put them in code blocks?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd also use a different word than "block" for "say block"

@haleychaas haleychaas merged commit de020cc into main Apr 4, 2025
20 checks passed
@haleychaas haleychaas deleted the update-tutorial-markdown-block branch April 4, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0