mirror of
https://github.com/syuilo/ai.git
synced 2025-04-20 09:36:43 +00:00
Compare commits
13 commits
89f8453070
...
00685a3ee9
Author | SHA1 | Date | |
---|---|---|---|
|
00685a3ee9 | ||
|
a0bd760290 | ||
|
95b5e5e702 | ||
|
ed3f60cb41 | ||
|
dc6cba5ba0 | ||
|
43cc2457b5 | ||
|
3056d0ead5 | ||
|
c545a3045c | ||
|
c30659e526 | ||
|
47e17052c5 | ||
|
4d15516787 | ||
|
1ebf2c7d37 | ||
|
371c083d6a |
2 changed files with 3 additions and 1 deletions
|
@ -9,7 +9,7 @@ RUN if [ $enable_mecab -ne 0 ]; then apt-get update \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt-get/lists/* \
|
&& rm -rf /var/lib/apt-get/lists/* \
|
||||||
&& cd /opt \
|
&& 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 \
|
&& cd /opt/mecab-ipadic-neologd \
|
||||||
&& ./bin/install-mecab-ipadic-neologd -n -y \
|
&& ./bin/install-mecab-ipadic-neologd -n -y \
|
||||||
&& rm -rf /opt/mecab-ipadic-neologd \
|
&& rm -rf /opt/mecab-ipadic-neologd \
|
||||||
|
|
|
@ -33,6 +33,7 @@ type AiChatHist = {
|
||||||
const KIGO = '&';
|
const KIGO = '&';
|
||||||
const TYPE_GEMINI = 'gemini';
|
const TYPE_GEMINI = 'gemini';
|
||||||
const TYPE_PLAMO = 'plamo';
|
const TYPE_PLAMO = 'plamo';
|
||||||
|
|
||||||
const GEMINI_15_FLASH_API = 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent';
|
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 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';
|
const PLAMO_API = 'https://platform.preferredai.jp/api/completion/v1/chat/completions';
|
||||||
|
@ -123,6 +124,7 @@ export default class extends Module {
|
||||||
try {
|
try {
|
||||||
res_data = await got.post(options,
|
res_data = await got.post(options,
|
||||||
{parseJson: (res: string) => JSON.parse(res)}).json();
|
{parseJson: (res: string) => JSON.parse(res)}).json();
|
||||||
|
{parseJson: res => JSON.parse(res)}).json();
|
||||||
this.log(JSON.stringify(res_data));
|
this.log(JSON.stringify(res_data));
|
||||||
if (res_data.hasOwnProperty('candidates')) {
|
if (res_data.hasOwnProperty('candidates')) {
|
||||||
if (res_data.candidates.length > 0) {
|
if (res_data.candidates.length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue