Coverage for src/qdrant_loader_core/llm/types.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-09-11 07:16 +0000

1from __future__ import annotations 

2 

3from typing import Any, Protocol, runtime_checkable 

4 

5 

6@runtime_checkable 

7class EmbeddingsClient(Protocol): 

8 async def embed(self, inputs: list[str]) -> list[list[float]]: ... 

9 

10 

11@runtime_checkable 

12class ChatClient(Protocol): 

13 async def chat( 

14 self, messages: list[dict[str, Any]], **kwargs: Any 

15 ) -> dict[str, Any]: ... 

16 

17 

18@runtime_checkable 

19class TokenCounter(Protocol): 

20 def count(self, text: str) -> int: ... 

21 

22 

23@runtime_checkable 

24class LLMProvider(Protocol): 

25 def embeddings(self) -> EmbeddingsClient: ... 

26 

27 def chat(self) -> ChatClient: ... 

28 

29 def tokenizer(self) -> TokenCounter: ...