Skip to content

Commit

Permalink
Merge pull request #3456 from janhq/fix/correct-time-weighted-retriev…
Browse files Browse the repository at this point in the history
…al-toggle

fix: correct time-weighted retrieval toggle
  • Loading branch information
louis-jan authored Aug 26, 2024
2 parents 7fca45a + fe71380 commit 4228b9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion web/app/search/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect } from 'react'

import { AppConfiguration, getUserHomePath, joinPath } from '@janhq/core'
import { AppConfiguration, getUserHomePath } from '@janhq/core'

import { useSetAtom } from 'jotai'

Expand Down
2 changes: 1 addition & 1 deletion web/containers/Providers/DataLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Fragment, ReactNode, useEffect } from 'react'

import { AppConfiguration, getUserHomePath, joinPath } from '@janhq/core'
import { AppConfiguration, getUserHomePath } from '@janhq/core'
import { useSetAtom } from 'jotai'

import useAssistants from '@/hooks/useAssistants'
Expand Down
25 changes: 12 additions & 13 deletions web/screens/Thread/ThreadRightPanel/Tools/index.tsx
Original file line number Diff line number Diff line change
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,18 @@ 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"
checked={
activeThread?.assistants[0].tools[0]
.useTimeWeightedRetriever || false
}
onChange={(e) =>
onTimeWeightedRetrieverSwitchUpdate(e.target.checked)
}
/>
</div>
</div>
</div>
<AssistantSetting
Expand Down

0 comments on commit 4228b9f

Please sign in to comment.