Skip to content

Commit f557d03

Browse files
committed
Revert "feature: add not filter tool options to shopify"
This reverts commit addba72.
1 parent addba72 commit f557d03

2 files changed

Lines changed: 1 addition & 75 deletions

File tree

clients/trieve-shopify-extension/app/components/settings/LLMSettings.tsx

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import {
2424
PriceToolCallOptions,
2525
RelevanceToolCallOptions,
2626
SearchToolCallOptions,
27-
NotFilterToolCallOptions,
2827
} from "trieve-ts-sdk";
2928

3029
export 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-
6457
interface 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

7365
export 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>

clients/trieve-shopify-extension/app/routes/app._dashboard.settings.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
PriceToolCallOptions,
1818
type Dataset,
1919
SearchToolCallOptions,
20-
NotFilterToolCallOptions,
2120
} from "trieve-ts-sdk";
2221
import { createWebPixel, isWebPixelInstalled } from "app/queries/webPixel";
2322
import { getAppMetafields, setAppMetafields } from "app/queries/metafield";
@@ -42,7 +41,6 @@ export const loader = async ({
4241
relevanceToolCallOptions: RelevanceToolCallOptions | null;
4342
searchToolCallOptions: SearchToolCallOptions | null;
4443
priceToolCallOptions: PriceToolCallOptions | null;
45-
notFilterToolCallOptions: NotFilterToolCallOptions | null;
4644
}> => {
4745
const { session } = await authenticate.admin(request);
4846
const key = await validateTrieveAuth(request);
@@ -97,11 +95,6 @@ export const loader = async ({
9795
fetcher,
9896
"price_tool_call_options",
9997
);
100-
const notFilterToolCallOptions =
101-
await getAppMetafields<NotFilterToolCallOptions>(
102-
fetcher,
103-
"not_filter_tool_call_options",
104-
);
10598

10699
return {
107100
crawlSettings: crawlSettings?.crawlSettings,
@@ -112,7 +105,6 @@ export const loader = async ({
112105
relevanceToolCallOptions,
113106
searchToolCallOptions,
114107
priceToolCallOptions,
115-
notFilterToolCallOptions,
116108
};
117109
};
118110

@@ -221,9 +213,6 @@ export const action = async ({ request }: ActionFunctionArgs) => {
221213
);
222214
const priceToolCallOptions = formData.get("price_tool_call_options");
223215
const searchToolCallOptions = formData.get("search_tool_call_options");
224-
const notFilterToolCallOptions = formData.get(
225-
"not_filter_tool_call_options",
226-
);
227216
await setAppMetafields(fetcher, [
228217
{
229218
key: "relevance_tool_call_options",
@@ -240,11 +229,6 @@ export const action = async ({ request }: ActionFunctionArgs) => {
240229
value: searchToolCallOptions as string,
241230
type: "json",
242231
},
243-
{
244-
key: "not_filter_tool_call_options",
245-
value: notFilterToolCallOptions as string,
246-
type: "json",
247-
},
248232
]);
249233
return { success: true };
250234
}
@@ -299,7 +283,6 @@ export default function Dataset() {
299283
relevanceToolCallOptions,
300284
searchToolCallOptions,
301285
priceToolCallOptions,
302-
notFilterToolCallOptions,
303286
} = useLoaderData<typeof loader>();
304287
const [selectedTab, setSelectedTab] = useState(0);
305288

@@ -365,7 +348,6 @@ export default function Dataset() {
365348
existingRelevanceToolCallOptions={relevanceToolCallOptions}
366349
existingSearchToolCallOptions={searchToolCallOptions}
367350
existingPriceToolCallOptions={priceToolCallOptions}
368-
existingNotFilterToolCallOptions={notFilterToolCallOptions}
369351
/>
370352
),
371353
"preset-questions": <PresetQuestions initialQuestions={presetQuestions} />,

0 commit comments

Comments
 (0)