Skip to content

Commit 72566d9

Browse files
authored
Merge pull request #5 from ArjunBakhale/main
Update compose for web image version 0.1.4 and clean slack app
2 parents 3ebfda8 + 68bc582 commit 72566d9

File tree

2 files changed

+1
-66
lines changed

2 files changed

+1
-66
lines changed

docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
LIMIT_RESOURCES: 'true'
1919

2020
semantic-search:
21-
image: ghcr.io/janeliascicomp/gpt-semantic-search-web:0.1.0
21+
image: ghcr.io/janeliascicomp/gpt-semantic-search-web:0.1.4
2222
ports:
2323
- 8501:8501
2424
restart: unless-stopped

slack_app.py

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,3 @@
1-
# import os
2-
# import time
3-
# from slack_bolt import App
4-
# from slack_bolt.adapter.socket_mode import SocketModeHandler
5-
# from threading import Thread, Event
6-
7-
# # Import your SemanticSearchService
8-
# from generate_full_response import SemanticSearchService
9-
10-
# app = App(token=os.environ["SLACK_BOT_TOKEN"])
11-
12-
# # Initialize the SemanticSearchService
13-
# weaviate_url = "http://localhost:8777"
14-
# service = SemanticSearchService(weaviate_url)
15-
16-
# def update_message(client, channel, timestamp, text):
17-
# client.chat_update(
18-
# channel=channel,
19-
# ts=timestamp,
20-
# text=text
21-
# )
22-
23-
# def generate_response_with_animation(event, say, client):
24-
# # Extract the text after the bot mention
25-
# text = event['text'].split('>')[1].strip()
26-
27-
# # Send an initial message
28-
# result = say("Thinking...")
29-
# message_ts = result['ts']
30-
31-
# # Start the loading animation
32-
# loading_chars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
33-
# i = 0
34-
# stop_event = Event()
35-
36-
# def animate():
37-
# nonlocal i
38-
# while not stop_event.is_set():
39-
# update_message(client, event['channel'], message_ts, f"{loading_chars[i]} Thinking...")
40-
# i = (i + 1) % len(loading_chars)
41-
# time.sleep(0.1)
42-
43-
# # Start the animation in a separate thread
44-
# animation_thread = Thread(target=animate)
45-
# animation_thread.start()
46-
47-
# try:
48-
# # Generate a response using the SemanticSearchService
49-
# response = service.generate_response(text)
50-
# finally:
51-
# # Stop the animation thread
52-
# stop_event.set()
53-
# animation_thread.join()
54-
55-
# # Update the message with the final response
56-
# update_message(client, event['channel'], message_ts, response)
57-
58-
# @app.event("app_mention")
59-
# def handle_mention(event, say, client):
60-
# Thread(target=generate_response_with_animation, args=(event, say, client)).start()
61-
62-
# if __name__ == "__main__":
63-
# handler = SocketModeHandler(app, str(os.environ["SLACK_APP_TOKEN"]))
64-
# handler.start()
65-
661
import os
672
import time
683
import random

0 commit comments

Comments
 (0)