Prompt
- class genderbench.probing.prompt.Prompt(text: str, metadata: dict[str, Any] | None = None)
Prompt is a single input for a generator.
- Parameters:
text (str) – The text input for a generator.
metadata (Optional[dict[str, Any]], optional) – Metadata related to Prompt that can be used during evaluation of metric calculation process.
- uuid
UUID identifier.
- Type:
uuid.UUID
- classmethod from_json_dict(json_dict: dict) Prompt
Create a new Prompt object from a JSON-serializable dictionary representation.
- Parameters:
json_dict (dict) – JSON-serializable dictionary. Generated by
to_json_dict.- Returns:
Restored Prompt object.
- Return type:
- to_json_dict() dict
Prepare a JSON-serializable dictionary representation. Used for logging.
- Returns:
JSON-serializable dictionary.
- Return type:
dict