34 releases
Uses new Rust 2024
| new 0.2.3 | Apr 1, 2026 |
|---|---|
| 0.2.2 | Mar 17, 2026 |
| 0.1.29 | Feb 17, 2026 |
| 0.1.25 | Dec 15, 2025 |
| 0.1.3 | Mar 31, 2025 |
#11 in #rig
Used in 2 crates
(via omama_manager)
44KB
297 lines
Rig SurrealDB integration
This crate integrates SurrealDB into Rig, allowing you to easily use RAG with this database.
Installation
To install this crate, run the following command in a Rust project directory which will add rig-surrealdb as a dependency (requires rig-core added for intended usage):
cargo add rig-surrealdb
There's a few different ways you can run SurrealDB:
- Install it locally and run it
- Through a Docker container, either locally or on Docker-compatible architecture
docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start --username root --password rootstarts up a SurrealDB instance at port 8000 with the username and password as "root".
- Using SurrealDB's cloud offering
- Using the cloud offering you can manage your SurrealDB instance through their web UI.
How to run the example
To run the example, add your OpenAI API key as an environment variable:
export OPENAI_API_KEY=my_key
Finally, use the following command below to run the example:
cargo run --example vector_search_surreal --features rig-core/derive
Dependencies
~64–99MB
~1.5M SLoC