mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-24 05:50:18 +00:00
update
This commit is contained in:
@@ -23,9 +23,9 @@ class InMemoryDocumentIndexer(DocumentIndexer):
|
||||
|
||||
for item in items:
|
||||
if item.id is None:
|
||||
id_ = uuid.uuid4()
|
||||
id_ = str(uuid.uuid4())
|
||||
item_ = item.copy()
|
||||
item_.id = str(id_)
|
||||
item_.id = id_
|
||||
else:
|
||||
item_ = item
|
||||
id_ = item.id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Test in memory indexer"""
|
||||
|
||||
from typing import Generator
|
||||
from typing import Generator, AsyncGenerator
|
||||
|
||||
import pytest
|
||||
from langchain_standard_tests.integration_tests.indexer import (
|
||||
@@ -23,5 +23,5 @@ class TestDocumentIndexerTestSuite(DocumentIndexerTestSuite):
|
||||
|
||||
class TestAsyncDocumentIndexerTestSuite(AsyncDocumentIndexerTestSuite):
|
||||
@pytest.fixture()
|
||||
async def indexer(self) -> Generator[AsyncDocumentIndexer, None, None]:
|
||||
async def indexer(self) -> AsyncGenerator[AsyncDocumentIndexer, None]:
|
||||
yield AsyncInMemoryDocumentIndexer()
|
||||
|
||||
Reference in New Issue
Block a user