File tree 10 files changed +15
-9
lines changed
ragbits-common/src/ragbits
ragbits-dev-kit/src/ragbits 10 files changed +15
-9
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 5
5
import jinja2
6
6
import typer
7
7
from pydantic import BaseModel
8
- from ragbits .dev_kit .discovery .prompt_discovery import PromptDiscovery
9
8
10
9
from ragbits .common .llms import LiteLLM
11
10
from ragbits .common .llms .clients import LiteLLMOptions
11
+ from ragbits .dev_kit .discovery .prompt_discovery import PromptDiscovery
12
12
13
13
14
14
class PromptState :
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
3
+ from ragbits .common .embeddings .litellm import LiteLLMEmbeddings
3
4
from ragbits .document_search import DocumentSearch
4
5
from ragbits .document_search .documents .document import DocumentMeta
5
6
from ragbits .document_search .vector_store .in_memory import InMemoryVectorStore
6
7
7
- from ragbits .common .embeddings .litellm import LiteLLMEmbeddings
8
-
9
8
documents = [
10
9
DocumentMeta .create_text_document_from_literal ("RIP boiled water. You will be mist." ),
11
10
DocumentMeta .create_text_document_from_literal (
Original file line number Diff line number Diff line change
1
+ from ragbits .common .embeddings .base import Embeddings
1
2
from ragbits .document_search .documents .document import DocumentMeta
2
3
from ragbits .document_search .documents .element import Element
3
4
from ragbits .document_search .ingestion .document_processor import DocumentProcessor
7
8
from ragbits .document_search .retrieval .rerankers .noop import NoopReranker
8
9
from ragbits .document_search .vector_store .base import VectorStore
9
10
10
- from ragbits .common .embeddings .base import Embeddings
11
-
12
11
13
12
class DocumentSearch :
14
13
"""
Original file line number Diff line number Diff line change 4
4
from typing import Union
5
5
6
6
from pydantic import BaseModel , Field
7
+
7
8
from ragbits .document_search .documents .sources import LocalFileSource
8
9
9
10
Original file line number Diff line number Diff line change 2
2
from typing import ClassVar
3
3
4
4
from pydantic import BaseModel
5
+
5
6
from ragbits .document_search .documents .document import DocumentMeta
6
7
from ragbits .document_search .vector_store .base import VectorDBEntry
7
8
@@ -26,7 +27,7 @@ def get_key(self) -> str:
26
27
"""
27
28
28
29
@classmethod
29
- def __pydantic_init_subclass__ (cls , ** kwargs ) : # pylint: disable=unused-argument
30
+ def __pydantic_init_subclass__ (cls , ** kwargs : dict ) -> None : # pylint: disable=unused-argument
30
31
element_type_default = cls .model_fields ["element_type" ].default
31
32
32
33
if element_type_default is None :
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
+
2
3
from ragbits .document_search .vector_store .base import VectorDBEntry , VectorStore
3
4
4
5
@@ -7,8 +8,8 @@ class InMemoryVectorStore(VectorStore):
7
8
A simple in-memory implementation of Vector Store, storing vectors in memory.
8
9
"""
9
10
10
- def __init__ (self ):
11
- self ._storage = {}
11
+ def __init__ (self ) -> None :
12
+ self ._storage : dict [ str , VectorDBEntry ] = {}
12
13
13
14
async def store (self , entries : list [VectorDBEntry ]) -> None :
14
15
"""
Original file line number Diff line number Diff line change @@ -81,7 +81,12 @@ warn_unused_ignores = false
81
81
show_error_codes = true
82
82
check_untyped_defs = true
83
83
no_implicit_optional = true
84
- mypy_path = [' packages' ]
84
+ explicit_package_bases = true
85
+ mypy_path = [
86
+ ' packages/ragbits-common/src' ,
87
+ ' packages/ragbits-dev-kit/src' ,
88
+ ' packages/ragbits-document-search/src' ,
89
+ ]
85
90
86
91
[[tool .mypy .overrides ]]
87
92
module = " ragbits.*"
You can’t perform that action at this time.
0 commit comments