mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-05-23 16:49:51 +02:00
add initial Garak tests
This commit is contained in:
@@ -37,5 +37,5 @@ jobs:
|
||||
nohup python -m tests.api.server > server.log 2>&1 &
|
||||
sleep 2
|
||||
curl -X POST -i localhost:9999 -d '{ "prompt": "describe a random planet in our solar system in 10 words or less" }' || true
|
||||
cat server.log
|
||||
garak --list_probes
|
||||
garak -v --config ${{ github.workspace }}/tests/tools/garak.config.yml --generator_option_file ${{ github.workspace }}/tests/tools/garak.rest.json --model_type=rest
|
||||
cat server.log
|
||||
@@ -0,0 +1,5 @@
|
||||
run:
|
||||
generations: 1
|
||||
|
||||
plugins:
|
||||
probe_spec: promptinject.HijackHateHumansMini
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"rest": {
|
||||
"RestGenerator": {
|
||||
"name": "Microsoft ONNX Phi-3 LLM/GenAI REST API Service",
|
||||
"uri": "http://localhost:9999/",
|
||||
"method": "post",
|
||||
"headers": {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
"req_template_json_object": {
|
||||
"prompt": "$INPUT"
|
||||
},
|
||||
"response_json": true,
|
||||
"response_json_field": "response",
|
||||
"request_timeout": 120,
|
||||
"verify_ssl": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user