Skip to content

Commit

Permalink
fix: improve and fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Feb 7, 2025
1 parent 3ce6654 commit a566a20
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 55 deletions.
27 changes: 17 additions & 10 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,30 @@
root = true

[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
[*.{py,rst,ini}]
indent_style = space
indent_size = 4

[*.bat]
indent_style = tab
end_of_line = crlf
[*.{html,css,scss,json,yml,yaml,xml,toml}]
indent_style = space
indent_size = 2

["LICENSE"]
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

[default.conf]
indent_style = space
indent_size = 2

["Makefile"]
indent_style = tab

[*.{diff,patch}]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
os:
- "ubuntu"

Expand Down
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,19 @@ Rago is a lightweight framework for RAG.

## Features

- Support for Hugging Face
- Support for llama
- Vector Database support
- FAISS
- Retrieval features
- Support pdf extraction via langchain
- Augmentation (Embedding + Vector Database Search)
- Support for Sentence Transformer (Hugging Face)
- Support for Open AI
- Support for SpaCy
- Generation (LLM)
- Support for Hugging Face
- Support for llama (Huggin FAce)
- Support for OpenAI
- Support for Gemini

## Installation

Expand All @@ -34,15 +45,29 @@ access in its form, for example: https://huggingface.co/meta-llama/Llama-3.2-1B.
After you are granted access to the desired model, you will be able to use it
with Rago.

you will also need to provide a hugging face token in order to download the
You will also need to provide a hugging face token in order to download the
models locally, for example:

```python

animals_data = [
"The Blue Whale is the largest animal ever known to have existed, even "
"bigger than the largest dinosaurs.",
"The Peregrine Falcon is renowned as the fastest animal on the planet, "
"capable of reaching speeds over 240 miles per hour.",
"The Giant Panda is a bear species endemic to China, easily recognized by "
"its distinctive black-and-white coat.",
"The Cheetah is the world's fastest land animal, capable of sprinting at "
"speeds up to 70 miles per hour in short bursts covering distances up to "
"500 meters.",
"The Komodo Dragon is the largest living species of lizard, found on "
"several Indonesian islands, including its namesake, Komodo.",
]

rag = Rago(
retrieval=StringRet(animals_data),
augmented=SentenceTransformerAug(top_k=3),
augmented=SentenceTransformerAug(top_k=2),
generation=LlamaGen(apikey=HF_TOKEN),
)
rag.prompt('Is there any animals larger than a dinosaur?')
rag.prompt('What is the faster animal on Earth?')
```
Binary file added artwork/logo/rago.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 0 additions & 38 deletions docs/index.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/index.md
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ gpu = ["torch", "torchvision"]
[[tool.poetry.source]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
priority = "explicit"
priority = "supplemental"

[tool.poetry.dependencies]
python = ">=3.9,<4"
torch = [
{version = ">=2.5.0", markers="extra!='gpu'", source="pytorch-cpu"},
{version = ">=2.5.0", markers="extra=='gpu' and extra!='cpu'"},
{version = ">=2.5.0", markers="extra=='gpu'"},
]
torchvision = [
{version = ">=0.20.0", markers="extra!='gpu'", source="pytorch-cpu"},
Expand Down

0 comments on commit a566a20

Please sign in to comment.