Skip to content

Commit 97e57ff

Browse files
authored
Merge pull request #290 from n4ze3m/next
v1.9.5
2 parents 43a09e5 + 10f544b commit 97e57ff

File tree

25 files changed

+623
-78
lines changed

25 files changed

+623
-78
lines changed

app/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app",
33
"private": true,
4-
"version": "1.9.4",
4+
"version": "1.9.5",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

app/ui/src/@types/bot.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export type BotSettings = {
2121
semanticSearchSimilarityScore: string;
2222
inactivityTimeout: number;
2323
autoResetSession: boolean;
24+
autoSyncDataSources: boolean;
2425
};
2526
chatModel: {
2627
label: string;

app/ui/src/components/Bot/Settings/SettingsBody.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export const SettingsBody: React.FC<BotSettings> = ({
168168
semanticSearchSimilarityScore: data.semanticSearchSimilarityScore,
169169
autoResetSession: data.autoResetSession,
170170
inactivityTimeout: data.inactivityTimeout,
171+
autoSyncDataSources: data.autoSyncDataSources,
171172
}}
172173
form={form}
173174
requiredMark={false}
@@ -453,6 +454,14 @@ export const SettingsBody: React.FC<BotSettings> = ({
453454
placeholder="Enter inactivity timeout"
454455
/>
455456
</Form.Item>
457+
458+
<Form.Item
459+
name="autoSyncDataSources"
460+
label="Auto Sync Data Source(s)"
461+
tooltip="This will automatically re-fetch the URL-based data sources at a certain interval."
462+
>
463+
<Switch />
464+
</Form.Item>
456465
</div>
457466
</div>
458467

app/ui/src/components/Common/BotForm.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Props = {
3535
form: FormInstance<any>;
3636
showEmbeddingAndModels: boolean;
3737
newSelectedSource?: any;
38-
botConfig: BotConfig
38+
botConfig: BotConfig;
3939
};
4040
function classNames(...classes: string[]) {
4141
return classes.filter(Boolean).join(" ");
@@ -47,7 +47,7 @@ export const BotForm = ({
4747
setSelectedSource,
4848
form,
4949
showEmbeddingAndModels,
50-
botConfig
50+
botConfig,
5151
}: Props) => {
5252
const youtubeMode = Form.useWatch(["options", "youtube_mode"], form);
5353
const url = Form.useWatch(["content"], form);
@@ -117,7 +117,7 @@ export const BotForm = ({
117117
}}
118118
>
119119
<Upload.Dragger
120-
accept={`.pdf,.docx,.csv,.txt,.mp3,.mp4`}
120+
accept={`.pdf,.docx,.csv,.txt,.mp3,.mp4,.zip`}
121121
multiple={true}
122122
maxCount={botConfig?.fileUploadSizeLimit}
123123
beforeUpload={(file) => {
@@ -130,6 +130,8 @@ export const BotForm = ({
130130
"audio/mp4",
131131
"video/mp4",
132132
"video/mpeg",
133+
"application/zip",
134+
"application/x-zip-compressed",
133135
]
134136
.map((type) => type.toLowerCase())
135137
.join(", ");
@@ -161,12 +163,13 @@ export const BotForm = ({
161163
<InboxIcon className="h-10 w-10 text-gray-400" />
162164
</p>
163165
<p className="ant-upload-text">
164-
Click or drag PDF, Docx, CSV , TXT, MP3, MP4 files to this
166+
Click or drag PDF, Docx, CSV , TXT, MP3, MP4, Zip files to
167+
this
165168
</p>
166169
<p className="ant-upload-hint">
167-
Support is available for a single or bulk upload of up to 10
170+
{`Support is available for a single or bulk upload of up to ${botConfig?.fileUploadSizeLimit}
168171
files. Please note that file upload is in beta, so if you
169-
encounter any issues, kindly report them.
172+
encounter any issues, kindly report them.`}
170173
</p>
171174
</div>
172175
</Upload.Dragger>

app/ui/src/routes/settings/application.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export default function SettingsApplicationRoot() {
2929
dynamicallyFetchOllamaModels: boolean;
3030
ollamaURL: string;
3131
fileUploadSizeLimit: number;
32+
refetchDatasource: boolean;
3233
};
3334
});
3435

@@ -173,9 +174,15 @@ export default function SettingsApplicationRoot() {
173174
]}
174175
tooltip="Default is 10"
175176
>
176-
177177
<InputNumber size="large" style={{ width: "100%" }} />
178-
178+
</Form.Item>
179+
<Form.Item
180+
label="Refetch Data Source"
181+
name="refetchDatasource"
182+
valuePropName="checked"
183+
help="This will refetch the data source at a specific interval."
184+
>
185+
<Switch />
179186
</Form.Item>
180187
</div>
181188
<div className="bg-gray-50 border-x border-b rounded-b-md rounded-x-md px-4 py-3 text-right sm:px-6 dark:bg-[#141414] dark:border-gray-600">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dialoqbase",
3-
"version": "1.9.4",
3+
"version": "1.9.5",
44
"description": "Create chatbots with ease",
55
"scripts": {
66
"ui:dev": "pnpm run --filter ui dev",

server/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"cohere-ai": "^6.2.1",
6262
"concurrently": "^7.0.0",
6363
"copyfiles": "^2.4.1",
64+
"cron": "^3.1.7",
6465
"d3-dsv": "2",
6566
"date-fns": "^3.6.0",
6667
"discord.js": "^14.11.0",
@@ -92,6 +93,8 @@
9293
"turndown": "^7.1.3",
9394
"unique-names-generator": "^4.7.1",
9495
"wavefile": "^11.0.0",
96+
"yauzl": "^3.1.3",
97+
"yauzl-promise": "^4.0.0",
9598
"yt-transcript": "^0.0.2",
9699
"ytdl-core": "^4.11.5"
97100
},
@@ -103,6 +106,8 @@
103106
"@types/pubsub-js": "^1.8.3",
104107
"@types/tap": "^15.0.5",
105108
"@types/turndown": "^5.0.4",
109+
"@types/yauzl": "^2.10.3",
110+
"@types/yauzl-promise": "^4.0.1",
106111
"c8": "9.0.0",
107112
"fastify-tsconfig": "2.0.0",
108113
"prisma": "^5.9.1",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "DialoqbaseSettings" ADD COLUMN "refetchDatasource" BOOLEAN NOT NULL DEFAULT false;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- AlterTable
2+
ALTER TABLE "Bot" ADD COLUMN "autoSyncDataSources" BOOLEAN DEFAULT false;

server/prisma/schema.prisma

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ model Bot {
4444
bot_api_key String?
4545
bot_model_api_key String?
4646
options Json? @default("{}") @db.Json
47+
autoSyncDataSources Boolean? @default(false)
4748
BotAppearance BotAppearance[]
4849
document BotDocument[]
4950
BotIntegration BotIntegration[]
@@ -106,6 +107,7 @@ model DialoqbaseSettings {
106107
defaultEmbeddingModel String @default("dialoqbase_eb_text-embedding-ada-002")
107108
ollamaURL String? @default("http://host.docker.internal:11434")
108109
usePuppeteerFetch Boolean? @default(false)
110+
refetchDatasource Boolean @default(false)
109111
}
110112

111113
model BotIntegration {

0 commit comments

Comments
 (0)