Skip to content

Commit

Permalink
Rename to oramacore
Browse files Browse the repository at this point in the history
  • Loading branch information
allevo committed Jan 16, 2025
1 parent 5a85d73 commit 57def50
Show file tree
Hide file tree
Showing 18 changed files with 128 additions and 225 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
cargo --version
- name: Build
run: |
cargo build --release --target x86_64-unknown-linux-gnu -p rustorama
cargo build --release --target x86_64-unknown-linux-gnu -p oramacore
ls -lha target/
ls -lha target/x86_64-unknown-linux-gnu
ls -lha target/x86_64-unknown-linux-gnu/release
Expand All @@ -52,5 +52,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./target/x86_64-unknown-linux-gnu/release/rustorama
asset_name: rustorama-linux-x86_64-unknown-linux-gnu
asset_path: ./target/x86_64-unknown-linux-gnu/release/oramacore
asset_name: oramacore-linux-x86_64-unknown-linux-gnu
144 changes: 72 additions & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 3 additions & 46 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rustorama"
name = "oramacore"
version = "0.1.0"
edition = "2021"

Expand Down Expand Up @@ -106,32 +106,11 @@ rand = "0.8.5"
assert_approx_eq = "1.1.0"

[[bin]]
name = "rustorama"
path = "src/bin/rustorama.rs"

[[bin]]
name = "insert_documents"
path = "src/bin/insert_documents.rs"

##### BIN FOR TEST #####
#[[bin]]
#name = "vector_index_test"
#path = "src/bin/vector_index_test.rs"
name = "oramacore"
path = "src/bin/oramacore.rs"
[[bin]]
name = "embeddings"
path = "src/bin/embeddings/embeddings.rs"
#[[bin]]
#name = "pq_bench"
#path = "src/bin/embeddings/pq_bench.rs"
#[[bin]]
#name = "pq"
#path = "src/bin/embeddings/pq.rs"
#[[bin]]
#name = "selector"
#path = "src/bin/embeddings/selector.rs"
[[bin]]
name = "deno"
path = "src/bin/js/deno.rs"

[[bench]]
name = "phrase_match"
Expand All @@ -146,25 +125,3 @@ test-python = []
members = [

]

# [workspace]
# resolver = "2"
# members = [
# "string_index",
# "nlp",
# "web_server",
# "collection_manager",
# "storage",
# "document_storage",
# "types",
# "rustorama",
# "embeddings",
# "tanstack_example",
# "code_parser",
# "vector_index",
# "code_index",
# "utils",
# "llm",
# "number_index",
# "bool_index",
# ]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ An NVIDIA GPU is highly recommended for running the application.

How to run:
```bash
RUST_LOG=trace PROTOC=/usr/bin/protoc cargo run --bin rustorama
RUST_LOG=trace PROTOC=/usr/bin/protoc cargo run --bin oramacore
```
or, for release mode:
```bash
RUST_LOG=trace PROTOC=/usr/bin/protoc cargo run --bin rustorama --release
RUST_LOG=trace PROTOC=/usr/bin/protoc cargo run --bin oramacore --release
```

The configuration file is located at `config.jsonc` and contains an example of the configuration.
Expand Down
6 changes: 3 additions & 3 deletions benches/phrase_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use criterion::{criterion_group, criterion_main};
mod bench {

use criterion::{black_box, Criterion};
use rustorama::indexes::string::BM25Scorer;
use rustorama::test_utils::create_committed_string_field_index;
use rustorama::types::Document;
use oramacore::indexes::string::BM25Scorer;
use oramacore::test_utils::create_committed_string_field_index;
use oramacore::types::Document;
use serde_json::json;

#[derive(Debug)]
Expand Down
4 changes: 2 additions & 2 deletions src/bin/embeddings/embeddings.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use rustorama::ai::llm_service_client::LlmServiceClient;
use rustorama::ai::{EmbeddingRequest, HealthCheckRequest, OramaIntent, OramaModel};
use oramacore::ai::llm_service_client::LlmServiceClient;
use oramacore::ai::{EmbeddingRequest, HealthCheckRequest, OramaIntent, OramaModel};
use std::time::Instant;
use tonic::Request;

Expand Down
4 changes: 2 additions & 2 deletions src/bin/embeddings/pq.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use rustorama::embeddings::pq;
use rustorama::embeddings::OramaModel;
use oramacore::embeddings::pq;
use oramacore::embeddings::OramaModel;

#[tokio::main]
async fn main() -> Result<()> {
Expand Down
4 changes: 2 additions & 2 deletions src/bin/embeddings/pq_bench.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::Result;
use csv::ReaderBuilder;
use fastembed::Embedding;
use rustorama::embeddings::pq;
use rustorama::embeddings::OramaModel;
use oramacore::embeddings::pq;
use oramacore::embeddings::OramaModel;
use serde::Deserialize;
use std::time::Instant;

Expand Down
54 changes: 0 additions & 54 deletions src/bin/insert_documents.rs

This file was deleted.

2 changes: 1 addition & 1 deletion src/bin/js/deno.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Error;
use rand::Rng;
use rustorama::js::deno::{JavaScript, Operation};
use oramacore::js::deno::{JavaScript, Operation};
use serde::Serialize;
use std::time::Instant;

Expand Down
8 changes: 4 additions & 4 deletions src/bin/rustorama.rs → src/bin/oramacore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use std::path::PathBuf;

use anyhow::{anyhow, Context, Result};
use config::Config;
use rustorama::{start, RustoramaConfig};
use oramacore::{start, OramacoreConfig};
use tracing::{info, instrument};

#[instrument(level = "info")]
fn load_config() -> Result<RustoramaConfig> {
fn load_config() -> Result<OramacoreConfig> {
let config_path = std::env::var("CONFIG_PATH").unwrap_or_else(|_| "./config.jsonc".to_string());

let config_path = PathBuf::from(config_path);
Expand All @@ -18,14 +18,14 @@ fn load_config() -> Result<RustoramaConfig> {

let settings = Config::builder()
.add_source(config::File::with_name(&config_path).format(config::FileFormat::Json5))
.add_source(config::Environment::with_prefix("RUSTORAMA"))
.add_source(config::Environment::with_prefix("ORAMACORE"))
.build()
.context("Failed to load configuration")?;

info!("Deserializing configuration");

settings
.try_deserialize::<RustoramaConfig>()
.try_deserialize::<OramacoreConfig>()
.context("Failed to deserialize configuration")
}

Expand Down
Loading

0 comments on commit 57def50

Please sign in to comment.