-
Notifications
You must be signed in to change notification settings - Fork 17
feat: set loading states and stream responses #11
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
Changes from 9 commits
a00e5c1
df8b620
475139f
e1bc98a
291ef2d
a8389b1
42cf39f
2acdaf4
5bf3bf4
bfd4649
530052f
905f4fb
0a97ef9
b797fdd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| apps.dev.json | ||
| cache/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "manifest": { | ||
| "source": "remote" | ||
| }, | ||
| "project_id": "22e2b5e7-ef8f-4fbf-8026-a62ae0623037" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "hooks": { | ||
| "get-hooks": "python3 -m slack_cli_hooks.hooks.get_hooks" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -72,7 +72,19 @@ black . | |||||||||||||||
|
|
||||||||||||||||
| ### `/listeners` | ||||||||||||||||
|
|
||||||||||||||||
| Every incoming request is routed to a "listener". Inside this directory, we group each listener based on the Slack Platform feature used, so `/listeners/events` handles incoming events, `/listeners/shortcuts` would handle incoming [Shortcuts](https://api.slack.com/interactivity/shortcuts) requests, and so on. | ||||||||||||||||
| Every incoming request is routed to a "listener". This directory groups each listener based on the Slack Platform feature used, so `/listeners/events` handles incoming events, `/listeners/shortcuts` would handle incoming [Shortcuts](https://docs.slack.dev/interactivity/implementing-shortcuts/) requests, and so on. | ||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+76
to
+79
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
this makes it look like a little callout card on the docs! anytime i think about using "note:" i just replace it with a callout card.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 note: Added in 42cf39f.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗣️ thought: I'm not sure that this renders as expected with GitHub markdown? 🔗 https://github.com/srtaalej/bolt-python-assistant-template/tree/main?tab=readme-ov-file#listeners We might want to revert this or use different syntax?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah idk why i suggested to use docs syntax in a README i think i got confused where i was oof |
||||||||||||||||
| :::info[The `listeners/events` folder is purely educational and demonstrates alternative approaches to implementation] | ||||||||||||||||
| These listeners are **not registered** and are not used in the actual application. For the working implementation, refer to `listeners/assistant.py`. | ||||||||||||||||
|
srtaalej marked this conversation as resolved.
|
||||||||||||||||
| **`/listeners/assistant`** | ||||||||||||||||
|
zimeg marked this conversation as resolved.
|
||||||||||||||||
|
|
||||||||||||||||
| Configures the new Slack Assistant features, providing a dedicated side panel UI for users to interact with the AI chatbot. This module includes: | ||||||||||||||||
|
|
||||||||||||||||
| `assistant.py`, which contains two listeners: | ||||||||||||||||
| * The `@assistant.thread_started` listener receives an event when users start new app thread. | ||||||||||||||||
| * The `@assistant.user_message` listener processes user messages in app threads or from the app **Chat** and **History** tab. | ||||||||||||||||
|
|
||||||||||||||||
| `llm_caller.py`, which handles OpenAI API integration and message formatting. It includes the `call_llm()` function that sends conversation threads to OpenAI's models. | ||||||||||||||||
|
|
||||||||||||||||
| ## App Distribution / OAuth | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| from .assistant import assistant | ||
| from listeners.assistant import assistant | ||
|
|
||
|
|
||
| def register_listeners(app): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| from .assistant import assistant | ||
|
|
||
| __all__ = ["assistant"] |
Uh oh!
There was an error while loading. Please reload this page.