Skip to content

Commit

Permalink
Run pre-commit hook
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Morin <[email protected]>
  • Loading branch information
cameronmorin committed Nov 28, 2024
1 parent 242b53e commit 70238f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions comps/retrievers/opensearch/langchain/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ easyocr
fastapi
langchain_community
langchain_huggingface
numpy
opensearch-py
opentelemetry-api
opentelemetry-exporter-otlp
opentelemetry-sdk
prometheus-fastapi-instrumentator
pydantic
pymupdf
sentence_transformers
shortuuid
uvicorn
pydantic
numpy
11 changes: 4 additions & 7 deletions comps/retrievers/opensearch/langchain/retriever_opensearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

import os
import time
import numpy as np
from typing import Union, List, Callable
from typing import Callable, List, Union

import numpy as np
from langchain_community.embeddings import HuggingFaceBgeEmbeddings
from langchain_community.vectorstores import OpenSearchVectorSearch
from langchain_huggingface import HuggingFaceEndpointEmbeddings
Expand Down Expand Up @@ -37,11 +37,8 @@


async def search_all_embeddings_vectors(
embeddings: Union[conlist(float, min_length=0), List[conlist(float, min_length=0)]],
func: Callable,
*args,
**kwargs
):
embeddings: Union[conlist(float, min_length=0), List[conlist(float, min_length=0)]], func: Callable, *args, **kwargs
):
try:
if not isinstance(embeddings, np.ndarray):
embeddings = np.array(embeddings)
Expand Down

0 comments on commit 70238f5

Please sign in to comment.