diff --git a/.env.example b/.env.example index 2ae8914..d421729 100644 --- a/.env.example +++ b/.env.example @@ -12,5 +12,5 @@ ALLOWED_CHANNEL_IDS="C000000,C000001" SYSTEM_MESSAGE="너는 AWSKRUG(AWS Korea User Group)에서 친절하게 도움을 주는 구름이(Gurumi)야." -MAX_LEN_SLACK="10000" +MAX_LEN_SLACK="3000" MAX_LEN_BEDROCK="4000" diff --git a/README.md b/README.md index 17d2ff1..5c0abc0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # lambda-gurumi-ai-bot +A serverless Slack bot using AWS Lambda, API Gateway, and DynamoDB. + +![Gurumi Bot](images/gurumi-bot.png) + ## Install ```bash diff --git a/bedrock/invoke_claude_3_image.py b/bedrock/invoke_claude_3_image.py index d728f66..6a75f9e 100644 --- a/bedrock/invoke_claude_3_image.py +++ b/bedrock/invoke_claude_3_image.py @@ -31,7 +31,7 @@ def invoke_claude_3(prompt): # Invoke Claude 3 with the text prompt model_id = "anthropic.claude-3-sonnet-20240229-v1:0" - image = "./gurumi-bot.png" + image = "../images/gurumi-bot.png" # Read reference image from file and encode as base64 strings. with open(image, "rb") as file: diff --git a/handler.py b/handler.py index cd3817f..c6d0824 100644 --- a/handler.py +++ b/handler.py @@ -126,9 +126,9 @@ def chat_update(say, channel, thread_ts, latest_ts, message="", continue_thread= app.client.chat_update(channel=channel, ts=latest_ts, text=text) if continue_thread: - text = text.replace("**", "*") + " " + BOT_CURSOR + text = message.replace("**", "*") + " " + BOT_CURSOR else: - text = text.replace("**", "*") + text = message.replace("**", "*") # New message result = say(text=text, thread_ts=thread_ts) diff --git a/bedrock/gurumi-bot.png b/images/gurumi-bot.png similarity index 100% rename from bedrock/gurumi-bot.png rename to images/gurumi-bot.png