Skip to content

Commit

Permalink
docs: change log
Browse files Browse the repository at this point in the history
n
  • Loading branch information
zmhu committed Dec 24, 2023
1 parent e8c2bc8 commit 4059104
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 13 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ Geek Chat is a cross-platform AI Client that supports MacOS, Windows, iPhone, iP
- [x] Multi Language support (English, 简体中文, 繁體中文, Русский, 日本語).
- [x] Prompt Library
- [x] Azure OpenAI API compatibility
- [x] Support Google Gemini AI
- [x] Gemini-pro model
- [ ] Gemini-pro-vision *coming soon*
- [ ] DALL-E3
- [x] Create image
- [ ] Create image edit
Expand Down
3 changes: 3 additions & 0 deletions docs/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Geek Chat是一个跨平台的AI客户端,支持MacOS、Windows、iPhone、iPa
- [x] 支持多语言 (English, 简体中文, 繁體中文, Русский, 日本語).
- [x] 提示词库
- [x] 与Azure OpenAI API兼容
- [x] 支持谷歌 Gemini AI
- [x] Gemini-pro 模型
- [x] Gemini-pro-vision *即将推出*
- [ ] DALL-E3
- [x] Create image
- [ ] Create image edit
Expand Down
3 changes: 3 additions & 0 deletions docs/README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Geek ChatはクロスプラットフォームのAIクライアントで、MacOS
- [x] 多言語サポート (English, 简体中文, 繁體中文, Русский) 。
- [x] ヒントワードライブラリ
- [x] Azure OpenAI APIと互換性あり
- [x] Google Gemini AI をサポート
- [x] Gemini-pro モデル
- [x] Gemini-pro-vision *近日公開*
- [ ] DALL-E3
- [x] 画像を作成する
- [ ] 画像編集を作成する
Expand Down
3 changes: 3 additions & 0 deletions docs/README_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ Geek Chat - это кросс-платформенный AI-клиент, под
- [x] Поддержка нескольких языков (English, 简体中文, 繁體中文, Русский, 日本語).
- [x] Библиотека предложений
- [x] Совместимость с API Azure OpenAI
- [x] Поддержка искусственного интеллекта Google Gemini
- [x] Модель Gemini-pro
- [x] Gemini-pro-vision *скоро*
- [ ] DALL-E3
- [x] Создать изображение
- [ ] Создать редакцию изображения
Expand Down
30 changes: 17 additions & 13 deletions lib/util/input_submit_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,18 @@ class InputSubmitUtil {
Map<String, String>? headers;
String? baseUrl;

MessageModel targetMessage = MessageModel(
msgId: const Uuid().v4(),
role: MessageRole.assistant.name,
content: "",
sId: chatSessionController.currentSession.sid,
model: chatSessionController.currentSession.model,
msgType: 1,
synced: false,
updated: getCurrentDateTime() + 1,
generating: false,
);

if (settingsServerController.defaultServer.provider == "geekerchat") {
headers = {
"Authorization":
Expand Down Expand Up @@ -460,25 +472,17 @@ class InputSubmitUtil {
logger.d("result: $result");
logger.d(result.generations);
// GoogleAIClient(apiKey: settingsServerController.defaultServer.apiKey);
MessageModel targetMessage = MessageModel(
msgId: const Uuid().v4(),
role: MessageRole.assistant.name,
content: "",
sId: chatSessionController.currentSession.sid,
model: chatSessionController.currentSession.model,
msgType: 1,
synced: false,
updated: getCurrentDateTime() + 1,
generating: false,
);

targetMessage.content = result.generations.first.outputAsString;
} on Exception catch (e) {
logger.e("submit google model error: $e");
targetMessage.content = e.toString();
} finally {
chatMessageController.addMessage(userMessage);
chatMessageController.addMessage(targetMessage);
chatMessageController.saveMessage(userMessage);
chatMessageController.saveMessage(targetMessage);
chatMessageController.update();
} on Exception catch (e) {
logger.e("submit google model error: $e");
}
}

Expand Down

0 comments on commit 4059104

Please sign in to comment.