Merge pull request #3456 from janhq/fix/correct-time-weighted-retrieval-toggle

fix: correct time-weighted retrieval toggle
This commit is contained in:
Louis 2024-08-26 20:21:09 +07:00 committed by GitHub
commit 4228b9ff9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 15 deletions

View File

@ -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'

View File

@ -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'

View File

@ -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">
@ -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