From 73cb3689001507be5e7a7b13aa2fda7248fab49f Mon Sep 17 00:00:00 2001 From: sarthakdeshpande Date: Sun, 9 Mar 2025 17:42:46 +0530 Subject: [PATCH] chore: pre-commit changes --- llama_stack/providers/inline/vector_io/faiss/faiss.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llama_stack/providers/inline/vector_io/faiss/faiss.py b/llama_stack/providers/inline/vector_io/faiss/faiss.py index e86872fea..0c8718cb8 100644 --- a/llama_stack/providers/inline/vector_io/faiss/faiss.py +++ b/llama_stack/providers/inline/vector_io/faiss/faiss.py @@ -4,11 +4,11 @@ # This source code is licensed under the terms described in the LICENSE file in # the root directory of this source tree. +import asyncio import base64 import io import json import logging -import asyncio from typing import Any, Dict, List, Optional import faiss @@ -100,9 +100,7 @@ class FaissIndex(EmbeddingIndex): await self._save_index() async def query(self, embedding: NDArray, k: int, score_threshold: float) -> QueryChunksResponse: - distances, indices = await asyncio.to_thread( - self.index.search, embedding.reshape(1, -1).astype(np.float32), k - ) + distances, indices = await asyncio.to_thread(self.index.search, embedding.reshape(1, -1).astype(np.float32), k) chunks = [] scores = []