Skip to content

Commit 2d1f7ca

Browse files
authored
Fixed Record import from Qdrant not being in TYPE_CHECKING block (#791)
1 parent c062fb5 commit 2d1f7ca

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

paperqa/llms.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import annotations
2-
31
import asyncio
42
import itertools
53
import logging
@@ -32,13 +30,15 @@
3230
Field,
3331
model_validator,
3432
)
35-
from qdrant_client.http.models import Record
3633
from typing_extensions import override
3734

3835
from paperqa.types import Doc, Text
3936

4037
if TYPE_CHECKING:
38+
from qdrant_client.http.models import Record
39+
4140
from paperqa.docs import Docs
41+
4242
try:
4343
from qdrant_client import AsyncQdrantClient, models
4444

@@ -447,12 +447,12 @@ async def similarity_search(
447447
@classmethod
448448
async def load_docs(
449449
cls,
450-
client: AsyncQdrantClient,
450+
client: "AsyncQdrantClient",
451451
collection_name: str,
452452
vector_name: str | None = None,
453453
batch_size: int = 100,
454454
max_concurrent_requests: int = 5,
455-
) -> Docs:
455+
) -> "Docs":
456456
from paperqa.docs import Docs # Avoid circular imports
457457

458458
vectorstore = cls(

0 commit comments

Comments
 (0)