mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-24 18:39:59 +00:00
chore: add mypy sentence transformers
Signed-off-by: Mustafa Elbehery <melbeher@redhat.com>
This commit is contained in:
parent
81ebaf6e9a
commit
ca1b5041a4
2 changed files with 3 additions and 4 deletions
|
|
@ -34,7 +34,7 @@ from .config import SentenceTransformersInferenceConfig
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SentenceTransformersInferenceImpl(
|
||||
class SentenceTransformersInferenceImpl( # type: ignore[misc] # Multiple inheritance from mixins creates MRO conflicts since sentence transformers don't actually support chat/completion operations
|
||||
OpenAIChatCompletionToLlamaStackMixin,
|
||||
OpenAICompletionToLlamaStackMixin,
|
||||
SentenceTransformerEmbeddingMixin,
|
||||
|
|
@ -59,7 +59,7 @@ class SentenceTransformersInferenceImpl(
|
|||
async def completion(
|
||||
self,
|
||||
model_id: str,
|
||||
content: str,
|
||||
content: InterleavedContent,
|
||||
sampling_params: SamplingParams | None = None,
|
||||
response_format: ResponseFormat | None = None,
|
||||
stream: bool | None = False,
|
||||
|
|
@ -72,10 +72,10 @@ class SentenceTransformersInferenceImpl(
|
|||
model_id: str,
|
||||
messages: list[Message],
|
||||
sampling_params: SamplingParams | None = None,
|
||||
response_format: ResponseFormat | None = None,
|
||||
tools: list[ToolDefinition] | None = None,
|
||||
tool_choice: ToolChoice | None = ToolChoice.auto,
|
||||
tool_prompt_format: ToolPromptFormat | None = None,
|
||||
response_format: ResponseFormat | None = None,
|
||||
stream: bool | None = False,
|
||||
logprobs: LogProbConfig | None = None,
|
||||
tool_config: ToolConfig | None = None,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue