File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,27 @@ def aott_raise(
131
131
if not (contains_media and not is_custom )
132
132
else meaning_typed_input_list
133
133
)
134
- return model (meaning_typed_input , media = media , ** model_params ) # type: ignore
134
+ if is_custom :
135
+ try :
136
+ # This is a temporary solution to enable passing in custom
137
+ # parameters to custom models
138
+ # custom model should override the __call__ method to
139
+ # accept function_inputs parameter
140
+ return model (
141
+ meaning_typed_input , # type: ignore
142
+ media = media , # type: ignore
143
+ function_inputs = inputs_information , # type: ignore
144
+ ** model_params ,
145
+ )
146
+ except TypeError :
147
+ # this is for backward compatibility,
148
+ # for any existing custom models that do not have the
149
+ # function_inputs parameter
150
+ return model (
151
+ meaning_typed_input , media = media , ** model_params # type: ignore
152
+ )
153
+ else :
154
+ return model (meaning_typed_input , media = media , ** model_params ) # type: ignore
135
155
136
156
137
157
def execute_react (
You can’t perform that action at this time.
0 commit comments