mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
PR review comments
This commit is contained in:
@@ -9,16 +9,13 @@ async def test_basic_process(event_loop):
|
||||
from reflector.settings import settings
|
||||
from reflector.llm.base import LLM
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
|
||||
# use an LLM test backend
|
||||
settings.LLM_BACKEND = "test"
|
||||
settings.TRANSCRIPT_BACKEND = "whisper"
|
||||
|
||||
class LLMTest(LLM):
|
||||
async def _generate(
|
||||
self, prompt: str, schema: Union[str | None], **kwargs
|
||||
) -> str:
|
||||
async def _generate(self, prompt: str, schema: str | None, **kwargs) -> str:
|
||||
return {
|
||||
"title": "TITLE",
|
||||
"summary": "SUMMARY",
|
||||
|
||||
@@ -7,7 +7,6 @@ import asyncio
|
||||
import json
|
||||
import threading
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@@ -62,7 +61,7 @@ async def dummy_llm():
|
||||
from reflector.llm.base import LLM
|
||||
|
||||
class TestLLM(LLM):
|
||||
async def _generate(self, prompt: str, schema: Union[str | None], **kwargs):
|
||||
async def _generate(self, prompt: str, schema: str | None, **kwargs):
|
||||
return json.dumps({"title": "LLM TITLE", "summary": "LLM SUMMARY"})
|
||||
|
||||
with patch("reflector.llm.base.LLM.get_instance") as mock_llm:
|
||||
|
||||
Reference in New Issue
Block a user