refactor: Refactor proxy LLM (#1064)

This commit is contained in:
Fangyin Cheng
2024-01-14 21:01:37 +08:00
committed by GitHub
parent a035433170
commit 22bfd01c4b
95 changed files with 2049 additions and 1294 deletions

View File

@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock, mock_open, patch
import pytest
from dbgpt.rag.knowledge.csv import CSVKnowledge
MOCK_CSV_DATA = "id,name,age\n1,John Doe,30\n2,Jane Smith,25\n3,Bob Johnson,40"

View File

@@ -1,6 +1,7 @@
import pytest
from unittest.mock import MagicMock, patch
import pytest
from dbgpt.rag.knowledge.docx import DocxKnowledge

View File

@@ -1,6 +1,7 @@
import pytest
from unittest.mock import mock_open, patch
import pytest
from dbgpt.rag.knowledge.html import HTMLKnowledge
MOCK_HTML_CONTENT = b"""

View File

@@ -1,6 +1,7 @@
import pytest
from unittest.mock import mock_open, patch
import pytest
from dbgpt.rag.knowledge.markdown import MarkdownKnowledge
MOCK_MARKDOWN_DATA = """# Header 1

View File

@@ -1,5 +1,6 @@
from unittest.mock import MagicMock, mock_open, patch
import pytest
from unittest.mock import MagicMock, patch, mock_open
from dbgpt.rag.knowledge.pdf import PDFKnowledge

View File

@@ -1,6 +1,7 @@
import pytest
from unittest.mock import mock_open, patch
import pytest
from dbgpt.rag.knowledge.txt import TXTKnowledge
MOCK_TXT_CONTENT = b"Sample text content for testing.\nAnother line of text."