augmented
Augmented package.
Modules:
-
base–Base classes for the augmented step.
-
cohere–Classes for augmentation with Cohere embeddings.
-
db–Rago DB package.
-
fireworks–Classes for augmentation with Fireworks embeddings.
-
openai–Classes for augmentation with OpenAI embeddings.
-
sentence_transformer–Classes for augmentation with hugging face.
-
spacy–Classes for augmentation with SpaCy embeddings.
-
together–Classes for augmentation with Together embeddings.
Classes:
-
AugmentedBase–Define the base structure for Augmented classes.
-
CohereAug–Class for augmentation with Cohere embeddings.
-
FireworksAug–Class for augmentation with Fireworks embeddings.
-
OpenAIAug–Class for augmentation with OpenAI embeddings.
-
SentenceTransformerAug–Class for augmentation with Hugging Face.
-
SpaCyAug–Class for augmentation with SpaCy embeddings.
-
TogetherAug–Class for augmentation with Together embeddings.
AugmentedBase
AugmentedBase(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: RagoBase
Define the base structure for Augmented classes.
Methods:
-
get_embedding–Retrieve the embedding for a given text using OpenAI API.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for a given text using OpenAI API.
Source code in src/rago/augmented/base.py
76 77 78 | |
search
abstractmethod
Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
80 81 82 83 84 85 86 87 88 | |
CohereAug
CohereAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with Cohere embeddings.
Methods:
-
get_embedding–Retrieve the embedding for given texts using Cohere API.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for given texts using Cohere API.
Source code in src/rago/augmented/cohere.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/cohere.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
FireworksAug
FireworksAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with Fireworks embeddings.
Methods:
-
get_embedding–Retrieve the embedding for given texts using the OpenAI client.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for given texts using the OpenAI client.
Source code in src/rago/augmented/fireworks.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/fireworks.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
OpenAIAug
OpenAIAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with OpenAI embeddings.
Methods:
-
get_embedding–Retrieve the embedding for a given text using OpenAI API.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for a given text using OpenAI API.
Source code in src/rago/augmented/openai.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/openai.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
SentenceTransformerAug
SentenceTransformerAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with Hugging Face.
Methods:
-
get_embedding–Retrieve the embedding for a given text using OpenAI API.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for a given text using OpenAI API.
Source code in src/rago/augmented/sentence_transformer.py
38 39 40 41 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/sentence_transformer.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
SpaCyAug
SpaCyAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with SpaCy embeddings.
Methods:
-
get_embedding–Retrieve the embedding for a given text using SpaCy.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for a given text using SpaCy.
Source code in src/rago/augmented/spacy.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/spacy.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
TogetherAug
TogetherAug(
model_name: Optional[str] = None,
db: DBBase = FaissDB(),
top_k: Optional[int] = None,
api_key: str = '',
cache: Optional[Cache] = None,
logs: dict[str, Any] = DEFAULT_LOGS,
)
Bases: AugmentedBase
Class for augmentation with Together embeddings.
Methods:
-
get_embedding–Retrieve the embedding for given texts using Together API.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
get_embedding
Retrieve the embedding for given texts using Together API.
Source code in src/rago/augmented/together.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
search
Search an encoded query into vector database.
Source code in src/rago/augmented/together.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |