Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send error from chatgpt.SendMessage, add tgbot package, conversations management by chatGPT #43

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

dhilman
Copy link
Contributor

@dhilman dhilman commented Dec 8, 2022

Was initially planning on fixing sending of error from SendMessage only, but felt hesitant on growing the main function further so came the moving of things around.

Conversation management (i.e. mapping from chatID to conversationID and lastMessageID) felt heavily coupled to the chatgpt package, so have moved that there. This data (convoID & lastMessageID) is now not used in any other packages, so ChatResponse updated to only contain the Message.

A lot of logic in the main around sending a message through tgbotapi, similarly to other packages imo this deserved a thin wrapper package, exposing methods like: Send, SendAsLiveOutput.

Copy link
Owner

@m1guelpf m1guelpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! If you could just resolve the merge conflicts (we've since made the message edit debounce timing configurable), I'll be happy to merge!

@dhilman
Copy link
Contributor Author

dhilman commented Dec 9, 2022

thx @m1guelpf, all done, editInterval added to params of tgbot.New(...)

@m1guelpf m1guelpf merged commit 637019c into m1guelpf:main Dec 9, 2022
@m1guelpf
Copy link
Owner

m1guelpf commented Dec 9, 2022

Thank you for your contribution, @dhilman!

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

Successfully merging this pull request may close these issues.

None yet

2 participants