This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index e101a85..a7d3334 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -2,6 +2,7 @@ import os | |
| import threading | |
| from langchain.agents import create_agent | |
| +from langchain.agents.middleware import SummarizationMiddleware | |
| from langgraph.checkpoint.memory import InMemorySaver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index 655f238..e101a85 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -11,6 +11,8 @@ from slack_sdk.errors import SlackApiError | |
| app = App(token=os.environ.get("SLACK_BOT_TOKEN")) | |
| bot_user_id = None | |
| +thinking_threads = [] | |
| +thinking_threads_lock = threading.Lock() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index 09860d5..655f238 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -2,6 +2,7 @@ import os | |
| import threading | |
| from langchain.agents import create_agent | |
| +from langgraph.checkpoint.memory import InMemorySaver | |
| from langchain.messages import HumanMessage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index 35b1f94..09860d5 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -3,12 +3,21 @@ import threading | |
| from langchain.agents import create_agent | |
| from langchain.messages import HumanMessage | |
| +from langchain.tools import tool | |
| from slack_bolt import App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index e0b9b9a..35b1f94 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -1,18 +1,20 @@ | |
| import os | |
| import threading | |
| -import time | |
| -from langchain.chat_models import init_chat_model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index c41525a..e0b9b9a 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -2,15 +2,17 @@ import os | |
| import threading | |
| import time | |
| +from langchain.chat_models import init_chat_model | |
| from slack_bolt import App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index 2cca6b4..c41525a 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -1,4 +1,6 @@ | |
| import os | |
| +import threading | |
| +import time | |
| from slack_bolt import App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app.py b/app.py | |
| index b4970c5..2cca6b4 100644 | |
| --- a/app.py | |
| +++ b/app.py | |
| @@ -11,15 +11,17 @@ def handle_agent_command(ack, command, client, respond): | |
| ack() | |
| channel_id = command["channel_id"] | |
| prompt = command.get("text", "") | |
| - message = f"Working on the prompt... {prompt}" | |
| + message = f"Prompt: {prompt}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from slack_bolt import App | |
| from slack_bolt.adapter.socket_mode import SocketModeHandler | |
| from slack_sdk.errors import SlackApiError | |
| app = App(token=os.environ.get("SLACK_BOT_TOKEN")) | |
| @app.command("/agent") | |
| def handle_agent_command(ack, command, client, respond): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from slack_bolt import App | |
| from slack_bolt.adapter.socket_mode import SocketModeHandler | |
| app = App(token=os.environ.get("SLACK_BOT_TOKEN")) | |
| @app.command("/agent") | |
| def handle_agent_command(ack, command, client): | |
| ack() |
NewerOlder