Skip to content

Commit

Permalink
update: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
soumik12345 committed Dec 20, 2024
1 parent b2505c7 commit e27fc71
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
7 changes: 0 additions & 7 deletions .streamlit/config.toml

This file was deleted.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,21 @@ import weave

from safeguards.guardrails import (
GuardrailManager,
PromptInjectionProtectAIGuardrail,
PromptInjectionSurveyGuardrail,
PromptInjectionClassifierGuardrail,
PromptInjectionLLMGuardrail,
OpenAIPrivilegeEscalationGuardrail,
)
from safeguards.llm import OpenAIModel

weave.init(project_name="safeguards")

manager = GuardrailManager(
guardrails=[
PromptInjectionSurveyGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
PromptInjectionProtectAIGuardrail(),
PromptInjectionLLMGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
PromptInjectionClassifierGuardrail(
model_name="ProtectAI/deberta-v3-base-prompt-injection-v2"
),
OpenAIPrivilegeEscalationGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
]
)
manager.guard(
Expand Down
12 changes: 8 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ import weave

from safeguards.guardrails import (
GuardrailManager,
PromptInjectionProtectAIGuardrail,
PromptInjectionSurveyGuardrail,
PromptInjectionClassifierGuardrail,
PromptInjectionLLMGuardrail,
OpenAIPrivilegeEscalationGuardrail,
)
from safeguards.llm import OpenAIModel

weave.init(project_name="safeguards")

manager = GuardrailManager(
guardrails=[
PromptInjectionSurveyGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
PromptInjectionProtectAIGuardrail(),
PromptInjectionLLMGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
PromptInjectionClassifierGuardrail(
model_name="ProtectAI/deberta-v3-base-prompt-injection-v2"
),
OpenAIPrivilegeEscalationGuardrail(llm_model=OpenAIModel(model_name="gpt-4o")),
]
)
manager.guard(
Expand Down

0 comments on commit e27fc71

Please sign in to comment.