diff --git a/common/migrations/definitions/20250606_234535_add_embedding_model_and_dimensions_to_system_settings.json b/common/migrations/definitions/20250606_234535_add_embedding_model_and_dimensions_to_system_settings.json new file mode 100644 index 0000000..cf85299 --- /dev/null +++ b/common/migrations/definitions/20250606_234535_add_embedding_model_and_dimensions_to_system_settings.json @@ -0,0 +1 @@ +{"schemas":"--- original\n+++ modified\n@@ -51,23 +51,23 @@\n\n # Defines the schema for the 'ingestion_task' table (used by IngestionTask).\n\n-DEFINE TABLE IF NOT EXISTS job SCHEMALESS;\n+DEFINE TABLE IF NOT EXISTS ingestion_task SCHEMALESS;\n\n # Standard fields\n-DEFINE FIELD IF NOT EXISTS created_at ON job TYPE string;\n-DEFINE FIELD IF NOT EXISTS updated_at ON job TYPE string;\n+DEFINE FIELD IF NOT EXISTS created_at ON ingestion_task TYPE string;\n+DEFINE FIELD IF NOT EXISTS updated_at ON ingestion_task TYPE string;\n\n # Custom fields from the IngestionTask struct\n # IngestionPayload is complex, store as object\n-DEFINE FIELD IF NOT EXISTS content ON job TYPE object;\n+DEFINE FIELD IF NOT EXISTS content ON ingestion_task TYPE object;\n # IngestionTaskStatus can hold data (InProgress), store as object\n-DEFINE FIELD IF NOT EXISTS status ON job TYPE object;\n-DEFINE FIELD IF NOT EXISTS user_id ON job TYPE string;\n+DEFINE FIELD IF NOT EXISTS status ON ingestion_task TYPE object;\n+DEFINE FIELD IF NOT EXISTS user_id ON ingestion_task TYPE string;\n\n # Indexes explicitly defined in build_indexes and useful for get_unfinished_tasks\n-DEFINE INDEX IF NOT EXISTS idx_job_status ON job FIELDS status;\n-DEFINE INDEX IF NOT EXISTS idx_job_user ON job FIELDS user_id;\n-DEFINE INDEX IF NOT EXISTS idx_job_created ON job FIELDS created_at;\n+DEFINE INDEX IF NOT EXISTS idx_ingestion_task_status ON ingestion_task FIELDS status;\n+DEFINE INDEX IF NOT EXISTS idx_ingestion_task_user ON ingestion_task FIELDS user_id;\n+DEFINE INDEX IF NOT EXISTS idx_ingestion_task_created ON ingestion_task FIELDS created_at;\n\n # Defines the schema for the 'knowledge_entity' table.\n\n","events":null} \ No newline at end of file diff --git a/common/schemas/ingestion_task.surql b/common/schemas/ingestion_task.surql index 200de2e..b89a213 100644 --- a/common/schemas/ingestion_task.surql +++ b/common/schemas/ingestion_task.surql @@ -1,19 +1,19 @@ # Defines the schema for the 'ingestion_task' table (used by IngestionTask). -DEFINE TABLE IF NOT EXISTS job SCHEMALESS; +DEFINE TABLE IF NOT EXISTS ingestion_task SCHEMALESS; # Standard fields -DEFINE FIELD IF NOT EXISTS created_at ON job TYPE string; -DEFINE FIELD IF NOT EXISTS updated_at ON job TYPE string; +DEFINE FIELD IF NOT EXISTS created_at ON ingestion_task TYPE string; +DEFINE FIELD IF NOT EXISTS updated_at ON ingestion_task TYPE string; # Custom fields from the IngestionTask struct # IngestionPayload is complex, store as object -DEFINE FIELD IF NOT EXISTS content ON job TYPE object; +DEFINE FIELD IF NOT EXISTS content ON ingestion_task TYPE object; # IngestionTaskStatus can hold data (InProgress), store as object -DEFINE FIELD IF NOT EXISTS status ON job TYPE object; -DEFINE FIELD IF NOT EXISTS user_id ON job TYPE string; +DEFINE FIELD IF NOT EXISTS status ON ingestion_task TYPE object; +DEFINE FIELD IF NOT EXISTS user_id ON ingestion_task TYPE string; # Indexes explicitly defined in build_indexes and useful for get_unfinished_tasks -DEFINE INDEX IF NOT EXISTS idx_job_status ON job FIELDS status; -DEFINE INDEX IF NOT EXISTS idx_job_user ON job FIELDS user_id; -DEFINE INDEX IF NOT EXISTS idx_job_created ON job FIELDS created_at; +DEFINE INDEX IF NOT EXISTS idx_ingestion_task_status ON ingestion_task FIELDS status; +DEFINE INDEX IF NOT EXISTS idx_ingestion_task_user ON ingestion_task FIELDS user_id; +DEFINE INDEX IF NOT EXISTS idx_ingestion_task_created ON ingestion_task FIELDS created_at; diff --git a/common/src/error.rs b/common/src/error.rs index e5e7b32..430b504 100644 --- a/common/src/error.rs +++ b/common/src/error.rs @@ -29,8 +29,8 @@ pub enum AppError { Io(#[from] std::io::Error), #[error("Reqwest error: {0}")] Reqwest(#[from] reqwest::Error), - #[error("Tiktoken error: {0}")] - Tiktoken(#[from] anyhow::Error), + #[error("Anyhow error: {0}")] + Anyhow(#[from] anyhow::Error), #[error("Ingestion Processing error: {0}")] Processing(String), #[error("DOM smoothie error: {0}")] diff --git a/docker-compose.yml b/docker-compose.yml index 3ba415d..8ff9040 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,8 @@ services: SURREALDB_NAMESPACE: "test" OPENAI_API_KEY: "sk-key" DATA_DIR: "./data" - # RUST_LOG: "info" + HTTP_PORT: 3000 + RUST_LOG: "info" depends_on: - surrealdb networks: