@@ -24,7 +24,6 @@ import {
2424 PriceToolCallOptions ,
2525 RelevanceToolCallOptions ,
2626 SearchToolCallOptions ,
27- NotFilterToolCallOptions ,
2827} from "trieve-ts-sdk" ;
2928
3029export const defaultRelevanceToolCallOptions : RelevanceToolCallOptions = {
@@ -55,28 +54,20 @@ export const defaultSearchToolCallOptions: SearchToolCallOptions = {
5554 "Call this tool anytime it seems like we need to skip the search step. This tool tells our system that the user is asking about what they were previously shown." ,
5655} ;
5756
58- export const defaultNotFilterToolCallOptions : NotFilterToolCallOptions = {
59- userMessageTextPrefix : "Here is the user query:" ,
60- toolDescription :
61- "Set to true if the query is not interested in the products they were shown previously or would like to see something different. Ensure that this is only set to true when the user wants to see something different from the previously returned results or is not interested in those previously returned results." ,
62- } ;
63-
6457interface LLMSettingsProps {
6558 shopDataset : Dataset ;
6659 existingPdpPrompt : string ;
6760 existingRelevanceToolCallOptions : RelevanceToolCallOptions | null ;
6861 existingPriceToolCallOptions : PriceToolCallOptions | null ;
6962 existingSearchToolCallOptions : SearchToolCallOptions | null ;
70- existingNotFilterToolCallOptions : NotFilterToolCallOptions | null ;
7163}
7264
7365export function LLMSettings ( {
7466 shopDataset,
7567 existingPdpPrompt,
7668 existingRelevanceToolCallOptions,
7769 existingPriceToolCallOptions,
78- existingSearchToolCallOptions,
79- existingNotFilterToolCallOptions,
70+ existingSearchToolCallOptions
8071} : LLMSettingsProps ) {
8172 const shopify = useAppBridge ( ) ;
8273 const submit = useSubmit ( ) ;
@@ -101,10 +92,6 @@ export function LLMSettings({
10192 existingSearchToolCallOptions ?? defaultSearchToolCallOptions ,
10293 ) ;
10394
104- const [ notFilterToolCallOptions , setNotFilterToolCallOptions ] = useState (
105- existingNotFilterToolCallOptions ?? defaultNotFilterToolCallOptions ,
106- ) ;
107-
10895 const onLLMSettingsSave = async ( ) => {
10996 submit (
11097 {
@@ -127,7 +114,6 @@ export function LLMSettings({
127114 relevance_tool_call_options : JSON . stringify ( relevanceToolCallOptions ) ,
128115 price_tool_call_options : JSON . stringify ( priceToolCallOptions ) ,
129116 search_tool_call_options : JSON . stringify ( searchToolCallOptions ) ,
130- not_filter_tool_call_options : JSON . stringify ( notFilterToolCallOptions ) ,
131117 dataset_id : shopDataset . id ,
132118 type : "tool_call_options" ,
133119 } ,
@@ -532,48 +518,6 @@ export function LLMSettings({
532518 < Button onClick = { saveToolCallOptions } > Save</ Button >
533519 </ InlineStack >
534520 </ Card >
535- < Card roundedAbove = "sm" >
536- < BlockStack gap = "400" >
537- < FormLayout >
538- < Text as = "h1" variant = "headingMd" >
539- Not Filter Tool Configuration
540- </ Text >
541- < BlockStack gap = "400" >
542- < TextField
543- label = "Tool Description"
544- helpText = "The description of the tool"
545- value = { notFilterToolCallOptions . toolDescription ?? "" }
546- onChange = { ( e ) =>
547- setNotFilterToolCallOptions ( {
548- ...notFilterToolCallOptions ,
549- toolDescription : e ,
550- } )
551- }
552- multiline = { 3 }
553- autoComplete = "off"
554- />
555- < TextField
556- label = "User Message Text Prefix"
557- helpText = "The prefix to use before showing the the users message"
558- value = {
559- notFilterToolCallOptions . userMessageTextPrefix ?? ""
560- }
561- onChange = { ( e ) =>
562- setNotFilterToolCallOptions ( {
563- ...notFilterToolCallOptions ,
564- userMessageTextPrefix : e ,
565- } )
566- }
567- multiline = { 3 }
568- autoComplete = "off"
569- />
570- </ BlockStack >
571- </ FormLayout >
572- </ BlockStack >
573- < InlineStack align = "end" gap = "200" >
574- < Button onClick = { saveToolCallOptions } > Save</ Button >
575- </ InlineStack >
576- </ Card >
577521 </ BlockStack >
578522 </ InlineGrid >
579523 </ BlockStack >
0 commit comments