Compare commits

...

12 commits

Author SHA1 Message Date
tetsuya-ki
a0bd760290
Merge branch 'master' into feat-aichat-at-20250102 2025-01-03 10:46:33 +09:00
tetsuya-ki
95b5e5e702 aichatの文字列置換を正規表現に変更 2024-09-16 16:27:33 +09:00
tetsuya-ki
ed3f60cb41 README.mdにPLaMoについて記載 2024-08-22 09:55:25 +09:00
tetsuya-ki
dc6cba5ba0
Merge pull request #6 from tetsuya-ki/enhance-aichat-add-geminipro1.5
Enhance aichat add geminipro1.5
2024-08-22 09:49:31 +09:00
tetsuya-ki
43cc2457b5 fix #5 2024-08-22 09:47:32 +09:00
tetsuya-ki
3056d0ead5 fix #4 2024-08-22 09:44:26 +09:00
tetsuya-ki
c545a3045c fix #2 2024-08-22 09:34:49 +09:00
tetsuya-ki
c30659e526 enhance: aichat機能(画像対応) 2024-03-08 23:25:17 +09:00
tetsuya-ki
47e17052c5 Feat: aichat機能
* 現時点ではGemini APIのみ対応
2024-03-03 12:24:33 +09:00
tetsuya-ki
4d15516787 Merge remote-tracking branch 'upstream/master' 2024-02-25 17:29:00 +09:00
tetsuya-k
1ebf2c7d37 カスタム絵文字チェックモジュールの修正
- README.mdやtorisetu.mdに記載
- カスタム絵文字投稿をまとめる設定を追加(checkEmojisAtOnce)
2024-01-08 13:18:11 +09:00
tetsuya-k
371c083d6a カスタム絵文字チェックモジュールの追加 2023-10-25 18:56:28 +09:00
2 changed files with 3 additions and 1 deletions

View file

@ -9,7 +9,7 @@ RUN if [ $enable_mecab -ne 0 ]; then apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt-get/lists/* \
&& cd /opt \
&& git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git \
&& git clone --depth 1 https://github.com/yokomotod/mecab-ipadic-neologd.git \
&& cd /opt/mecab-ipadic-neologd \
&& ./bin/install-mecab-ipadic-neologd -n -y \
&& rm -rf /opt/mecab-ipadic-neologd \

View file

@ -33,6 +33,7 @@ type AiChatHist = {
const KIGO = '&';
const TYPE_GEMINI = 'gemini';
const TYPE_PLAMO = 'plamo';
const GEMINI_15_FLASH_API = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent';
const GEMINI_15_PRO_API = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent';
const PLAMO_API = 'https://platform.preferredai.jp/api/completion/v1/chat/completions';
@ -123,6 +124,7 @@ export default class extends Module {
try {
res_data = await got.post(options,
{parseJson: (res: string) => JSON.parse(res)}).json();
{parseJson: res => JSON.parse(res)}).json();
this.log(JSON.stringify(res_data));
if (res_data.hasOwnProperty('candidates')) {
if (res_data.candidates.length > 0) {