Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Aug 28, 2024
1 parent f514af9 commit dd1713d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion radis/core/management/commands/add_custom_report.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand, CommandParser

from .populate_reports import create_report
from .populate_example_reports import create_report


class Command(BaseCommand):
Expand Down
9 changes: 4 additions & 5 deletions radis/subscriptions/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from django.conf import settings
from django.db.models import Prefetch, QuerySet

from radis.chats.utils.chat_client import AsyncChatClient
from radis.core.processors import AnalysisTaskProcessor
from radis.core.utils.chat_client import AsyncChatClient
from radis.reports.models import Language, Report
from radis.reports.models import Report

from .models import Answer, RagResult, SubscribedItem, SubscriptionQuestion, SubscriptionTask

Expand Down Expand Up @@ -49,7 +49,7 @@ async def process_report(
async with sem:
results: List[RagResult] = await asyncio.gather(
*[
self.process_yes_or_no_question(report.body, report.language, question, client)
self.process_yes_or_no_question(report.body, question, client)
async for question in questions
]
)
Expand All @@ -71,11 +71,10 @@ async def process_report(
async def process_yes_or_no_question(
self,
report_body: str,
language: Language,
question: SubscriptionQuestion,
client: AsyncChatClient,
) -> RagResult:
llm_answer = await client.ask_yes_no_question(report_body, language.code, question.question)
llm_answer = await client.ask_report_yes_no_question(report_body, question.question)

if llm_answer == "yes":
answer = Answer.YES
Expand Down

0 comments on commit dd1713d

Please sign in to comment.