Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Responses getting cut off and bot only replying to older messages when using custom instruction file on Claude API #255

Closed
joep1000 opened this issue Mar 25, 2024 · 2 comments

Comments

@joep1000
Copy link

Hi! I have been happily using your Discord bot and have noticed an issue with the bot's responses. The problem occurs when I ask the bot a question with the Claude API (claude-3-opus-20240229, but it happens with every variant of the claude models i've tried) and a custom instruction file. First, it provides a good response. However, when I ask a follow-up question, the bot's response gets cut off, and it seems to reply only to older messages instead of the most recent one and ignores your new request entirely. This does not occur when I use another API like gpt-4-turbo.

An example:
I ask the bot: "Is the ACER Nitro N50-650 Gaming PC - Intel® Core™ i5, RTX 4060, 1 TB SSD good for gaming and game development?"
Claude provides a good answer to this question.
I then ask a different question, but the bot's response is cut off, and it only replies to the older message about the gaming PC, even though the new question was sent successfully.
I think it's an issue with how the bot handles the conversation history or processes subsequent questions. The responses are getting truncated, and the bot is getting confused, replying to older messages instead of the most recent one. Might be related to the on_message event in the main.py file, specifically in how the responses are generated and sent back.

I have included some screenshots of what I mean.
First screenshot: good reply
Screenshot 2024-03-25 at 21 57 48

Second screenshot: old/bad reply to a different question that is related to the custom instructions file.

Screenshot 2024-03-25 at 21 57 56

Third screenshot: the correct reply that I specified in the custom instruction file after I asked the bot the same question a second time via claude.

Screenshot 2024-03-25 at 21 58 03
@joep1000
Copy link
Author

Screenshot 2024-03-25 at 22 03 09

The reply from Claude is also cut off at the end sometimes, as you can see here the discord emote specified in the custom instructions file is not completed by Claude

@mishl-dev
Copy link
Owner

discord message character limit i will try make it split the message and not cut of characters

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants