mirror of
https://github.com/syuilo/ai.git
synced 2025-04-20 17:46:42 +00:00
Compare commits
1 commit
00685a3ee9
...
89f8453070
Author | SHA1 | Date | |
---|---|---|---|
|
89f8453070 |
2 changed files with 1 additions and 3 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/yokomotod/mecab-ipadic-neologd.git \
|
&& git clone --depth 1 https://github.com/neologd/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,7 +33,6 @@ 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';
|
||||||
|
@ -124,7 +123,6 @@ 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