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

feat(plus): add AI Help backend #230

Merged
merged 49 commits into from
Jun 27, 2023
Merged

feat(plus): add AI Help backend #230

merged 49 commits into from
Jun 27, 2023

Conversation

fiji-flo
Copy link
Contributor

@fiji-flo fiji-flo commented Jun 2, 2023

Adding OpenAI and Supabase integration.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@fiji-flo fiji-flo marked this pull request as ready for review June 20, 2023 09:51
@caugner caugner requested a review from LeoMcA June 20, 2023 09:52
@caugner caugner changed the title [WIP]Chatone feat(plus): add AI Help backend Jun 20, 2023
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Nothing major, a few small things:

use crate::db::schema::ai_help_limits::*;
use crate::settings::SETTINGS;

pub const AI_HELP_LIMIT: i64 = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Should this perhaps also be a setting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to make it a settings once the setting isn't optional. I'd like to keep the lazy consts to minimal for now.

} else {
let current = create_or_increment_limit(&mut conn, &user)?;
if current.is_none() {
return Ok(Either::Right(HttpResponse::Ok().json(json!(null))));
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bigger decision on how we use status codes. I think right now we mostly use the payload to communicate.

Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

lgtm! 🚀

@caugner caugner merged commit 064dedd into main Jun 27, 2023
@caugner caugner deleted the chatone branch June 27, 2023 09:45
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.

3 participants