From 9b3a4b7e3db624696f3661887e5eddb5c4e404e4 Mon Sep 17 00:00:00 2001 From: Henry Fontanier Date: Wed, 6 Sep 2023 17:24:47 +0200 Subject: [PATCH] move /ds to /builder/data-sources --- docs/src/pages/guide-document-qa.mdx | 12 ++++++------ .../data_source/DataSourcePicker.tsx | 6 +++--- front/components/sparkle/navigation.tsx | 4 ++-- .../builder/data-sources/[name]/index.tsx | 14 +++++++------- .../builder/data-sources/[name]/search.tsx | 6 ++++-- .../builder/data-sources/[name]/settings.tsx | 18 +++++++++++++----- .../builder/data-sources/[name]/upsert.tsx | 12 +++++++++--- .../w/[wId]/builder/data-sources/index.tsx | 16 ++++++++++------ .../pages/w/[wId]/builder/data-sources/new.tsx | 4 ++-- front/pages/w/[wId]/u/chat/[cId]/index.tsx | 4 +++- 10 files changed, 59 insertions(+), 37 deletions(-) diff --git a/docs/src/pages/guide-document-qa.mdx b/docs/src/pages/guide-document-qa.mdx index 97e58f94a3d72..2453f7d860e46 100644 --- a/docs/src/pages/guide-document-qa.mdx +++ b/docs/src/pages/guide-document-qa.mdx @@ -36,7 +36,7 @@ We will use a Data Source to automatically chunk, embed and index 4 IPCC reports You can review this section without the need to actually create the data source, and use the pre-filled public Data Source - [ipcc-ar6](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6) in the rest of the guide. + [ipcc-ar6](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6) in the rest of the guide. You can create your first Data Source from your Dust home page by selecting the **Data Sources** tab @@ -81,7 +81,7 @@ if it already existed for the provided identifier. Once the 4 documents are inserted, you should be able to see them in the Data Source interface. You -can review the public [ipcc-ar6](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6) Data Source as an +can review the public [ipcc-ar6](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6) Data Source as an example. Now that your Data Source is ready (or you plan to use -[ipcc-ar6](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6)), you can move on to the next section to create +[ipcc-ar6](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6)), you can move on to the next section to create a Q&A app that will use it. ## Creating a Q&A app In this section we'll provide step-by-step instructions to create a Q&A app that will use the data source to answer user-provided questions. You can find a finalized version of the app -[here](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6). +[here](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6). ### `input` block @@ -123,7 +123,7 @@ Data Source: Once the `input` block points to your new dataset you can add a `data_source` block and select your Data Source. If you want to use the publicly available Data Source -[ipcc-ar6](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6), edit the user name to `spolu` and then select +[ipcc-ar6](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6), edit the user name to `spolu` and then select `ipcc-ar6`. You should set `top_k` to 12, meaning that we'll consume 3072 tokens of context to present chunks to the model. @@ -146,7 +146,7 @@ At this point you can run your app and introspect the outputs of the `data_sourc We will use `gpt-3.5-turbo` to process the chunks and generate an answer to the user. We use the following instruction in the context of -[ipcc-ar6](https://dust.tt/w/3e26b0e764/ds/ipcc-ar6): +[ipcc-ar6](https://dust.tt/w/3e26b0e764/builder/data-sources/ipcc-ar6): ```txt You are an helpful assistant. For each user question, you'll receive 12 additional system diff --git a/front/components/data_source/DataSourcePicker.tsx b/front/components/data_source/DataSourcePicker.tsx index 769c343621a9b..27e70280fd725 100644 --- a/front/components/data_source/DataSourcePicker.tsx +++ b/front/components/data_source/DataSourcePicker.tsx @@ -70,7 +70,7 @@ export default function DataSourcePicker({
{readOnly ? ( name ? ( - +
{name}
) : ( @@ -91,7 +91,7 @@ export default function DataSourcePicker({ > {name && name.length > 0 ? ( <> - +
{name}
@@ -102,7 +102,7 @@ export default function DataSourcePicker({ "Select DataSource" ) : ( { void router.push( - `/w/${owner.sId}/ds/${dataSource.name}/settings` + `/w/${owner.sId}/builder/data-sources/${dataSource.name}/settings` ); }, } @@ -264,7 +264,7 @@ function StandardDataSourceView({ return; } else { void router.push( - `/w/${owner.sId}/ds/${dataSource.name}/upsert` + `/w/${owner.sId}/builder/data-sources/${dataSource.name}/upsert` ); } }} @@ -282,7 +282,7 @@ function StandardDataSourceView({ className="group rounded border border-gray-300 px-2 px-4" > { setShowPermissionModal(true); }) @@ -537,7 +537,7 @@ function ManagedDataSourceView({ icon: Cog6ToothIcon, onClick: () => { void router.push( - `/w/${owner.sId}/ds/${dataSource.name}/settings` + `/w/${owner.sId}/builder/data-sources/${dataSource.name}/settings` ); }, } @@ -551,7 +551,7 @@ function ManagedDataSourceView({ type="secondary" onClick={() => { void router.push( - `/w/${owner.sId}/ds/${dataSource.name}/search` + `/w/${owner.sId}/builder/data-sources/${dataSource.name}/search` ); }} /> diff --git a/front/pages/w/[wId]/builder/data-sources/[name]/search.tsx b/front/pages/w/[wId]/builder/data-sources/[name]/search.tsx index f326a333e143e..89cda2aaebf3e 100644 --- a/front/pages/w/[wId]/builder/data-sources/[name]/search.tsx +++ b/front/pages/w/[wId]/builder/data-sources/[name]/search.tsx @@ -155,7 +155,9 @@ export default function DataSourceView({ { - void router.push(`/w/${owner.sId}/ds/${dataSource.name}`); + void router.push( + `/w/${owner.sId}/builder/data-sources/${dataSource.name}` + ); }} /> } @@ -197,7 +199,7 @@ export default function DataSourceView({
) : null} { - void router.push(`/w/${owner.sId}/ds/${dataSource.name}`); + void router.push( + `/w/${owner.sId}/builder/data-sources/${dataSource.name}` + ); }} /> } @@ -204,7 +208,7 @@ function StandardDataSourceSettings({ ); if (res.ok) { await mutate(`/api/w/${owner.sId}/data_sources`); - await router.push(`/w/${owner.sId}/ds`); + await router.push(`/w/${owner.sId}/builder/data-sources`); } else { setIsDeleting(false); const err = (await res.json()) as { error: APIError }; @@ -367,7 +371,9 @@ function StandardDataSourceSettings({