Skip to content

Commit

Permalink
Fixed Record import from Qdrant not being in TYPE_CHECKING block (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbraza authored Jan 6, 2025
1 parent c062fb5 commit 2d1f7ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions paperqa/llms.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

import asyncio
import itertools
import logging
Expand Down Expand Up @@ -32,13 +30,15 @@
Field,
model_validator,
)
from qdrant_client.http.models import Record
from typing_extensions import override

from paperqa.types import Doc, Text

if TYPE_CHECKING:
from qdrant_client.http.models import Record

from paperqa.docs import Docs

try:
from qdrant_client import AsyncQdrantClient, models

Expand Down Expand Up @@ -447,12 +447,12 @@ async def similarity_search(
@classmethod
async def load_docs(
cls,
client: AsyncQdrantClient,
client: "AsyncQdrantClient",
collection_name: str,
vector_name: str | None = None,
batch_size: int = 100,
max_concurrent_requests: int = 5,
) -> Docs:
) -> "Docs":
from paperqa.docs import Docs # Avoid circular imports

vectorstore = cls(
Expand Down

0 comments on commit 2d1f7ca

Please sign in to comment.