Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions comps/cores/proto/docarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from typing import Any, Dict, List, Optional, Tuple, Union

import numpy as np
from docarray import BaseDoc, DocList
from docarray import BaseDoc
from docarray.documents import AudioDoc
from docarray.typing import AudioUrl, ImageUrl
from pydantic import Field, NonNegativeFloat, PositiveInt, conint, conlist, field_validator
Expand Down Expand Up @@ -133,7 +133,7 @@ class Audio2TextDoc(AudioDoc):


class SearchedDoc(BaseDoc):
retrieved_docs: DocList[TextDoc]
retrieved_docs: List[TextDoc]
initial_query: str
top_n: PositiveInt = 1

Expand Down Expand Up @@ -164,7 +164,7 @@ class LVMSearchedMultimodalDoc(SearchedMultimodalDoc):


class RerankedDoc(BaseDoc):
reranked_docs: DocList[TextDoc]
reranked_docs: List[TextDoc]
initial_query: str


Expand Down Expand Up @@ -502,10 +502,10 @@ class RerankerParms(BaseDoc):


class RAGASParams(BaseDoc):
questions: DocList[TextDoc]
answers: DocList[TextDoc]
docs: DocList[TextDoc]
ground_truths: DocList[TextDoc]
questions: List[TextDoc]
answers: List[TextDoc]
docs: List[TextDoc]
ground_truths: List[TextDoc]


class RAGASScores(BaseDoc):
Expand Down Expand Up @@ -583,7 +583,7 @@ class ImagePath(BaseDoc):


class ImagesPath(BaseDoc):
images_path: DocList[ImagePath]
images_path: List[ImagePath]


class VideoPath(BaseDoc):
Expand Down
6 changes: 3 additions & 3 deletions comps/cores/storages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
from .arangodb import ArangoDBStore

# from .redisdb import RedisDBStore
# from .mongodb import MongoDBStore
from .mongodb import MongoDBStore


def opea_store(name: str, *args, **kwargs):
if name == "arangodb":
return ArangoDBStore(name, *args, **kwargs)
# elif name == "redis":
# return RedisDBStore(*args, **kwargs)
# elif name == "mongodb":
# return MongoDBStore(*args, **kwargs)
elif name == "mongodb":
return MongoDBStore(name, *args, **kwargs)
else:
raise ValueError(f"Unknown Data Store: {name}")
Loading