mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-13 09:12:38 +02:00
Fixed document-rag workspace problem (#866)
- Fixed document-rag workspace problem - OpenAI text-completion processor now puts 'not-set' in the token if no token is set (new OpenAI library requires it to be set to something. - Update tests
This commit is contained in:
parent
03cc5ac80f
commit
d282d72db1
7 changed files with 22 additions and 19 deletions
|
|
@ -27,7 +27,7 @@ CHUNK_CONTENT = {
|
|||
@pytest.fixture
|
||||
def mock_fetch_chunk():
|
||||
"""Create a mock fetch_chunk function"""
|
||||
async def fetch(chunk_id, user):
|
||||
async def fetch(chunk_id):
|
||||
return CHUNK_CONTENT.get(chunk_id, f"Content for {chunk_id}")
|
||||
return fetch
|
||||
|
||||
|
|
@ -203,7 +203,7 @@ class TestQuery:
|
|||
mock_rag.doc_embeddings_client = mock_doc_embeddings_client
|
||||
|
||||
# Mock fetch_chunk function
|
||||
async def mock_fetch(chunk_id, user):
|
||||
async def mock_fetch(chunk_id):
|
||||
return CHUNK_CONTENT.get(chunk_id, f"Content for {chunk_id}")
|
||||
mock_rag.fetch_chunk = mock_fetch
|
||||
|
||||
|
|
@ -361,7 +361,7 @@ class TestQuery:
|
|||
mock_rag.doc_embeddings_client = mock_doc_embeddings_client
|
||||
|
||||
# Mock fetch_chunk
|
||||
async def mock_fetch(chunk_id, user):
|
||||
async def mock_fetch(chunk_id):
|
||||
return CHUNK_CONTENT.get(chunk_id, f"Content for {chunk_id}")
|
||||
mock_rag.fetch_chunk = mock_fetch
|
||||
|
||||
|
|
@ -437,7 +437,7 @@ class TestQuery:
|
|||
mock_rag.embeddings_client = mock_embeddings_client
|
||||
mock_rag.doc_embeddings_client = mock_doc_embeddings_client
|
||||
|
||||
async def mock_fetch(chunk_id, user):
|
||||
async def mock_fetch(chunk_id):
|
||||
return f"Content for {chunk_id}"
|
||||
mock_rag.fetch_chunk = mock_fetch
|
||||
|
||||
|
|
@ -594,7 +594,7 @@ class TestQuery:
|
|||
mock_rag.embeddings_client = mock_embeddings_client
|
||||
mock_rag.doc_embeddings_client = mock_doc_embeddings_client
|
||||
|
||||
async def mock_fetch(chunk_id, user):
|
||||
async def mock_fetch(chunk_id):
|
||||
return CHUNK_CONTENT.get(chunk_id, f"Content for {chunk_id}")
|
||||
mock_rag.fetch_chunk = mock_fetch
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue