File size: 673 Bytes
5b2eeff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1937b5f
5b2eeff
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# chains/exercise_writing/fluster_writing_chain.py
from pydantic import BaseModel
from typing import Any
from langchain_core.prompts.chat import ChatPromptTemplate

class FlusterWritingChain(BaseModel):
    """
    A chain that:
      - Generates exercises from two prompts (A/B)
      - Refines distractors
      - Sanitizes final text
    """
    template_write_a: ChatPromptTemplate
    template_write_b: ChatPromptTemplate
    default_llm_a: Any
    default_llm_b: Any

    template_refine_fluster: ChatPromptTemplate
    llm_refine: Any

    template_sanitize_fluster: ChatPromptTemplate
    llm_sanitize: Any

    class Config:
        arbitrary_types_allowed = True