lionagi 0.18.0__py3-none-any.whl → 0.18.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lionagi/__init__.py +102 -59
 - lionagi/_errors.py +0 -5
 - lionagi/adapters/spec_adapters/__init__.py +9 -0
 - lionagi/adapters/spec_adapters/_protocol.py +236 -0
 - lionagi/adapters/spec_adapters/pydantic_field.py +158 -0
 - lionagi/fields.py +83 -0
 - lionagi/ln/__init__.py +3 -1
 - lionagi/ln/_async_call.py +2 -2
 - lionagi/ln/concurrency/primitives.py +4 -4
 - lionagi/ln/concurrency/task.py +1 -0
 - lionagi/ln/fuzzy/_fuzzy_match.py +2 -2
 - lionagi/ln/types/__init__.py +51 -0
 - lionagi/ln/types/_sentinel.py +154 -0
 - lionagi/ln/{types.py → types/base.py} +108 -168
 - lionagi/ln/types/operable.py +221 -0
 - lionagi/ln/types/spec.py +441 -0
 - lionagi/models/field_model.py +69 -7
 - lionagi/models/hashable_model.py +2 -3
 - lionagi/models/model_params.py +4 -3
 - lionagi/operations/ReAct/ReAct.py +1 -1
 - lionagi/operations/act/act.py +3 -3
 - lionagi/operations/builder.py +5 -7
 - lionagi/operations/fields.py +380 -0
 - lionagi/operations/flow.py +4 -6
 - lionagi/operations/node.py +4 -4
 - lionagi/operations/operate/operate.py +123 -89
 - lionagi/operations/operate/operative.py +198 -0
 - lionagi/operations/operate/step.py +203 -0
 - lionagi/operations/select/select.py +1 -1
 - lionagi/operations/select/utils.py +7 -1
 - lionagi/operations/types.py +7 -7
 - lionagi/protocols/action/manager.py +5 -6
 - lionagi/protocols/contracts.py +2 -2
 - lionagi/protocols/generic/__init__.py +22 -0
 - lionagi/protocols/generic/element.py +36 -127
 - lionagi/protocols/generic/pile.py +9 -10
 - lionagi/protocols/generic/progression.py +23 -22
 - lionagi/protocols/graph/edge.py +6 -5
 - lionagi/protocols/ids.py +6 -49
 - lionagi/protocols/messages/__init__.py +3 -1
 - lionagi/protocols/messages/base.py +7 -6
 - lionagi/protocols/messages/instruction.py +0 -1
 - lionagi/protocols/messages/message.py +2 -2
 - lionagi/protocols/types.py +1 -11
 - lionagi/service/connections/__init__.py +3 -0
 - lionagi/service/connections/providers/claude_code_cli.py +3 -2
 - lionagi/service/hooks/_types.py +1 -1
 - lionagi/service/hooks/_utils.py +1 -1
 - lionagi/service/hooks/hook_event.py +3 -8
 - lionagi/service/hooks/hook_registry.py +5 -5
 - lionagi/service/hooks/hooked_event.py +61 -1
 - lionagi/service/imodel.py +24 -20
 - lionagi/service/third_party/claude_code.py +1 -2
 - lionagi/service/third_party/openai_models.py +24 -22
 - lionagi/service/token_calculator.py +1 -94
 - lionagi/session/branch.py +26 -228
 - lionagi/session/session.py +5 -90
 - lionagi/version.py +1 -1
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/METADATA +6 -5
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/RECORD +62 -82
 - lionagi/fields/__init__.py +0 -47
 - lionagi/fields/action.py +0 -188
 - lionagi/fields/base.py +0 -153
 - lionagi/fields/code.py +0 -239
 - lionagi/fields/file.py +0 -234
 - lionagi/fields/instruct.py +0 -135
 - lionagi/fields/reason.py +0 -55
 - lionagi/fields/research.py +0 -52
 - lionagi/operations/brainstorm/__init__.py +0 -2
 - lionagi/operations/brainstorm/brainstorm.py +0 -498
 - lionagi/operations/brainstorm/prompt.py +0 -11
 - lionagi/operations/instruct/__init__.py +0 -2
 - lionagi/operations/instruct/instruct.py +0 -28
 - lionagi/operations/plan/__init__.py +0 -6
 - lionagi/operations/plan/plan.py +0 -386
 - lionagi/operations/plan/prompt.py +0 -25
 - lionagi/operations/utils.py +0 -45
 - lionagi/protocols/forms/__init__.py +0 -2
 - lionagi/protocols/forms/base.py +0 -85
 - lionagi/protocols/forms/flow.py +0 -79
 - lionagi/protocols/forms/form.py +0 -86
 - lionagi/protocols/forms/report.py +0 -48
 - lionagi/protocols/mail/__init__.py +0 -2
 - lionagi/protocols/mail/exchange.py +0 -220
 - lionagi/protocols/mail/mail.py +0 -51
 - lionagi/protocols/mail/mailbox.py +0 -103
 - lionagi/protocols/mail/manager.py +0 -218
 - lionagi/protocols/mail/package.py +0 -101
 - lionagi/protocols/operatives/__init__.py +0 -2
 - lionagi/protocols/operatives/operative.py +0 -362
 - lionagi/protocols/operatives/step.py +0 -227
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/WHEEL +0 -0
 - {lionagi-0.18.0.dist-info → lionagi-0.18.2.dist-info}/licenses/LICENSE +0 -0
 
| 
         @@ -1,227 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Copyright (c) 2023-2025, HaiyangLi <quantocean.li at gmail dot com>
         
     | 
| 
       2 
     | 
    
         
            -
            # SPDX-License-Identifier: Apache-2.0
         
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
            from pydantic import BaseModel
         
     | 
| 
       5 
     | 
    
         
            -
            from pydantic.fields import FieldInfo
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            from lionagi.fields.action import (
         
     | 
| 
       8 
     | 
    
         
            -
                ACTION_REQUESTS_FIELD,
         
     | 
| 
       9 
     | 
    
         
            -
                ACTION_REQUIRED_FIELD,
         
     | 
| 
       10 
     | 
    
         
            -
                ACTION_RESPONSES_FIELD,
         
     | 
| 
       11 
     | 
    
         
            -
            )
         
     | 
| 
       12 
     | 
    
         
            -
            from lionagi.fields.reason import REASON_FIELD
         
     | 
| 
       13 
     | 
    
         
            -
            from lionagi.models import FieldModel, ModelParams
         
     | 
| 
       14 
     | 
    
         
            -
            from lionagi.protocols.operatives.operative import Operative
         
     | 
| 
       15 
     | 
    
         
            -
             
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            class Step:
         
     | 
| 
       18 
     | 
    
         
            -
                """Utility class providing methods to create and manage Operative instances for steps."""
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                @staticmethod
         
     | 
| 
       21 
     | 
    
         
            -
                def request_operative(
         
     | 
| 
       22 
     | 
    
         
            -
                    *,
         
     | 
| 
       23 
     | 
    
         
            -
                    operative: Operative = None,
         
     | 
| 
       24 
     | 
    
         
            -
                    operative_name: str | None = None,
         
     | 
| 
       25 
     | 
    
         
            -
                    reason: bool = False,
         
     | 
| 
       26 
     | 
    
         
            -
                    actions: bool = False,
         
     | 
| 
       27 
     | 
    
         
            -
                    request_params: ModelParams | None = None,
         
     | 
| 
       28 
     | 
    
         
            -
                    parameter_fields: dict[str, FieldInfo] | None = None,
         
     | 
| 
       29 
     | 
    
         
            -
                    base_type: type[BaseModel] | None = None,
         
     | 
| 
       30 
     | 
    
         
            -
                    field_models: list[FieldModel] | None = None,
         
     | 
| 
       31 
     | 
    
         
            -
                    exclude_fields: list[str] | None = None,
         
     | 
| 
       32 
     | 
    
         
            -
                    new_model_name: str | None = None,
         
     | 
| 
       33 
     | 
    
         
            -
                    field_descriptions: dict[str, str] | None = None,
         
     | 
| 
       34 
     | 
    
         
            -
                    inherit_base: bool = True,
         
     | 
| 
       35 
     | 
    
         
            -
                    config_dict: dict | None = None,
         
     | 
| 
       36 
     | 
    
         
            -
                    doc: str | None = None,
         
     | 
| 
       37 
     | 
    
         
            -
                    frozen: bool = False,
         
     | 
| 
       38 
     | 
    
         
            -
                    max_retries: int = None,
         
     | 
| 
       39 
     | 
    
         
            -
                    auto_retry_parse: bool = True,
         
     | 
| 
       40 
     | 
    
         
            -
                    parse_kwargs: dict | None = None,
         
     | 
| 
       41 
     | 
    
         
            -
                ) -> Operative:
         
     | 
| 
       42 
     | 
    
         
            -
                    """Creates an Operative instance configured for request handling.
         
     | 
| 
       43 
     | 
    
         
            -
             
     | 
| 
       44 
     | 
    
         
            -
                    Args:
         
     | 
| 
       45 
     | 
    
         
            -
                        operative_name (str, optional): Name of the operative.
         
     | 
| 
       46 
     | 
    
         
            -
                        reason (bool, optional): Whether to include reason field.
         
     | 
| 
       47 
     | 
    
         
            -
                        actions (bool, optional): Whether to include action fields.
         
     | 
| 
       48 
     | 
    
         
            -
                        request_params (ModelParams, optional): Parameters for the new model.
         
     | 
| 
       49 
     | 
    
         
            -
                        parameter_fields (dict[str, FieldInfo], optional): Parameter fields for the model.
         
     | 
| 
       50 
     | 
    
         
            -
                        base_type (type[BaseModel], optional): Base type for the model.
         
     | 
| 
       51 
     | 
    
         
            -
                        field_models (list[FieldModel], optional): List of field models.
         
     | 
| 
       52 
     | 
    
         
            -
                        exclude_fields (list[str], optional): List of fields to exclude.
         
     | 
| 
       53 
     | 
    
         
            -
                        new_model_name (str | None, optional): Name of the new model.
         
     | 
| 
       54 
     | 
    
         
            -
                        field_descriptions (dict[str, str], optional): Descriptions for the fields.
         
     | 
| 
       55 
     | 
    
         
            -
                        inherit_base (bool, optional): Whether to inherit base.
         
     | 
| 
       56 
     | 
    
         
            -
                        config_dict (dict | None, optional): Configuration dictionary.
         
     | 
| 
       57 
     | 
    
         
            -
                        doc (str | None, optional): Documentation string.
         
     | 
| 
       58 
     | 
    
         
            -
                        frozen (bool, optional): Whether the model is frozen.
         
     | 
| 
       59 
     | 
    
         
            -
                        max_retries (int, optional): Maximum number of retries.
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
     | 
    
         
            -
                    Returns:
         
     | 
| 
       62 
     | 
    
         
            -
                        Operative: The configured operative instance.
         
     | 
| 
       63 
     | 
    
         
            -
                    """
         
     | 
| 
       64 
     | 
    
         
            -
             
     | 
| 
       65 
     | 
    
         
            -
                    params = {}
         
     | 
| 
       66 
     | 
    
         
            -
                    if operative:
         
     | 
| 
       67 
     | 
    
         
            -
                        params = operative.model_dump()
         
     | 
| 
       68 
     | 
    
         
            -
                        request_params = operative.request_params.model_dump()
         
     | 
| 
       69 
     | 
    
         
            -
                        field_models = request_params.field_models
         
     | 
| 
       70 
     | 
    
         
            -
             
     | 
| 
       71 
     | 
    
         
            -
                    field_models = field_models or []
         
     | 
| 
       72 
     | 
    
         
            -
                    exclude_fields = exclude_fields or []
         
     | 
| 
       73 
     | 
    
         
            -
                    field_descriptions = field_descriptions or {}
         
     | 
| 
       74 
     | 
    
         
            -
                    if reason and REASON_FIELD not in field_models:
         
     | 
| 
       75 
     | 
    
         
            -
                        field_models.append(REASON_FIELD)
         
     | 
| 
       76 
     | 
    
         
            -
                    if actions and ACTION_REQUESTS_FIELD not in field_models:
         
     | 
| 
       77 
     | 
    
         
            -
                        field_models.extend(
         
     | 
| 
       78 
     | 
    
         
            -
                            [
         
     | 
| 
       79 
     | 
    
         
            -
                                ACTION_REQUESTS_FIELD,
         
     | 
| 
       80 
     | 
    
         
            -
                                ACTION_REQUIRED_FIELD,
         
     | 
| 
       81 
     | 
    
         
            -
                            ]
         
     | 
| 
       82 
     | 
    
         
            -
                        )
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                    if isinstance(request_params, ModelParams):
         
     | 
| 
       85 
     | 
    
         
            -
                        request_params = request_params.model_dump()
         
     | 
| 
       86 
     | 
    
         
            -
             
     | 
| 
       87 
     | 
    
         
            -
                    request_params = request_params or {}
         
     | 
| 
       88 
     | 
    
         
            -
                    request_params_fields = {
         
     | 
| 
       89 
     | 
    
         
            -
                        "parameter_fields": parameter_fields,
         
     | 
| 
       90 
     | 
    
         
            -
                        "field_models": field_models,
         
     | 
| 
       91 
     | 
    
         
            -
                        "exclude_fields": exclude_fields,
         
     | 
| 
       92 
     | 
    
         
            -
                        "field_descriptions": field_descriptions,
         
     | 
| 
       93 
     | 
    
         
            -
                        "inherit_base": inherit_base,
         
     | 
| 
       94 
     | 
    
         
            -
                        "config_dict": config_dict,
         
     | 
| 
       95 
     | 
    
         
            -
                        "doc": doc,
         
     | 
| 
       96 
     | 
    
         
            -
                        "frozen": frozen,
         
     | 
| 
       97 
     | 
    
         
            -
                        "base_type": base_type,
         
     | 
| 
       98 
     | 
    
         
            -
                        "name": new_model_name,
         
     | 
| 
       99 
     | 
    
         
            -
                    }
         
     | 
| 
       100 
     | 
    
         
            -
                    request_params.update(
         
     | 
| 
       101 
     | 
    
         
            -
                        {k: v for k, v in request_params_fields.items() if v is not None}
         
     | 
| 
       102 
     | 
    
         
            -
                    )
         
     | 
| 
       103 
     | 
    
         
            -
                    request_params = ModelParams(**request_params)
         
     | 
| 
       104 
     | 
    
         
            -
                    if max_retries:
         
     | 
| 
       105 
     | 
    
         
            -
                        params["max_retries"] = max_retries
         
     | 
| 
       106 
     | 
    
         
            -
                    if operative_name:
         
     | 
| 
       107 
     | 
    
         
            -
                        params["name"] = operative_name
         
     | 
| 
       108 
     | 
    
         
            -
                    if isinstance(auto_retry_parse, bool):
         
     | 
| 
       109 
     | 
    
         
            -
                        params["auto_retry_parse"] = auto_retry_parse
         
     | 
| 
       110 
     | 
    
         
            -
                    if parse_kwargs:
         
     | 
| 
       111 
     | 
    
         
            -
                        params["parse_kwargs"] = parse_kwargs
         
     | 
| 
       112 
     | 
    
         
            -
                    params["request_params"] = request_params
         
     | 
| 
       113 
     | 
    
         
            -
                    return Operative(**params)
         
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
                @staticmethod
         
     | 
| 
       116 
     | 
    
         
            -
                def respond_operative(
         
     | 
| 
       117 
     | 
    
         
            -
                    *,
         
     | 
| 
       118 
     | 
    
         
            -
                    operative: Operative,
         
     | 
| 
       119 
     | 
    
         
            -
                    additional_data: dict | None = None,
         
     | 
| 
       120 
     | 
    
         
            -
                    response_params: ModelParams | None = None,
         
     | 
| 
       121 
     | 
    
         
            -
                    field_models: list[FieldModel] | None = None,
         
     | 
| 
       122 
     | 
    
         
            -
                    frozen_response: bool = False,
         
     | 
| 
       123 
     | 
    
         
            -
                    response_config_dict: dict | None = None,
         
     | 
| 
       124 
     | 
    
         
            -
                    response_doc: str | None = None,
         
     | 
| 
       125 
     | 
    
         
            -
                    exclude_fields: list[str] | None = None,
         
     | 
| 
       126 
     | 
    
         
            -
                ) -> Operative:
         
     | 
| 
       127 
     | 
    
         
            -
                    """Updates the operative with response parameters and data.
         
     | 
| 
       128 
     | 
    
         
            -
             
     | 
| 
       129 
     | 
    
         
            -
                    Args:
         
     | 
| 
       130 
     | 
    
         
            -
                        operative (Operative): The operative instance to update.
         
     | 
| 
       131 
     | 
    
         
            -
                        additional_data (dict | None, optional): Additional data to include in the response.
         
     | 
| 
       132 
     | 
    
         
            -
                        response_params (ModelParams | None, optional): Parameters for the response model.
         
     | 
| 
       133 
     | 
    
         
            -
                        field_models (list[FieldModel] | None, optional): List of field models.
         
     | 
| 
       134 
     | 
    
         
            -
                        frozen_response (bool, optional): Whether the response model is frozen.
         
     | 
| 
       135 
     | 
    
         
            -
                        response_config_dict (dict | None, optional): Configuration dictionary for the response.
         
     | 
| 
       136 
     | 
    
         
            -
                        response_doc (str | None, optional): Documentation string for the response.
         
     | 
| 
       137 
     | 
    
         
            -
                        exclude_fields (list[str] | None, optional): List of fields to exclude.
         
     | 
| 
       138 
     | 
    
         
            -
             
     | 
| 
       139 
     | 
    
         
            -
                    Returns:
         
     | 
| 
       140 
     | 
    
         
            -
                        Operative: The updated operative instance.
         
     | 
| 
       141 
     | 
    
         
            -
                    """
         
     | 
| 
       142 
     | 
    
         
            -
             
     | 
| 
       143 
     | 
    
         
            -
                    additional_data = additional_data or {}
         
     | 
| 
       144 
     | 
    
         
            -
                    field_models = field_models or []
         
     | 
| 
       145 
     | 
    
         
            -
                    if hasattr(operative.response_model, "action_required"):
         
     | 
| 
       146 
     | 
    
         
            -
                        field_models.extend(
         
     | 
| 
       147 
     | 
    
         
            -
                            [
         
     | 
| 
       148 
     | 
    
         
            -
                                ACTION_RESPONSES_FIELD,
         
     | 
| 
       149 
     | 
    
         
            -
                                ACTION_REQUIRED_FIELD,
         
     | 
| 
       150 
     | 
    
         
            -
                                ACTION_REQUESTS_FIELD,
         
     | 
| 
       151 
     | 
    
         
            -
                            ]
         
     | 
| 
       152 
     | 
    
         
            -
                        )
         
     | 
| 
       153 
     | 
    
         
            -
                    if "reason" in type(operative.response_model).model_fields:
         
     | 
| 
       154 
     | 
    
         
            -
                        field_models.extend([REASON_FIELD])
         
     | 
| 
       155 
     | 
    
         
            -
             
     | 
| 
       156 
     | 
    
         
            -
                    operative = Step._create_response_type(
         
     | 
| 
       157 
     | 
    
         
            -
                        operative=operative,
         
     | 
| 
       158 
     | 
    
         
            -
                        response_params=response_params,
         
     | 
| 
       159 
     | 
    
         
            -
                        field_models=field_models,
         
     | 
| 
       160 
     | 
    
         
            -
                        frozen_response=frozen_response,
         
     | 
| 
       161 
     | 
    
         
            -
                        response_config_dict=response_config_dict,
         
     | 
| 
       162 
     | 
    
         
            -
                        response_doc=response_doc,
         
     | 
| 
       163 
     | 
    
         
            -
                        exclude_fields=exclude_fields,
         
     | 
| 
       164 
     | 
    
         
            -
                    )
         
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
                    data = operative.response_model.model_dump()
         
     | 
| 
       167 
     | 
    
         
            -
                    data.update(additional_data or {})
         
     | 
| 
       168 
     | 
    
         
            -
                    operative.response_model = operative.response_type.model_validate(data)
         
     | 
| 
       169 
     | 
    
         
            -
                    return operative
         
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
       171 
     | 
    
         
            -
                @staticmethod
         
     | 
| 
       172 
     | 
    
         
            -
                def _create_response_type(
         
     | 
| 
       173 
     | 
    
         
            -
                    operative: Operative,
         
     | 
| 
       174 
     | 
    
         
            -
                    response_params: ModelParams | None = None,
         
     | 
| 
       175 
     | 
    
         
            -
                    response_validators: dict | None = None,
         
     | 
| 
       176 
     | 
    
         
            -
                    frozen_response: bool = False,
         
     | 
| 
       177 
     | 
    
         
            -
                    response_config_dict: dict | None = None,
         
     | 
| 
       178 
     | 
    
         
            -
                    response_doc: str | None = None,
         
     | 
| 
       179 
     | 
    
         
            -
                    field_models: list[FieldModel] | None = None,
         
     | 
| 
       180 
     | 
    
         
            -
                    exclude_fields: list[str] | None = None,
         
     | 
| 
       181 
     | 
    
         
            -
                ) -> Operative:
         
     | 
| 
       182 
     | 
    
         
            -
                    """Internal method to create a response type for the operative.
         
     | 
| 
       183 
     | 
    
         
            -
             
     | 
| 
       184 
     | 
    
         
            -
                    Args:
         
     | 
| 
       185 
     | 
    
         
            -
                        operative (Operative): The operative instance.
         
     | 
| 
       186 
     | 
    
         
            -
                        response_params (ModelParams | None, optional): Parameters for the response model.
         
     | 
| 
       187 
     | 
    
         
            -
                        response_validators (dict | None, optional): Validators for the response model.
         
     | 
| 
       188 
     | 
    
         
            -
                        frozen_response (bool, optional): Whether the response model is frozen.
         
     | 
| 
       189 
     | 
    
         
            -
                        response_config_dict (dict | None, optional): Configuration dictionary for the response.
         
     | 
| 
       190 
     | 
    
         
            -
                        response_doc (str | None, optional): Documentation string for the response.
         
     | 
| 
       191 
     | 
    
         
            -
                        field_models (list[FieldModel] | None, optional): List of field models.
         
     | 
| 
       192 
     | 
    
         
            -
                        exclude_fields (list[str] | None, optional): List of fields to exclude.
         
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
       194 
     | 
    
         
            -
                    Returns:
         
     | 
| 
       195 
     | 
    
         
            -
                        Operative: The operative instance with updated response type.
         
     | 
| 
       196 
     | 
    
         
            -
                    """
         
     | 
| 
       197 
     | 
    
         
            -
             
     | 
| 
       198 
     | 
    
         
            -
                    field_models = field_models or []
         
     | 
| 
       199 
     | 
    
         
            -
             
     | 
| 
       200 
     | 
    
         
            -
                    if (
         
     | 
| 
       201 
     | 
    
         
            -
                        hasattr(operative.request_type, "action_required")
         
     | 
| 
       202 
     | 
    
         
            -
                        and operative.response_model.action_required
         
     | 
| 
       203 
     | 
    
         
            -
                    ):
         
     | 
| 
       204 
     | 
    
         
            -
                        field_models.extend(
         
     | 
| 
       205 
     | 
    
         
            -
                            [
         
     | 
| 
       206 
     | 
    
         
            -
                                ACTION_RESPONSES_FIELD,
         
     | 
| 
       207 
     | 
    
         
            -
                                ACTION_REQUIRED_FIELD,
         
     | 
| 
       208 
     | 
    
         
            -
                                ACTION_REQUESTS_FIELD,
         
     | 
| 
       209 
     | 
    
         
            -
                            ]
         
     | 
| 
       210 
     | 
    
         
            -
                        )
         
     | 
| 
       211 
     | 
    
         
            -
                    if hasattr(operative.request_type, "reason"):
         
     | 
| 
       212 
     | 
    
         
            -
                        field_models.extend([REASON_FIELD])
         
     | 
| 
       213 
     | 
    
         
            -
             
     | 
| 
       214 
     | 
    
         
            -
                    exclude_fields = exclude_fields or []
         
     | 
| 
       215 
     | 
    
         
            -
                    # Note: We no longer have access to request_params.exclude_fields
         
     | 
| 
       216 
     | 
    
         
            -
                    # since Operative doesn't store ModelParams anymore
         
     | 
| 
       217 
     | 
    
         
            -
             
     | 
| 
       218 
     | 
    
         
            -
                    operative.create_response_type(
         
     | 
| 
       219 
     | 
    
         
            -
                        response_params=response_params,
         
     | 
| 
       220 
     | 
    
         
            -
                        field_models=field_models,
         
     | 
| 
       221 
     | 
    
         
            -
                        exclude_fields=exclude_fields,
         
     | 
| 
       222 
     | 
    
         
            -
                        doc=response_doc,
         
     | 
| 
       223 
     | 
    
         
            -
                        config_dict=response_config_dict,
         
     | 
| 
       224 
     | 
    
         
            -
                        frozen=frozen_response,
         
     | 
| 
       225 
     | 
    
         
            -
                        validators=response_validators,
         
     | 
| 
       226 
     | 
    
         
            -
                    )
         
     | 
| 
       227 
     | 
    
         
            -
                    return operative
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |