feat: ai敏感词拦截插件 (#1190)

This commit is contained in:
007gzs
2024-08-16 17:24:32 +08:00
committed by GitHub
parent dcea483c61
commit 25b085cb5e
20 changed files with 66898 additions and 166 deletions

View File

@@ -32,6 +32,7 @@ then
elif [ "$TYPE" == "RUST" ]
then
cd ./plugins/wasm-rust/
make lint-base
if [ ! -n "$INNER_PLUGIN_NAME" ]; then
EXTENSIONS_DIR=$(pwd)"/extensions/"
echo "🚀 Build all Rust WasmPlugins under folder of $EXTENSIONS_DIR"
@@ -40,12 +41,21 @@ then
if [ -d $EXTENSIONS_DIR$file ]; then
name=${file##*/}
echo "🚀 Build Rust WasmPlugin: $name"
PLUGIN_NAME=${name} make lint
PLUGIN_NAME=${name} BUILDER_REGISTRY="docker.io/alihigress/plugins-rust-" make build
fi
done
cd ../wasm-go/
PLUGIN_NAME=custom-response make build
else
echo "🚀 Build Rust WasmPlugin: $INNER_PLUGIN_NAME"
PLUGIN_NAME=${INNER_PLUGIN_NAME} make lint
PLUGIN_NAME=${INNER_PLUGIN_NAME} make build
if [ "$INNER_PLUGIN_NAME" == "ai-data-masking" ]; then
cd ../wasm-go/
PLUGIN_NAME=custom-response make build
fi
fi
else
echo "Not specify plugin language, so just compile wasm-go as default"