21
21
import com .bytechef .component .OpenApiComponentHandler ;
22
22
import com .bytechef .component .definition .ActionDefinition ;
23
23
import com .bytechef .component .definition .ComponentCategory ;
24
- import com .bytechef .component .definition .ComponentDsl .ModifiableArrayProperty ;
25
24
import com .bytechef .component .definition .ComponentDsl .ModifiableComponentDefinition ;
26
25
import com .bytechef .component .definition .ComponentDsl .ModifiableProperty ;
27
26
import com .bytechef .component .definition .ComponentDsl .ModifiableStringProperty ;
28
27
import com .google .auto .service .AutoService ;
29
28
import java .util .Objects ;
30
29
31
30
/**
32
- * This class will not be overwritten on the subsequent calls of the generator.
31
+ * @author Marija Horvat
33
32
*/
34
33
@ AutoService (OpenApiComponentHandler .class )
35
34
public class TavilyComponentHandler extends AbstractTavilyComponentHandler {
@@ -38,7 +37,8 @@ public class TavilyComponentHandler extends AbstractTavilyComponentHandler {
38
37
public ModifiableComponentDefinition modifyComponent (ModifiableComponentDefinition modifiableComponentDefinition ) {
39
38
return modifiableComponentDefinition
40
39
.icon ("path:assets/tavily.svg" )
41
- .categories (ComponentCategory .ARTIFICIAL_INTELLIGENCE );
40
+ .categories (ComponentCategory .ARTIFICIAL_INTELLIGENCE )
41
+ .customAction (true );
42
42
}
43
43
44
44
@ Override
@@ -48,28 +48,25 @@ public ModifiableProperty<?> modifyProperty(
48
48
if (Objects .equals (modifiableProperty .getName (), "topic" )) {
49
49
((ModifiableStringProperty ) modifiableProperty )
50
50
.options (
51
- option ("General" , "general" , "general -purpose searches that may include a wide range of sources" ),
52
- option ("News" , "news" , "real -time updates" ));
51
+ option ("General" , "general" , "General -purpose searches that may include a wide range of sources. " ),
52
+ option ("News" , "news" , "Real -time updates. " ));
53
53
} else if (Objects .equals (modifiableProperty .getName (), "search_depth" )) {
54
54
((ModifiableStringProperty ) modifiableProperty )
55
55
.options (
56
- option ("Basic" , "basic" , "provides generic content snippets from each source" ),
57
- option ("Advanced" , "advanced" , "retrieves the most relevant sources" ));
56
+ option ("Basic" , "basic" , "Provides generic content snippets from each source. " ),
57
+ option ("Advanced" , "advanced" , "Retrieves the most relevant sources. " ));
58
58
} else if (Objects .equals (modifiableProperty .getName (), "time_range" )) {
59
59
((ModifiableStringProperty ) modifiableProperty )
60
60
.options (
61
- option ("Day" , "day" , "returns results from the past 24 hours" ),
62
- option ("Week" , "week" , "returns results from the past 7 days" ),
63
- option ("Month" , "month" , "returns results from the past 30 days" ),
64
- option ("Year" , "year" , "returns results from the past 365 days" ));
65
- } else if (Objects .equals (modifiableProperty .getName (), "urls" )) {
66
- ((ModifiableArrayProperty ) modifiableProperty )
67
- .label ("URLs" );
61
+ option ("Day" , "day" , "Results from the past 24 hours" ),
62
+ option ("Week" , "week" , "Results from the past 7 days" ),
63
+ option ("Month" , "month" , "Results from the past 30 days" ),
64
+ option ("Year" , "year" , "Results from the past 365 days" ));
68
65
} else if (Objects .equals (modifiableProperty .getName (), "extract_depth" )) {
69
66
((ModifiableStringProperty ) modifiableProperty )
70
67
.options (
71
- option ("Basic" , "basic" , "retrieves basic data" ),
72
- option ("Advanced" , "advanced" , "retrieves more data, including tables and embedded content" ));
68
+ option ("Basic" , "basic" , "Retrieves basic data. " ),
69
+ option ("Advanced" , "advanced" , "Retrieves more data, including tables and embedded content. " ));
73
70
}
74
71
75
72
return modifiableProperty ;
0 commit comments