Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
chagu13
/
chagu-demo
like
0
Running
App
Files
Files
Community
5
e9a8c67
chagu-demo
/
rag_sec
/
query_transformer.py
talexm
update
f861dee
25 days ago
raw
Copy download link
history
blame
Safe
232 Bytes
class
QueryTransformer
:
def
transform_query
(
self, query
):
if
"DROP TABLE"
in
query
or
"SELECT *"
in
query:
return
"Your query appears to contain SQL injection elements. Please rephrase."
return
query