|
|
|
|
|
by vintagedave
721 days ago
|
|
> R2R is a lightweight repository that you can install locally with `pip install r2r`, or run with Docker Lightweight is good, and running it without having to deal with Docker is excellent. But your quickstart guide is still huge! It feels very much not "quick". How do you: * Install via Python * Throw a folder of documents at it * Have it set there providing a REST API to get results? Eg suppose I have an AI service already, so I throw up a private Railway instance of this as a Python app. There's a DB somewhere. As simple as possible. I can mimic it at home just running a local Python server. How do I do that? _That's_ the real quickstart. |
|
To do what you are requesting is pretty easy, you can just launch the server and use the client directly. The code would look like this:
```python
from r2r import R2RClient
base_url = "http://localhost:8000" # or other
client = R2RClient(base_url)
# load my_file_paths
...
response = client.ingest_files(file_paths=my_file_paths)
# optionally set metadata, document ids, etc.. [https://r2r-docs.sciphi.ai/api-reference/endpoint/ingest_fil...]
```