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

code clean #27

Merged
merged 10 commits into from
Mar 23, 2023
Merged

code clean #27

merged 10 commits into from
Mar 23, 2023

Conversation

swuecho
Copy link
Owner

@swuecho swuecho commented Mar 23, 2023

Summary by OpenAI

Release Notes

This pull request includes new features and code clean-up for the chat service API. Users can now get chat messages, create chat prompts and messages, and update message content. Additionally, a new error variable was added to handle invalid user ID errors, and a new function was added to extract user ID from context.

@swuecho
Copy link
Owner Author

swuecho commented Mar 23, 2023

🤖 OpenAI

Thank you for letting me participate in the code review.

The purpose of this pull request is to clean up the code and add new functionality to the chat service API. The changes include adding functions to get chat messages, create chat prompts and messages, and update message content. Additionally, a new error variable was added to handle invalid user ID errors, and a new function was added to extract user ID from context.

Here is a summary of the changes made to each file:

File Summary
api/chat_main_service.go Added functions to get chat messages, create chat prompts and messages, and update message content.
api/chat_message_service.go Added a blank line between two functions.
api/errors.go Added ErrInvalidUserID error variable to handle invalid user ID errors.
api/util.go Added a new function getUserID that extracts user ID from context and returns it as int32.

Overall, the changes seem to be well-organized and focused on improving the functionality of the chat service API.


Tips:

  • Reply on review comments left by this bot to ask follow-up questions.
    A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @openai in a reply.

@swuecho
Copy link
Owner Author

swuecho commented Mar 23, 2023

🤖 OpenAI

Reviewing existing code in: api/chat_message_service.go

The existing code in api/chat_message_service.go looks correct. No issues found.

api/chat_main_service.go Outdated Show resolved Hide resolved
api/util.go Show resolved Hide resolved
@swuecho swuecho merged commit 0f4c0ca into master Mar 23, 2023
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.

1 participant