Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multi modal parser and set qa max upload size to 200MB #410

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/modules/query_controllers/multimodal/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class MultiModalRAGQueryController(BaseQueryController):
async def _stream_vlm_answer(self, llm, message_payload, docs):
try:
async with async_timeout.timeout(GENERATION_TIMEOUT_SEC):
yield Docs(content=self._cleanup_metadata(docs))
yield Docs(content=self._enrich_context_for_stream_response(docs))
async for chunk in llm.astream(message_payload):
yield Answer(content=chunk.content)
except asyncio.TimeoutError:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

import { MenuItem, Select } from '@mui/material'
import { FormControl, MenuItem, Select } from '@mui/material'

interface ConfigProps {
title: string
Expand All @@ -25,31 +25,33 @@ const ConfigSelector = (props: ConfigProps) => {
return (
<div className={`flex justify-between items-center ${className}`}>
<div className="text-sm">{title}:</div>
<Select
value={initialValue}
onChange={(e) => handleOnChange(e)}
placeholder={placeholder + '...'}
sx={{
background: 'white',
height: '2rem',
width: '13.1875rem',
border: '1px solid #CEE0F8 !important',
outline: 'none !important',
'& fieldset': {
border: 'none !important',
},
}}
>
{data?.map((item: any) =>
renderItem ? (
renderItem(item)
) : (
<MenuItem value={item} key={item}>
{item}
</MenuItem>
),
)}
</Select>
<FormControl>
<Select
value={initialValue}
onChange={(e) => handleOnChange(e)}
label={placeholder + '...'}
sx={{
background: 'white',
height: '2rem',
width: '13.1875rem',
border: '1px solid #CEE0F8 !important',
outline: 'none !important',
'& fieldset': {
border: 'none !important',
},
}}
>
{data?.map((item: any) =>
renderItem ? (
renderItem(item)
) : (
<MenuItem value={item} key={item}>
{item}
</MenuItem>
),
)}
</Select>
</FormControl>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,20 @@ const Left = (props: any) => {
{allRetrieverOptions && selectedRetriever?.key && (
<ConfigSelector
title="Retriever"
placeholder="Select Retriever..."
initialValue={selectedRetriever?.summary}
placeholder="Select Retriever"
initialValue={selectedRetriever?.key}
data={allRetrieverOptions}
className="mt-4"
handleOnChange={(e) => {
console.log(allRetrieverOptions.map((retriever) => retriever.key))
const retriever = allRetrieverOptions.find(
(retriever) => retriever.key === e.target.value,
)
setSelectedRetriever(retriever)
setPromptTemplate(retriever?.promptTemplate)
}}
renderItem={(item) => (
<MenuItem key={item.key} value={item.summary}>
<MenuItem key={item.key} value={item.key}>
{item.summary}
</MenuItem>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/stores/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export const IS_DOCS_QA_REDIRECT_ENABLED =
export const DOCS_QA_STANDALONE_PATH = import.meta.env
.VITE_DOCS_QA_STANDALONE_PATH
export const DOCS_QA_MAX_UPLOAD_SIZE_MB = parseInt(
import.meta.env.VITE_DOCS_QA_MAX_UPLOAD_SIZE_MB || '2'
import.meta.env.VITE_DOCS_QA_MAX_UPLOAD_SIZE_MB || '200'
)
export const IS_LOCAL_DEVELOPMENT = import.meta.env.VITE_USE_LOCAL === 'true'
export const GTAG_ID = import.meta.env.VITE_GTAG_ID
Expand Down