Skip to content

Commit

Permalink
added default model selection
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoudharyHarish committed Nov 18, 2024
1 parent a0c0f55 commit 472e309
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const Left = (props: any) => {
resetQA,
} = useDocsQAContext()

console.log(selectedQueryModel)

const { setIsCreateApplicationModalOpen } = props

return (
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/screens/dashboard/docsqa/main/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ export const DocsQAProvider: React.FC<DocsQAProviderProps> = ({ children }) => {
setSelectedQueryController(allQueryControllers[0])
}, [allQueryControllers])

useEffect(() => {
if (allEnabledModels && allEnabledModels.length) {
setSelectedQueryModel(allEnabledModels[0].name)
}
}, [allEnabledModels])

useEffect(() => {
if (allRetrieverOptions && allRetrieverOptions.length) {
setSelectedRetriever(allRetrieverOptions[0])
Expand Down

0 comments on commit 472e309

Please sign in to comment.