Skip to content

Commit 416a88f

Browse files
committed
Revert "feature: add not tool call filter options to dashboard"
This reverts commit 5bd1fe2.
1 parent a66f3c7 commit 416a88f

11 files changed

Lines changed: 5 additions & 132 deletions

File tree

clients/search-component/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ declare module "solid-js" {
115115
| hideOverlay | boolean | false |
116116
| overrideFetch | boolean | false |
117117
| imageStarterText | string | "Drag and drop an image here or click to upload" |
118-
| notFilterToolCallOptions | {userMessageTextPrefix?: string; toolDescription?: string} | `{ userMessageTextPrefix: "Here is the user query:", toolDescription: "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." }` |
119118

120119
### Search Results
121120

clients/search-component/src/utils/hooks/modal-context.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ const defaultProps = {
276276
} as searchOptions,
277277
chatFilters: undefined,
278278
searchToolCallOptions: defaultSearchToolCallOptions,
279-
notFilterToolCallOptions: defaultNotFilterToolCallOptions,
280279
analytics: true,
281280
chat: true,
282281
suggestedQueries: true,

clients/ts-sdk/openapi.json

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15910,19 +15910,6 @@
1591015910
}
1591115911
]
1591215912
},
15913-
"NotFilterToolCallOptions": {
15914-
"type": "object",
15915-
"properties": {
15916-
"toolDescription": {
15917-
"type": "string",
15918-
"nullable": true
15919-
},
15920-
"userMessageTextPrefix": {
15921-
"type": "string",
15922-
"nullable": true
15923-
}
15924-
}
15925-
},
1592615913
"OcrStrategy": {
1592715914
"type": "string",
1592815915
"description": "Controls the Optical Character Recognition (OCR) strategy.\n- `All`: Processes all pages with OCR. (Latency penalty: ~0.5 seconds per page)\n- `Auto`: Selectively applies OCR only to pages with missing or low-quality text. When text layer is present the bounding boxes from the text layer are used.",
@@ -16544,14 +16531,6 @@
1654416531
"type": "string",
1654516532
"nullable": true
1654616533
},
16547-
"notFilterToolCallOptions": {
16548-
"allOf": [
16549-
{
16550-
"$ref": "#/components/schemas/NotFilterToolCallOptions"
16551-
}
16552-
],
16553-
"nullable": true
16554-
},
1655516534
"numberOfSuggestions": {
1655616535
"type": "integer",
1655716536
"nullable": true,

clients/ts-sdk/src/types.gen.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,11 +2886,6 @@ export type MultiQuery = {
28862886

28872887
export type NewChunkMetadataTypes = SlimChunkMetadataWithArrayTagSet | ChunkMetadata | ContentChunkMetadata;
28882888

2889-
export type NotFilterToolCallOptions = {
2890-
toolDescription?: (string) | null;
2891-
userMessageTextPrefix?: (string) | null;
2892-
};
2893-
28942889
/**
28952890
* Controls the Optical Character Recognition (OCR) strategy.
28962891
* - `All`: Processes all pages with OCR. (Latency penalty: ~0.5 seconds per page)
@@ -3087,7 +3082,6 @@ export type PublicPageParameters = {
30873082
inlineHeader?: (string) | null;
30883083
isTestMode?: (boolean) | null;
30893084
navLogoImgSrcUrl?: (string) | null;
3090-
notFilterToolCallOptions?: ((NotFilterToolCallOptions) | null);
30913085
numberOfSuggestions?: (number) | null;
30923086
openGraphMetadata?: ((OpenGraphMetadata) | null);
30933087
openLinksInNewTab?: (boolean) | null;

frontends/dashboard/src/hooks/usePublicPageSettings.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ApiRoutes } from "../components/Routes";
1919
import { HeroPatterns } from "../pages/dataset/HeroPatterns";
2020
import { createInitializedContext } from "../utils/initialize";
2121
import {
22-
defaultNotFilterToolCallOptions,
2322
defaultOpenGraphMetadata,
2423
defaultPriceToolCallOptions,
2524
defaultRelevanceToolCallOptions,
@@ -101,12 +100,6 @@ export const { use: usePublicPage, provider: PublicPageProvider } =
101100
});
102101
}
103102

104-
if (!extraParams.notFilterToolCallOptions) {
105-
setExtraParams("notFilterToolCallOptions", {
106-
...defaultNotFilterToolCallOptions,
107-
});
108-
}
109-
110103
if (!extraParams.openGraphMetadata) {
111104
setExtraParams("openGraphMetadata", {
112105
...defaultOpenGraphMetadata,

frontends/dashboard/src/pages/dataset/PublicPageSettings.tsx

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
$OpenApiTs,
2828
ChunkMetadata,
2929
CrawlRequest,
30-
NotFilterToolCallOptions,
3130
PriceToolCallOptions,
3231
PublicPageTabMessage,
3332
RelevanceToolCallOptions,
@@ -94,12 +93,6 @@ export const defaultPriceToolCallOptions: PriceToolCallOptions = {
9493
"Maximum price of the product. Only set this if a maximum price is mentioned in the query.",
9594
};
9695

97-
export const defaultNotFilterToolCallOptions: NotFilterToolCallOptions = {
98-
userMessageTextPrefix: "Here is the user query:",
99-
toolDescription:
100-
"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.",
101-
};
102-
10396
const searchTypeOptions = [
10497
{
10598
label: "Docs, Blog, etc.",
@@ -1773,77 +1766,6 @@ const PublicPageControls = () => {
17731766
</div>
17741767
</details>
17751768

1776-
<details class="my-4">
1777-
<summary class="cursor-pointer text-sm font-medium">
1778-
Not Filter Tool Options
1779-
</summary>
1780-
<div class="mt-4 space-y-4">
1781-
<div class="grid grid-cols-2 gap-4">
1782-
<div class="grow">
1783-
<div class="flex items-center gap-1">
1784-
<label class="block" for="">
1785-
Not Filter Tool Description
1786-
</label>
1787-
<Tooltip
1788-
tooltipText="Description of the not filter tool provided to the model."
1789-
body={
1790-
<FaRegularCircleQuestion class="h-3 w-3 text-black" />
1791-
}
1792-
/>
1793-
</div>
1794-
<textarea
1795-
value={
1796-
(extraParams.notFilterToolCallOptions?.toolDescription ||
1797-
defaultNotFilterToolCallOptions.toolDescription) as string
1798-
}
1799-
onInput={(e) =>
1800-
setExtraParams(
1801-
"notFilterToolCallOptions",
1802-
"toolDescription",
1803-
e.currentTarget.value,
1804-
)
1805-
}
1806-
rows="4"
1807-
name="messageToQueryPrompt"
1808-
id="messageToQueryPrompt"
1809-
class="block w-full rounded-md border-[0.5px] border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
1810-
/>
1811-
</div>
1812-
<div class="grow">
1813-
<div class="flex items-center gap-1">
1814-
<label class="block" for="">
1815-
Not Filter Prompt
1816-
</label>
1817-
<Tooltip
1818-
tooltipText="Prompt to the model to use the search tool."
1819-
body={
1820-
<FaRegularCircleQuestion class="h-3 w-3 text-black" />
1821-
}
1822-
/>
1823-
</div>
1824-
<textarea
1825-
value={
1826-
(extraParams.notFilterToolCallOptions
1827-
?.userMessageTextPrefix ||
1828-
defaultNotFilterToolCallOptions.userMessageTextPrefix) as string
1829-
}
1830-
onInput={(e) =>
1831-
setExtraParams(
1832-
"notFilterToolCallOptions",
1833-
"userMessageTextPrefix",
1834-
e.currentTarget.value,
1835-
)
1836-
}
1837-
rows="4"
1838-
name="messageToQueryPrompt"
1839-
id="messageToQueryPrompt"
1840-
class="block w-full rounded-md border-[0.5px] border-neutral-300 px-3 py-1.5 shadow-sm placeholder:text-neutral-400 focus:outline-magenta-500 sm:text-sm sm:leading-6"
1841-
/>
1842-
</div>
1843-
</div>
1844-
</div>
1845-
</details>
1846-
18471769
<div class="space-x-1.5 pt-8">
18481770
<button
18491771
class="inline-flex justify-center rounded-md bg-magenta-500 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-magenta-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-magenta-900 disabled:opacity-40"

server/src/data/models.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3478,9 +3478,6 @@ impl DatasetConfigurationDTO {
34783478
search_tool_call_options: page_parameters_self
34793479
.search_tool_call_options
34803480
.or(page_parameters_curr.search_tool_call_options),
3481-
not_filter_tool_call_options: page_parameters_self
3482-
.not_filter_tool_call_options
3483-
.or(page_parameters_curr.not_filter_tool_call_options),
34843481
suggested_queries: page_parameters_self
34853482
.suggested_queries
34863483
.or(page_parameters_curr.suggested_queries),

server/src/handlers/page_handler.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,6 @@ pub struct SearchToolCallOptions {
208208
pub no_search_rag_context: Option<String>,
209209
}
210210

211-
#[derive(Serialize, Deserialize, Debug, Clone, ToSchema, Default)]
212-
#[serde(rename_all = "camelCase")]
213-
pub struct NotFilterToolCallOptions {
214-
pub tool_description: Option<String>,
215-
#[serde(skip_serializing_if = "Option::is_none")]
216-
pub user_message_text_prefix: Option<String>,
217-
}
218-
219211
#[derive(Serialize, Deserialize, Debug, Clone, ToSchema, Default)]
220212
#[serde(rename_all = "camelCase")]
221213
pub struct TagProp {
@@ -295,8 +287,6 @@ pub struct PublicPageParameters {
295287
#[serde(skip_serializing_if = "Option::is_none")]
296288
pub search_tool_call_options: Option<SearchToolCallOptions>,
297289
#[serde(skip_serializing_if = "Option::is_none")]
298-
pub not_filter_tool_call_options: Option<NotFilterToolCallOptions>,
299-
#[serde(skip_serializing_if = "Option::is_none")]
300290
pub suggested_queries: Option<bool>,
301291
#[serde(skip_serializing_if = "Option::is_none")]
302292
pub followup_questions: Option<bool>,

server/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ impl Modify for SecurityAddon {
472472
handlers::page_handler::RelevanceToolCallOptions,
473473
handlers::page_handler::PriceToolCallOptions,
474474
handlers::page_handler::SearchToolCallOptions,
475-
handlers::page_handler::NotFilterToolCallOptions,
476475
handlers::page_handler::PublicPageTheme,
477476
handlers::page_handler::PublicPageParameters,
478477
handlers::page_handler::PublicPageTabMessage,

server/src/public/search-component-code.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@
4040
{% if params.relevanceToolCallOptions -%}
4141
relevanceToolCallOptions: {{ params.relevanceToolCallOptions | tojson }},
4242
{% endif -%}
43-
{% if params.notFilterToolCallOptions -%}
44-
notFilterToolCallOptions: {{ params.notFilterToolCallOptions | tojson }},
45-
{% endif -%}
4643
{% if params.responsive -%}
4744
responsive: {{ params.responsive }},
4845
{% endif -%}

0 commit comments

Comments
 (0)