Skip to content

Commit

Permalink
Merge pull request #9 from nalbam/main
Browse files Browse the repository at this point in the history
fix chat_update bug
  • Loading branch information
nalbam authored Jun 17, 2024
2 parents 506a96b + 6ec1d6e commit 2791c14
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion bedrock/invoke_claude_3_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
File renamed without changes

0 comments on commit 2791c14

Please sign in to comment.