# generated by datamodel-codegen:
#   filename:  tmpslpb59ih.json

from __future__ import annotations

from pydantic import BaseModel, Field


class AgentEfficiencyInput(BaseModel):
    trajectory_completions: str = Field(
        ..., examples=['["User found", "Email updated", "Changes saved"]']
    )
    trajectory_prompts: str = Field(
        ..., examples=['["Find user info", "Update email", "Save changes"]']
    )


class AgentEfficiencyRequest(BaseModel):
    input: AgentEfficiencyInput


class AgentFlowQualityConfigRequest(BaseModel):
    conditions: list[str] = Field(
        ..., examples=[['no tools called', 'agent completed task']]
    )
    threshold: float = Field(..., examples=[0.5])


class AgentFlowQualityInput(BaseModel):
    trajectory_completions: str = Field(
        ...,
        examples=['["Found 5 flights", "Selected $299 flight", "Booking confirmed"]'],
    )
    trajectory_prompts: str = Field(
        ...,
        examples=[
            '["Search for flights", "Select the cheapest option", "Confirm booking"]'
        ],
    )


class AgentFlowQualityRequest(BaseModel):
    config: AgentFlowQualityConfigRequest
    input: AgentFlowQualityInput


class AgentGoalAccuracyInput(BaseModel):
    completion: str = Field(
        ...,
        examples=[
            'I have booked your flight from New York to Los Angeles departing Monday at 9am.'
        ],
    )
    question: str = Field(
        ..., examples=['Book a flight from NYC to LA for next Monday']
    )
    reference: str = Field(..., examples=['Flight booked: NYC to LA, Monday departure'])


class AgentGoalAccuracyRequest(BaseModel):
    input: AgentGoalAccuracyInput


class AgentGoalCompletenessConfigRequest(BaseModel):
    threshold: float = Field(..., examples=[0.5])


class AgentGoalCompletenessInput(BaseModel):
    trajectory_completions: str = Field(
        ...,
        examples=['["Account created", "Preferences saved", "Notifications enabled"]'],
    )
    trajectory_prompts: str = Field(
        ...,
        examples=['["Create new account", "Set preferences", "Enable notifications"]'],
    )


class AgentGoalCompletenessRequest(BaseModel):
    config: AgentGoalCompletenessConfigRequest | None = None
    input: AgentGoalCompletenessInput


class AgentToolErrorDetectorInput(BaseModel):
    tool_input: str = Field(
        ..., examples=['{"action": "search", "query": "flights to Paris"}']
    )
    tool_output: str = Field(
        ...,
        examples=[
            '{"status": "success", "results": [{"flight": "AF123", "price": 450}]}'
        ],
    )


class AgentToolErrorDetectorRequest(BaseModel):
    input: AgentToolErrorDetectorInput


class AgentToolTrajectoryConfigRequest(BaseModel):
    input_params_sensitive: bool | None = Field(None, examples=[True])
    mismatch_sensitive: bool | None = Field(None, examples=[False])
    order_sensitive: bool | None = Field(None, examples=[False])
    threshold: float | None = Field(None, examples=[0.5])


class AgentToolTrajectoryInput(BaseModel):
    executed_tool_calls: str = Field(
        ..., examples=['[{"name": "search", "input": {"query": "weather"}}]']
    )
    expected_tool_calls: str = Field(
        ..., examples=['[{"name": "search", "input": {"query": "weather"}}]']
    )


class AgentToolTrajectoryRequest(BaseModel):
    config: AgentToolTrajectoryConfigRequest | None = None
    input: AgentToolTrajectoryInput


class AnswerCompletenessInput(BaseModel):
    completion: str = Field(..., examples=['Paris.'])
    context: str = Field(..., examples=['The capital of France is Paris.'])
    question: str = Field(..., examples=['What is the capital of France?'])


class AnswerCompletenessRequest(BaseModel):
    input: AnswerCompletenessInput


class AnswerCorrectnessInput(BaseModel):
    completion: str = Field(..., examples=['World War II ended in 1945.'])
    ground_truth: str = Field(..., examples=['1945'])
    question: str = Field(..., examples=['What year did World War II end?'])


class AnswerCorrectnessRequest(BaseModel):
    input: AnswerCorrectnessInput


class AnswerRelevancyInput(BaseModel):
    answer: str = Field(..., examples=['The capital of France is Paris.'])
    question: str = Field(..., examples=['What is the capital of France?'])


class AnswerRelevancyRequest(BaseModel):
    input: AnswerRelevancyInput


class CharCountInput(BaseModel):
    text: str = Field(..., examples=['Hello, world! This is a sample text.'])


class CharCountRatioInput(BaseModel):
    denominator_text: str = Field(
        ..., examples=['This is a longer text for comparison']
    )
    numerator_text: str = Field(..., examples=['Short text'])


class CharCountRatioRequest(BaseModel):
    input: CharCountRatioInput


class CharCountRequest(BaseModel):
    input: CharCountInput


class ContextRelevanceConfigRequest(BaseModel):
    model: str | None = Field(None, examples=['gpt-4o'])


class ContextRelevanceInput(BaseModel):
    context: str = Field(
        ...,
        examples=[
            "Our store is open Monday to Friday from 9am to 6pm, "
            "and Saturday from 10am to 4pm. We are closed on Sundays."
        ],
    )
    query: str = Field(..., examples=['What are the business hours?'])


class ContextRelevanceRequest(BaseModel):
    config: ContextRelevanceConfigRequest | None = None
    input: ContextRelevanceInput


class ConversationQualityInput(BaseModel):
    completions: str = Field(
        ...,
        examples=[
            '["Hi! I\'d be happy to assist you today.", "We offer consulting, development, and support services."]'
        ],
    )
    prompts: str = Field(
        ..., examples=['["Hello, how can I help?", "What services do you offer?"]']
    )


class ConversationQualityRequest(BaseModel):
    input: ConversationQualityInput


class FaithfulnessInput(BaseModel):
    completion: str = Field(
        ..., examples=['The Eiffel Tower is located in Paris and was built in 1889.']
    )
    context: str = Field(
        ...,
        examples=[
            "The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris, France. "
            "It was constructed from 1887 to 1889."
        ],
    )
    question: str = Field(..., examples=['When was the Eiffel Tower built?'])


class FaithfulnessRequest(BaseModel):
    input: FaithfulnessInput


class HtmlComparisonInput(BaseModel):
    html1: str = Field(
        ..., examples=['<html><body><h1>Hello, world!</h1></body></html>']
    )
    html2: str = Field(
        ..., examples=['<html><body><h1>Hello, world!</h1></body></html>']
    )


class HtmlComparisonRequest(BaseModel):
    input: HtmlComparisonInput


class InstructionAdherenceInput(BaseModel):
    instructions: str = Field(
        ..., examples=['Respond in exactly 3 bullet points and use formal language.']
    )
    response: str = Field(
        ...,
        examples=[
            '- First point about the topic\n- Second relevant consideration\n- Final concluding thought'
        ],
    )


class InstructionAdherenceRequest(BaseModel):
    input: InstructionAdherenceInput


class IntentChangeInput(BaseModel):
    completions: str = Field(
        ...,
        examples=[
            '["Sure, I can help with hotel booking", "No problem, let me search for flights"]'
        ],
    )
    prompts: str = Field(
        ...,
        examples=['["I want to book a hotel", "Actually, I need a flight instead"]'],
    )


class IntentChangeRequest(BaseModel):
    input: IntentChangeInput


class JSONValidatorConfigRequest(BaseModel):
    enable_schema_validation: bool | None = Field(None, examples=[True])
    schema_string: str | None = Field(None, examples=['{}'])


class JSONValidatorInput(BaseModel):
    text: str = Field(..., examples=['{"name": "John", "age": 30}'])


class JSONValidatorRequest(BaseModel):
    config: JSONValidatorConfigRequest | None = None
    input: JSONValidatorInput


class PIIDetectorConfigRequest(BaseModel):
    probability_threshold: float | None = Field(None, examples=[0.8])


class PIIDetectorInput(BaseModel):
    text: str = Field(
        ...,
        examples=[
            'Please contact John Smith at john.smith@email.com or call 555-123-4567.'
        ],
    )


class PIIDetectorRequest(BaseModel):
    config: PIIDetectorConfigRequest | None = None
    input: PIIDetectorInput


class PerplexityInput(BaseModel):
    logprobs: str = Field(..., examples=['[-2.3, -1.5, -0.8, -1.2, -0.5]'])


class PerplexityRequest(BaseModel):
    input: PerplexityInput


class PlaceholderRegexConfigRequest(BaseModel):
    case_sensitive: bool | None = Field(None, examples=[True])
    dot_include_nl: bool | None = Field(None, examples=[True])
    multi_line: bool | None = Field(None, examples=[True])
    should_match: bool | None = Field(None, examples=[True])


class PlaceholderRegexInput(BaseModel):
    placeholder_value: str = Field(
        ..., examples=['[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}']
    )
    text: str = Field(..., examples=['user@example.com'])


class PlaceholderRegexRequest(BaseModel):
    config: PlaceholderRegexConfigRequest | None = None
    input: PlaceholderRegexInput


class ProfanityDetectorInput(BaseModel):
    text: str = Field(..., examples=['This is a clean and professional message.'])


class ProfanityDetectorRequest(BaseModel):
    input: ProfanityDetectorInput


class PromptInjectionConfigRequest(BaseModel):
    threshold: float | None = Field(None, examples=[0.5])


class PromptInjectionInput(BaseModel):
    prompt: str = Field(..., examples=['What is the weather like today?'])


class PromptInjectionRequest(BaseModel):
    config: PromptInjectionConfigRequest | None = None
    input: PromptInjectionInput


class PromptPerplexityInput(BaseModel):
    prompt: str = Field(..., examples=['What is the capital of France?'])


class PromptPerplexityRequest(BaseModel):
    input: PromptPerplexityInput


class RegexValidatorConfigRequest(BaseModel):
    case_sensitive: bool | None = Field(None, examples=[True])
    dot_include_nl: bool | None = Field(None, examples=[True])
    multi_line: bool | None = Field(None, examples=[True])
    regex: str | None = Field(None, examples=['.*'])
    should_match: bool | None = Field(None, examples=[True])


class RegexValidatorInput(BaseModel):
    text: str = Field(..., examples=['user@example.com'])


class RegexValidatorRequest(BaseModel):
    config: RegexValidatorConfigRequest | None = None
    input: RegexValidatorInput


class SQLValidatorInput(BaseModel):
    text: str = Field(..., examples=['SELECT * FROM users WHERE id = 1;'])


class SQLValidatorRequest(BaseModel):
    input: SQLValidatorInput


class SecretsDetectorInput(BaseModel):
    text: str = Field(
        ..., examples=['Here is some text without any API keys or passwords.']
    )


class SecretsDetectorRequest(BaseModel):
    input: SecretsDetectorInput


class SemanticSimilarityInput(BaseModel):
    completion: str = Field(..., examples=['The cat sat on the mat.'])
    reference: str = Field(..., examples=['A feline was resting on the rug.'])


class SemanticSimilarityRequest(BaseModel):
    input: SemanticSimilarityInput


class SexismDetectorConfigRequest(PromptInjectionConfigRequest):
    pass


class SexismDetectorInput(BaseModel):
    text: str = Field(
        ...,
        examples=['All team members should be treated equally regardless of gender.'],
    )


class SexismDetectorRequest(BaseModel):
    config: SexismDetectorConfigRequest | None = None
    input: SexismDetectorInput


class ToneDetectionInput(BaseModel):
    text: str = Field(..., examples=['The capital of France is Paris.'])


class ToneDetectionRequest(BaseModel):
    input: ToneDetectionInput


class TopicAdherenceInput(BaseModel):
    completion: str = Field(
        ...,
        examples=[
            'Machine learning is a subset of AI that enables systems to learn from data.'
        ],
    )
    question: str = Field(..., examples=['Tell me about machine learning'])
    reference_topics: str = Field(
        ..., examples=['artificial intelligence, data science, algorithms']
    )


class TopicAdherenceRequest(BaseModel):
    input: TopicAdherenceInput


class ToxicityDetectorConfigRequest(PromptInjectionConfigRequest):
    pass


class ToxicityDetectorInput(BaseModel):
    text: str = Field(..., examples=['Thank you for your help with this project.'])


class ToxicityDetectorRequest(BaseModel):
    config: ToxicityDetectorConfigRequest | None = None
    input: ToxicityDetectorInput


class UncertaintyDetectorInput(BaseModel):
    prompt: str = Field(
        ..., examples=['I am not sure, I think the capital of France is Paris.']
    )


class UncertaintyDetectorRequest(BaseModel):
    input: UncertaintyDetectorInput


class WordCountInput(BaseModel):
    text: str = Field(..., examples=['This is a sample text with several words.'])


class WordCountRatioInput(BaseModel):
    denominator_text: str = Field(
        ..., examples=['This is a longer input text for comparison']
    )
    numerator_text: str = Field(..., examples=['Short response'])


class WordCountRatioRequest(BaseModel):
    input: WordCountRatioInput


class WordCountRequest(BaseModel):
    input: WordCountInput
