From 55db590e73e169f7475293fe30bf5ec36b75b79f Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 24 Feb 2024 02:33:10 -0500 Subject: [PATCH] rename package --- Cargo.lock | 24 +++++++++---------- Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../src/classify_prompt.rs | 0 .../src/lib.rs | 0 .../src/minor_regex.rs | 0 .../src/potential_minor_regex.rs | 0 .../tests/borderline_tests.rs | 0 .../tests/csam_prompt_tests.rs | 0 .../tests/nsfw_prompt_tests.rs | 0 .../tests/racist_prompt_tests.rs | 0 .../tests/sfw_prompt_tests.rs | 0 .../tests/spicy_prompt_tests.rs | 0 crates/service/web/storyteller_web/Cargo.toml | 2 +- .../endpoints/image_gen/prompt_enrichment.rs | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) rename crates/lib/{classify_text => prompt_engineering}/Cargo.toml (94%) rename crates/lib/{classify_text => prompt_engineering}/src/classify_prompt.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/src/lib.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/src/minor_regex.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/src/potential_minor_regex.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/borderline_tests.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/csam_prompt_tests.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/nsfw_prompt_tests.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/racist_prompt_tests.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/sfw_prompt_tests.rs (100%) rename crates/lib/{classify_text => prompt_engineering}/tests/spicy_prompt_tests.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 51c65cbc77..ff4ae19f0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1219,17 +1219,6 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" -[[package]] -name = "classify_text" -version = "0.1.0" -dependencies = [ - "errors", - "my-workspace-hack", - "once_cell", - "regex", - "speculoos 0.11.0", -] - [[package]] name = "cloud_storage" version = "0.0.1" @@ -4812,6 +4801,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prompt_engineering" +version = "0.1.0" +dependencies = [ + "errors", + "my-workspace-hack", + "once_cell", + "regex", + "speculoos 0.11.0", +] + [[package]] name = "prost" version = "0.11.9" @@ -6359,7 +6359,6 @@ dependencies = [ "bootstrap", "buckets", "chrono", - "classify_text", "cloud_storage", "collections", "composite_identifiers", @@ -6408,6 +6407,7 @@ dependencies = [ "native-tls", "once_cell", "pin-project-lite", + "prompt_engineering", "pulldown-cmark", "r2d2_redis", "rand 0.8.5", diff --git a/Cargo.toml b/Cargo.toml index 4cd2b451a7..08bf080dea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,6 @@ members = [ "crates/lib/bootstrap", "crates/lib/caching/memory_caching", "crates/lib/caching/redis_caching", - "crates/lib/classify_text", "crates/lib/collections", "crates/lib/concurrency", "crates/lib/cookies", @@ -55,6 +54,7 @@ members = [ "crates/lib/migration", "crates/lib/mysql_queries", "crates/lib/password", + "crates/lib/prompt_engineering", "crates/lib/redis_common", "crates/lib/server_environment", "crates/lib/sqlx_mysql_helpers", diff --git a/crates/lib/classify_text/Cargo.toml b/crates/lib/prompt_engineering/Cargo.toml similarity index 94% rename from crates/lib/classify_text/Cargo.toml rename to crates/lib/prompt_engineering/Cargo.toml index df95f8aa1b..ac66f071c9 100644 --- a/crates/lib/classify_text/Cargo.toml +++ b/crates/lib/prompt_engineering/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "classify_text" +name = "prompt_engineering" version = "0.1.0" edition = "2021" diff --git a/crates/lib/classify_text/src/classify_prompt.rs b/crates/lib/prompt_engineering/src/classify_prompt.rs similarity index 100% rename from crates/lib/classify_text/src/classify_prompt.rs rename to crates/lib/prompt_engineering/src/classify_prompt.rs diff --git a/crates/lib/classify_text/src/lib.rs b/crates/lib/prompt_engineering/src/lib.rs similarity index 100% rename from crates/lib/classify_text/src/lib.rs rename to crates/lib/prompt_engineering/src/lib.rs diff --git a/crates/lib/classify_text/src/minor_regex.rs b/crates/lib/prompt_engineering/src/minor_regex.rs similarity index 100% rename from crates/lib/classify_text/src/minor_regex.rs rename to crates/lib/prompt_engineering/src/minor_regex.rs diff --git a/crates/lib/classify_text/src/potential_minor_regex.rs b/crates/lib/prompt_engineering/src/potential_minor_regex.rs similarity index 100% rename from crates/lib/classify_text/src/potential_minor_regex.rs rename to crates/lib/prompt_engineering/src/potential_minor_regex.rs diff --git a/crates/lib/classify_text/tests/borderline_tests.rs b/crates/lib/prompt_engineering/tests/borderline_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/borderline_tests.rs rename to crates/lib/prompt_engineering/tests/borderline_tests.rs diff --git a/crates/lib/classify_text/tests/csam_prompt_tests.rs b/crates/lib/prompt_engineering/tests/csam_prompt_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/csam_prompt_tests.rs rename to crates/lib/prompt_engineering/tests/csam_prompt_tests.rs diff --git a/crates/lib/classify_text/tests/nsfw_prompt_tests.rs b/crates/lib/prompt_engineering/tests/nsfw_prompt_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/nsfw_prompt_tests.rs rename to crates/lib/prompt_engineering/tests/nsfw_prompt_tests.rs diff --git a/crates/lib/classify_text/tests/racist_prompt_tests.rs b/crates/lib/prompt_engineering/tests/racist_prompt_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/racist_prompt_tests.rs rename to crates/lib/prompt_engineering/tests/racist_prompt_tests.rs diff --git a/crates/lib/classify_text/tests/sfw_prompt_tests.rs b/crates/lib/prompt_engineering/tests/sfw_prompt_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/sfw_prompt_tests.rs rename to crates/lib/prompt_engineering/tests/sfw_prompt_tests.rs diff --git a/crates/lib/classify_text/tests/spicy_prompt_tests.rs b/crates/lib/prompt_engineering/tests/spicy_prompt_tests.rs similarity index 100% rename from crates/lib/classify_text/tests/spicy_prompt_tests.rs rename to crates/lib/prompt_engineering/tests/spicy_prompt_tests.rs diff --git a/crates/service/web/storyteller_web/Cargo.toml b/crates/service/web/storyteller_web/Cargo.toml index de1caf517d..e1431af1d7 100644 --- a/crates/service/web/storyteller_web/Cargo.toml +++ b/crates/service/web/storyteller_web/Cargo.toml @@ -23,7 +23,6 @@ path = "src/api_doc_server.rs" actix_helpers = { path = "../../../lib/actix_helpers" } bootstrap = { path = "../../../lib/bootstrap" } buckets = { path = "../../../_types/buckets" } -classify_text = { path = "../../../lib/classify_text" } cloud_storage = { path = "../../../lib/api_clients/cloud_storage" } collections = { path = "../../../lib/collections" } composite_identifiers = { path = "../../../_types/composite_identifiers" } @@ -44,6 +43,7 @@ memory_caching = { path = "../../../lib/caching/memory_caching" } migration = { path = "../../../lib/migration" } mimetypes = { path = "../../../lib/files/mimetypes" } mysql_queries = { path = "../../../lib/mysql_queries" } +prompt_engineering = { path = "../../../lib/prompt_engineering" } redis_caching = { path = "../../../lib/caching/redis_caching" } redis_common = { path = "../../../lib/redis_common" } reusable_types = { path = "../../../_types/reusable_types" } diff --git a/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/prompt_enrichment.rs b/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/prompt_enrichment.rs index 9bd30b9cc9..413323ed09 100644 --- a/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/prompt_enrichment.rs +++ b/crates/service/web/storyteller_web/src/http_server/endpoints/image_gen/prompt_enrichment.rs @@ -1,4 +1,4 @@ -use classify_text::classify_prompt::classify_prompt; +use prompt_engineering::classify_prompt::classify_prompt; use crate::http_server::endpoints::image_gen::enqueue_image_generation::EnqueueImageGenRequest; use crate::http_server::endpoints::image_gen::replacement_prompts::get_replacement_prompt;