Skip to content

Commit

Permalink
Add metadata field
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Apr 14, 2024
1 parent e784b73 commit 25c8d75
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions aisploit/core/target.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
from typing import Dict, Any
from abc import ABC, abstractmethod
from dataclasses import dataclass
from dataclasses import dataclass, field

from .prompt import BasePromptValue


@dataclass(frozen=True)
@dataclass
class Response:
"""A class representing a response from a target.
Attributes:
content (str): The content of the response.
"""
"""A class representing a response from the target."""

content: str

metadata: Dict[str, Any] = field(default_factory=dict)

def __repr__(self) -> str:
"""Return a string representation of the Response."""
return f"content={repr(self.content)}"
Expand Down

0 comments on commit 25c8d75

Please sign in to comment.