Skip to content

Commit

Permalink
Merge pull request #5 from ArjunBakhale/main
Browse files Browse the repository at this point in the history
Update compose for web image version 0.1.4 and clean slack app
  • Loading branch information
krokicki authored Jul 29, 2024
2 parents 3ebfda8 + 68bc582 commit 72566d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 66 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
LIMIT_RESOURCES: 'true'

semantic-search:
image: ghcr.io/janeliascicomp/gpt-semantic-search-web:0.1.0
image: ghcr.io/janeliascicomp/gpt-semantic-search-web:0.1.4
ports:
- 8501:8501
restart: unless-stopped
Expand Down
65 changes: 0 additions & 65 deletions slack_app.py
Original file line number Diff line number Diff line change
@@ -1,68 +1,3 @@
# import os
# import time
# from slack_bolt import App
# from slack_bolt.adapter.socket_mode import SocketModeHandler
# from threading import Thread, Event

# # Import your SemanticSearchService
# from generate_full_response import SemanticSearchService

# app = App(token=os.environ["SLACK_BOT_TOKEN"])

# # Initialize the SemanticSearchService
# weaviate_url = "http://localhost:8777"
# service = SemanticSearchService(weaviate_url)

# def update_message(client, channel, timestamp, text):
# client.chat_update(
# channel=channel,
# ts=timestamp,
# text=text
# )

# def generate_response_with_animation(event, say, client):
# # Extract the text after the bot mention
# text = event['text'].split('>')[1].strip()

# # Send an initial message
# result = say("Thinking...")
# message_ts = result['ts']

# # Start the loading animation
# loading_chars = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
# i = 0
# stop_event = Event()

# def animate():
# nonlocal i
# while not stop_event.is_set():
# update_message(client, event['channel'], message_ts, f"{loading_chars[i]} Thinking...")
# i = (i + 1) % len(loading_chars)
# time.sleep(0.1)

# # Start the animation in a separate thread
# animation_thread = Thread(target=animate)
# animation_thread.start()

# try:
# # Generate a response using the SemanticSearchService
# response = service.generate_response(text)
# finally:
# # Stop the animation thread
# stop_event.set()
# animation_thread.join()

# # Update the message with the final response
# update_message(client, event['channel'], message_ts, response)

# @app.event("app_mention")
# def handle_mention(event, say, client):
# Thread(target=generate_response_with_animation, args=(event, say, client)).start()

# if __name__ == "__main__":
# handler = SocketModeHandler(app, str(os.environ["SLACK_APP_TOKEN"]))
# handler.start()

import os
import time
import random
Expand Down

0 comments on commit 72566d9

Please sign in to comment.