Skip to content

Commit

Permalink
Merge branch 'release/2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
iHTCboy committed Apr 3, 2023
2 parents 61cee77 + 2e5c364 commit bf51ee1
Show file tree
Hide file tree
Showing 13 changed files with 351 additions and 70 deletions.
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,13 @@ OpenAI ChatGPT app for iOS, iPadOS, macoS
#### 更新说明

最新版本 v2.3
- Create new conversations.(创建新的对话)
- Save conversation records.(保存对话记录)
- Toggle history conversations.(切换历史对话)
- Support multi-line text input.(创建新的对话)
- scroll to the top of the conversation list.(滚动到对话列表的顶部)
- Automatically scroll to the bottom of the conversation list.(自动滚动到对话列表的底部)
- Conversations can be recorded without context (Click the icon on the left of the input box to switch).(请求时可不带历史对话记录(点击输入框左边图标切换))

v2.2:
- Increased request timeout from 30 seconds to 60 seconds.(请求超时从 30 秒增加到 60 秒。)
- When sending dialog context, only send the first three Q&A rounds, and submit only the first 100 characters of the answer.(发送对话上下文时,只发送提问的前三轮问答,且答案只提交前100个字。)
- Fixed Chinese Pinyin input method typing interruption problem (thanks to @ypwhs/@coder-free/@0xfeedface1993).(修复中文拼音输入法打字中断的问题(感谢 @ypwhs@coder-free@0xfeedface1993))

v2.1:
- support GPT-4 Model(支持 GPT-4 模型)
- support English language(支持英文语言)
- display configured API Key(显示已配置的 API Key)


v2.0:
- support OpenAI API key
- base GPT3.5 Turbo

> 注意:需要填写自己的 OpenAI API key,app 不提供 key!
- Create new conversation. (创建新的对话)
- Save conversation records. (保存对话记录)
- Switch to historical conversations. (切换历史对话)
- Scroll to the top of the conversation list. (滚动到对话列表的顶部)
- Auto-scroll to the bottom of the conversation list. (自动滚动到对话列表的底部)
- Option to request conversations without historical records (click on the icon on the left side of the input box to toggle). (请求时可不带历史对话记录)
- Support for additional languages (Traditional Chinese, Korean, Japanese, French, German, Russian, etc.). (支持更多语言(繁体中文、韩文、日文、法语、德语、俄语等))

**支持功能**

Expand All @@ -55,7 +38,7 @@ v2.0:
* ~~显示个人头像~~
* ~~请求失败重试等~~
* ~~支持多语言,如英文~~
* 保存对话
* ~~保存对话~~
* 代码没有高亮
* 悬浮窗模式
* 保存 pdf 文件
Expand Down Expand Up @@ -116,6 +99,25 @@ TestFlight 下载地址:[https://testflight.apple.com/join/GR4BOt2M](https://t
- [New Issue](https://github.com/37iOS/iChatGPT/issues/new/choose)


#### 3.4 历史更新功能

v2.2:
- Increased request timeout from 30 seconds to 60 seconds.(请求超时从 30 秒增加到 60 秒。)
- When sending dialog context, only send the first three Q&A rounds, and submit only the first 100 characters of the answer.(发送对话上下文时,只发送提问的前三轮问答,且答案只提交前100个字。)
- Fixed Chinese Pinyin input method typing interruption problem (thanks to @ypwhs/@coder-free/@0xfeedface1993).(修复中文拼音输入法打字中断的问题(感谢 @ypwhs@coder-free@0xfeedface1993))

v2.1:
- support GPT-4 Model(支持 GPT-4 模型)
- support English language(支持英文语言)
- display configured API Key(显示已配置的 API Key)


v2.0:
- support OpenAI API key
- base GPT3.5 Turbo

> 注意:需要填写自己的 OpenAI API key,app 不提供 key!
### 四、Contributors

* [@iHTCboy](https://github.com/iHTCboy)
Expand Down
24 changes: 22 additions & 2 deletions iChatGPT.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
/* Begin PBXFileReference section */
6D37A73C29C6D76800EF1F7B /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = "<group>"; };
6D37A73E29C6D76B00EF1F7B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
6D4D38A529DA746700505FE3 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Localizable.strings"; sourceTree = "<group>"; };
6D4D38A629DA754A00505FE3 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/Localizable.strings; sourceTree = "<group>"; };
6D4D38A729DA755100505FE3 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/Localizable.strings; sourceTree = "<group>"; };
6D4D38A829DA765E00505FE3 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
6D4D38A929DA767100505FE3 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
6D4D38AA29DA767B00505FE3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
6D5C55682944317300FCF891 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6D5C556A2944408700FCF891 /* ImageLoaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageLoaderView.swift; sourceTree = "<group>"; };
6D7C1A202945809C008EB1CA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
Expand Down Expand Up @@ -308,6 +314,12 @@
"zh-Hans",
en,
Base,
"zh-Hant",
ja,
ko,
fr,
ru,
de,
);
mainGroup = 6DC88AD12942C8AD00DA6C55;
packageReferences = (
Expand Down Expand Up @@ -417,6 +429,12 @@
children = (
6D37A73C29C6D76800EF1F7B /* zh-Hans */,
6D37A73E29C6D76B00EF1F7B /* en */,
6D4D38A529DA746700505FE3 /* zh-Hant */,
6D4D38A629DA754A00505FE3 /* ja */,
6D4D38A729DA755100505FE3 /* ko */,
6D4D38A829DA765E00505FE3 /* fr */,
6D4D38A929DA767100505FE3 /* ru */,
6D4D38AA29DA767B00505FE3 /* de */,
);
name = Localizable.strings;
sourceTree = "<group>";
Expand Down Expand Up @@ -549,8 +567,9 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2023.4.22;
CURRENT_PROJECT_VERSION = 2023.4.03;
DEVELOPMENT_ASSET_PATHS = "\"iChatGPT/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -588,8 +607,9 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2023.4.22;
CURRENT_PROJECT_VERSION = 2023.4.03;
DEVELOPMENT_ASSET_PATHS = "\"iChatGPT/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
Expand Down
18 changes: 9 additions & 9 deletions iChatGPT/AIChatView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ extension AIChatView {

func CreateNewChatRoom() -> Alert {
Alert(
title: Text("打开一个新的对话"),
message: Text("当前的对话记录将会保存和关闭,并创建一个新的聊天对话。"),
primaryButton: .default(Text("创建")) {
title: Text("Open a new conversation".localized()),
message: Text("The current chat log will be saved and closed, and a new chat session will be created.".localized()),
primaryButton: .default(Text("Create".localized())) {
chatModel.resetRoom(nil)
},
secondaryButton: .cancel()
Expand All @@ -157,9 +157,9 @@ extension AIChatView {

func ReloadLastQuestion() -> Alert {
Alert(
title: Text("重新提问"),
message: Text("重新请求最后一个问题。"),
primaryButton: .default(Text("确定")) {
title: Text("Re-ask".localized()),
message: Text("Re-request the last question.".localized()),
primaryButton: .default(Text("OK".localized())) {
if let issue = chatModel.contents.last?.issue {
chatModel.getChatResponse(prompt: issue)
}
Expand All @@ -170,9 +170,9 @@ extension AIChatView {

func ClearAllQuestion() -> Alert {
Alert(
title: Text("清空当前对话"),
message: Text("清空当前对话和删除保存的对话记录。"),
primaryButton: .destructive(Text("清空")) {
title: Text("Clear current conversation".localized()),
message: Text("Clears the current conversation and deletes the saved conversation history.".localized()),
primaryButton: .destructive(Text("Clear".localized())) {
chatModel.contents.removeAll()
},
secondaryButton: .cancel()
Expand Down
63 changes: 31 additions & 32 deletions iChatGPT/ChatHistoryListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ struct ChatHistoryListView: View {
}
.alert(isPresented: $showingDeleteAlert) {
Alert(
title: Text("Delete Chat"),
message: Text("Are you sure you want to delete this chat?"),
primaryButton: .destructive(Text("Delete")) {
title: Text("Delete Chat".localized()),
message: Text("Are you sure you want to delete this chat?".localized()),
primaryButton: .destructive(Text("Delete".localized())) {
if let item = itemToDelete {
deleteChat(item: item)
}
Expand All @@ -38,7 +38,7 @@ struct ChatHistoryListView: View {
)
}
.listStyle(PlainListStyle())
.navigationTitle("Chat History")
.navigationTitle("Chat History".localized())
.toolbar {
Button(action: onCloseButtonTapped) {
Image(systemName: "xmark.circle").imageScale(.large)
Expand All @@ -57,7 +57,7 @@ struct ChatHistoryListView: View {
itemToDelete = item
showingDeleteAlert = true
} label: {
Label("Delete", systemImage: "trash")
Label("Delete".localized(), systemImage: "trash")
}
.tint(.red)
}
Expand All @@ -81,34 +81,33 @@ struct ChatHistoryListView: View {
.padding(.trailing, 10)

VStack(alignment: .leading) {
Text(item.roomID.formatTimestamp())
.font(.headline)
.padding(.bottom, 5)

Text(ChatMessageStore.shared.lastMessage(item.roomID)?.issue ?? "无对话记录")
.font(.subheadline)
.foregroundColor(.gray)
}

Spacer()

VStack(alignment: .trailing) {

Spacer().height(10)

Text(" \(ChatMessageStore.shared.messages(forRoom: item.roomID).count) ")
.font(.footnote)
.foregroundColor(.white)
.padding(5)
.background(Color.blue.opacity(0.8))
.clipShape(Capsule())

Spacer()

HStack() {
Text(item.roomID.formatTimestamp())
.font(.headline)

Spacer()

Text(" \(ChatMessageStore.shared.messages(forRoom: item.roomID).count) ")
.font(.footnote)
.foregroundColor(.white)
.padding(5)
.background(Color.blue.opacity(0.8))
.clipShape(Capsule())
}
.padding(.bottom, 5)

Text(ChatMessageStore.shared.lastMessage(item.roomID)?.datetime ?? "")
.font(.caption)
.foregroundColor(.gray)
.padding(.bottom, 5)
HStack() {
Text(ChatMessageStore.shared.lastMessage(item.roomID)?.issue ?? "No conversations".localized())
.font(.subheadline)
.foregroundColor(.gray)

Spacer()

Text(ChatMessageStore.shared.lastMessage(item.roomID)?.datetime ?? "")
.font(.caption)
.foregroundColor(.gray)
}
}
}
.contentShape(Rectangle())
Expand Down
4 changes: 2 additions & 2 deletions iChatGPT/ChatRoomConfigView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ struct ChatRoomConfigView: View {
var body: some View {
NavigationView {
VStack {
Text("Coming soon..").font(.title2)
Text("Coming soon..".localized()).font(.title2)
}
.navigationTitle("Room Settings")
.navigationTitle("Room Settings".localized())
.toolbar {
Button(action: onCloseButtonTapped) {
Image(systemName: "xmark.circle").imageScale(.large)
Expand Down
38 changes: 38 additions & 0 deletions iChatGPT/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Localizable.strings
iChatGPT

Created by HTC on 2023/3/19.
Copyright © 2023 37 Mobile Games. All rights reserved.
*/

"Loading.." = "Laden..";
"Just ask.." = "Fragen Sie einfach..";
"Re-question" = "Frage erneut stellen";
"Copy Question" = "Frage kopieren";
"Copy Answer" = "Antwort kopieren";
"Copy Question and Answer" = "Frage und Antwort kopieren";
"Copy Question to Inputbox" = "Frage in Eingabefeld kopieren";
"Delete Question" = "Frage löschen";
"Delete All" = "Alle löschen";
"Settings" = "Einstellungen";
"Please enter OpenAI Key" = "Bitte geben Sie den OpenAI-Schlüssel ein";
"OpenAI Key cannot be empty" = "OpenAI-Schlüssel darf nicht leer sein";
"Save Key" = "Schlüssel speichern";
"Developer: 37 Mobile iOS Tech Team\nGitHub: https://github.com/37iOS/iChatGPT" = "Entwickler: 37 Mobile iOS Tech Team\nGitHub: https://github.com/37iOS/iChatGPT";
"Open a new conversation" = "Ein neues Gespräch öffnen";
"The current chat log will be saved and closed, and a new chat session will be created." = "Das aktuelle Chat-Protokoll wird gespeichert und geschlossen, und eine neue Chat-Sitzung wird erstellt.";
"Create" = "Erstellen";
"Re-ask" = "Erneut fragen";
"Re-request the last question." = "Die letzte Frage erneut anfordern.";
"OK" = "OK";
"Clear current conversation" = "Aktuelles Gespräch löschen";
"Clears the current conversation and deletes the saved conversation history." = "Löscht das aktuelle Gespräch und löscht den gespeicherten Gesprächsverlauf.";
"Clear" = "Löschen";
"No conversations" = "Keine Gespräche";
"Delete Chat" = "Chat löschen";
"Are you sure you want to delete this chat?" = "Möchten Sie diesen Chat wirklich löschen?";
"Delete" = "Löschen";
"Chat History" = "Chat-Verlauf";
"Coming soon.." = "In Kürze verfügbar..";
"Room Settings" = "Raumeinstellungen";
16 changes: 16 additions & 0 deletions iChatGPT/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,19 @@
"OpenAI Key cannot be empty" = "OpenAI Key cannot be empty";
"Save Key" = "Save Key";
"Developer: 37 Mobile iOS Tech Team\nGitHub: https://github.com/37iOS/iChatGPT" = "Developer: 37 Mobile iOS Tech Team\nGitHub: https://github.com/37iOS/iChatGPT";
"Open a new conversation" = "Open a new conversation";
"The current chat log will be saved and closed, and a new chat session will be created." = "The current chat log will be saved and closed, and a new chat session will be created.";
"Create" = "Create";
"Re-ask" = "Re-ask";
"Re-request the last question." = "Re-request the last question.";
"OK" = "OK";
"Clear current conversation" = "Clear current conversation";
"Clears the current conversation and deletes the saved conversation history." = "Clears the current conversation and deletes the saved conversation history.";
"Clear" = "Clear";
"No conversations" = "No conversations";
"Delete Chat" = "Delete Chat";
"Are you sure you want to delete this chat?" = "Are you sure you want to delete this chat?";
"Delete" = "Delete";
"Chat History" = "Chat History";
"Coming soon.." = "Coming soon..";
"Room Settings" = "Room Settings";
38 changes: 38 additions & 0 deletions iChatGPT/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
Localizable.strings
iChatGPT

Created by HTC on 2023/3/19.
Copyright © 2023 37 Mobile Games. All rights reserved.
*/

"Loading.." = "Chargement..";
"Just ask.." = "Demandez simplement..";
"Re-question" = "Reposer la question";
"Copy Question" = "Copier la question";
"Copy Answer" = "Copier la réponse";
"Copy Question and Answer" = "Copier la question et la réponse";
"Copy Question to Inputbox" = "Copier la question dans la zone de saisie";
"Delete Question" = "Supprimer la question";
"Delete All" = "Tout supprimer";
"Settings" = "Paramètres";
"Please enter OpenAI Key" = "Veuillez entrer la clé OpenAI";
"OpenAI Key cannot be empty" = "La clé OpenAI ne peut pas être vide";
"Save Key" = "Enregistrer la clé";
"Developer: 37 Mobile iOS Tech Team\nGitHub: https://github.com/37iOS/iChatGPT" = "Développeur : 37 Mobile iOS Tech Team\nGitHub : https://github.com/37iOS/iChatGPT";
"Open a new conversation" = "Ouvrir une nouvelle conversation";
"The current chat log will be saved and closed, and a new chat session will be created." = "Le journal de chat actuel sera enregistré et fermé, et une nouvelle session de chat sera créée.";
"Create" = "Créer";
"Re-ask" = "Redemander";
"Re-request the last question." = "Re-demandez la dernière question.";
"OK" = "OK";
"Clear current conversation" = "Effacer la conversation en cours";
"Clears the current conversation and deletes the saved conversation history." = "Efface la conversation en cours et supprime l'historique des conversations enregistrées.";
"Clear" = "Effacer";
"No conversations" = "Aucune conversation";
"Delete Chat" = "Supprimer le chat";
"Are you sure you want to delete this chat?" = "Êtes-vous sûr de vouloir supprimer ce chat ?";
"Delete" = "Supprimer";
"Chat History" = "Historique du chat";
"Coming soon.." = "Bientôt disponible..";
"Room Settings" = "Paramètres de la salle";
Loading

0 comments on commit bf51ee1

Please sign in to comment.