Prompt Guard | Python SDK
Prompt Guard service client.
PromptGuard(token, config, logger_name, config_id)Initializes a new Prompt Guard client.
from pangea import PangeaConfig
from pangea.services import PromptGuard
config = PangeaConfig(domain="aws.us.pangea.cloud")
prompt_guard = PromptGuard(token="pangea_token", config=config)
download-file
PromptGuard.download_file()from pangea.services.prompt_guard import Message
response = prompt_guard.guard([Message(role="user", content="hello world")])
Poll result
PromptGuard.poll_result(exception)Returns request's result that has been accepted by the server
response = service.poll_result(exception)