Browse Source

#37 nizika_ai 最新版に対応

ai-migration
みてるぞ 1 week ago
parent
commit
11c2f0c0d4
2 changed files with 3 additions and 4 deletions
  1. +2
    -3
      main.py
  2. +1
    -1
      nizika_ai

+ 2
- 3
main.py View File

@@ -30,8 +30,7 @@ from pytchat.processors.default.processor import Chat
from aques import Aques from aques import Aques
from common_module import CommonModule from common_module import CommonModule
from nizika_ai.config import DB from nizika_ai.config import DB
from nizika_ai.consts import (AnswerType, Character, GPTModel, Platform,
QueryType)
from nizika_ai.consts import Character, GPTModel, Platform, QueryType
from nizika_ai.models import Answer, AnsweredFlag, Query, User from nizika_ai.models import Answer, AnsweredFlag, Query, User


pygame.init () pygame.init ()
@@ -71,7 +70,7 @@ def main (
if answer_flags: if answer_flags:
answer_flag = random.choice (answer_flags) answer_flag = random.choice (answer_flags)
answer = Answer.find (answer_flag.answer_id) answer = Answer.find (answer_flag.answer_id)
if answer.answer_type == AnswerType.YOUTUBE_REPLY.value:
if answer.query_ref.query_type == QueryType.YOUTUBE_COMMENT.value:
query = Query.find (answer.query_id) query = Query.find (answer.query_id)
deerjika.talk (query.content, answer.content) deerjika.talk (query.content, answer.content)
answer_flag.answered = True answer_flag.answered = True


+ 1
- 1
nizika_ai

@@ -1 +1 @@
Subproject commit 9e136a7cb3baf97b384a07c4af31205d745e7200
Subproject commit 3be6d9063c987deaceee24a1d16296d21319778c

Loading…
Cancel
Save