Skip to content

Commit

Permalink
fix: correct time-weighted retrieval toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Aug 26, 2024
1 parent 6d33ff6 commit 81fa0b8
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions web/screens/Thread/ThreadRightPanel/Tools/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Tools = () => {
const componentDataAssistantSetting = getConfigurationsData(
(activeThread?.assistants[0]?.tools &&
activeThread?.assistants[0]?.tools[0]?.settings) ??
{}
{}

Check failure on line 30 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

Insert `··`

Check failure on line 30 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

Insert `··`

Check failure on line 30 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows-pr

Insert `··`
)

useEffect(() => {
Expand Down Expand Up @@ -183,19 +183,6 @@ const Tools = () => {
your specific use case."
/>
</label>
<div className="ml-auto flex items-center justify-between">
<Switch
name="use-time-weighted-retriever"
className="mr-2"
checked={
activeThread?.assistants[0].tools[0]
.useTimeWeightedRetriever || false
}
onChange={(e) =>
onTimeWeightedRetrieverSwitchUpdate(e.target.checked)
}
/>
</div>
</div>

<div className="w-full">
Expand Down Expand Up @@ -223,6 +210,20 @@ const Tools = () => {
also considers when they were added to give
newer ones more importance."
/>
<div className="ml-auto flex items-center justify-between">
<Switch
name="use-time-weighted-retriever"
className="mr-2"
checked={
activeThread?.assistants[0].tools[0]
.useTimeWeightedRetriever || false
}
onChange={(e) =>
onTimeWeightedRetrieverSwitchUpdate(e.target.checked)
}
/>
</div>

Check failure on line 225 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-macos

Delete `⏎`

Check failure on line 225 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-ubuntu

Delete `⏎`

Check failure on line 225 in web/screens/Thread/ThreadRightPanel/Tools/index.tsx

View workflow job for this annotation

GitHub Actions / test-on-windows-pr

Delete `␍⏎`

</div>
</div>
<AssistantSetting
Expand Down

0 comments on commit 81fa0b8

Please sign in to comment.