Skip to content

Commit

Permalink
Tweak assistant document page
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Feb 7, 2025
1 parent d9ee954 commit bee1a30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public EventRequest(
// message_changed
this.getContext().setThreadTs(event.get("message").getAsJsonObject().get("thread_ts").getAsString());
}
// Assistant middleware can set threadContext using AssistantThreadContextStore
// Assistant middleware can set threadContext using AssistantThreadContextService
}

if (this.eventType != null && this.eventType.equals(FunctionExecutedEvent.TYPE_NAME)) {
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/assistants.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ assistant.userMessage((req, ctx) -> {
app.assistant(assistant);
```

While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextStore` property — but it also provides a `DefaultThreadContextStore` instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://api.slack.com/metadata/using) as the user interacts with the assistant.
While the `assistant_thread_started` and `assistant_thread_context_changed` events do provide Slack-client thread context information, the `message.im` event does not. Any subsequent user message events won't contain thread context data. For that reason, Bolt not only provides a way to store thread context — the `threadContextService` property — but it also provides a `DefaultAssistantThreadContextService` instance that is utilized by default. This implementation relies on storing and retrieving [message metadata](https://api.slack.com/metadata/using) as the user interacts with the assistant.

If you do provide your own `threadContextStore` property, it must feature `get` and `save` methods.
If you do provide your own `threadContextService` property, it must feature `get` and `save` methods.

:::tip
Be sure to give the [assistants reference docs](/reference#agents--assistants) a look!
Expand Down

0 comments on commit bee1a30

Please sign in to comment.