Skip to content

Commit

Permalink
Introduce GPT-4 support and increase AnkiGPT Plus price. (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored Jan 2, 2024
1 parent 61f391b commit fe7f8a9
Show file tree
Hide file tree
Showing 42 changed files with 1,200 additions and 299 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ https://github.com/nilsreichardt/ankigpt/assets/24459435/853dee68-d634-48e4-93fe
## Features

- 📁 Upload PDF slides or insert text
- 🧠 Generate flashcards up to 150 [Anki](https://apps.ankiweb.net/) flashcards with one click
- 🧠 Generate flashcards up to 150 [Anki](https://apps.ankiweb.net/) flashcards with one click using GPT-3.5 or GPT-4 by OpenAI
- 📤 Export generated flashcards by GPT (ChatGPT) to [Anki](https://apps.ankiweb.net/) with CSV file
- ✏️ Edit flashcards, in case you want to change something
- 🗑️ Delete flashcards, in case GPT (ChatGPT) generated something wrong or useless card
Expand All @@ -36,7 +36,7 @@ AnkiGPT is designed to be a globally accessible tool, and as such, it supports n

### Which model is used for AnkiGPT?

AnkiGPT uses as underlaying AI model GPT-3.5 by OpenAI.
AnkiGPT primarily utilizes the GPT-3.5 by OpenAI model to generate flashcards, offering a seamless integration of advanced AI technology for effective learning. For users who opt for the AnkiGPT Plus version, they gain the enhanced capability to generate up to 150 flashcards per month using the more advanced [GPT-4 model](https://openai.com/gpt-4), ensuring even more sophisticated and nuanced content creation.

### Is the content from my submitted lecture slides used for AI training?

Expand Down
2 changes: 2 additions & 0 deletions lib/src/infrastructure/session_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SessionRepository {
Future<SessionId> startSession({
required Input input,
required int numberOfCards,
required String model,
required SessionId? sessionId,
}) async {
final result = await functions
Expand All @@ -36,6 +37,7 @@ class SessionRepository {
'input': input.toJson(),
'sessionId': sessionId,
'numberOfCards': numberOfCards,
'model': model,
}
});
return result.data['id'];
Expand Down
13 changes: 13 additions & 0 deletions lib/src/models/app_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AppUser with _$AppUser {
@Default(Usage(
generatedCardsCurrentMonth: 0,
generatedMnemonicsCurrentMonth: 0,
generatedCardsCurrentMonthByModel: UsagePerMonthPerModel(),
))
Usage usage,
}) = _AppUser;
Expand All @@ -37,7 +38,19 @@ class Usage with _$Usage {
const factory Usage({
@Default(0) int generatedCardsCurrentMonth,
@Default(0) int generatedMnemonicsCurrentMonth,
@Default(UsagePerMonthPerModel())
UsagePerMonthPerModel generatedCardsCurrentMonthByModel,
}) = _Usage;

factory Usage.fromJson(Map<String, dynamic> json) => _$UsageFromJson(json);
}

@freezed
class UsagePerMonthPerModel with _$UsagePerMonthPerModel {
const factory UsagePerMonthPerModel({
@JsonKey(name: 'gpt-4') @Default(0) int gpt4,
}) = _UsagePerMonthPerModel;

factory UsagePerMonthPerModel.fromJson(Map<String, dynamic> json) =>
_$UsagePerMonthPerModelFromJson(json);
}
212 changes: 202 additions & 10 deletions lib/src/models/app_user.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fe7f8a9

Please sign in to comment.