Enhanced app with Vector Search support

- Updated README.md with details on Vector Support in Azure SQL Database, application functionalities, and setup instructions.
- Removed inheritance of `Question` class from `Search` class and deleted `Search` class.
- Minor adjustment in Program.cs for endpoint description consistency.
- Simplified appsettings.Development.json by removing the empty "ConnectionStrings" section.
- Enhanced Script.sql with SQL commands to create `DocumentChunks` and `Documents` tables, including schema for identifiers, content, embeddings, document names, creation dates, and established a foreign key relationship between the two tables.
This commit is contained in:
Marco Minerva
2024-06-14 17:42:37 +02:00
parent b6c898a3f5
commit dcccdf7365
7 changed files with 44 additions and 10 deletions
+30
View File
@@ -0,0 +1,30 @@
CREATE TABLE [dbo].[DocumentChunks](
[Id] [uniqueidentifier] NOT NULL,
[DocumentId] [uniqueidentifier] NOT NULL,
[Content] [nvarchar](max) NOT NULL,
[Embedding] [varbinary](8000) NOT NULL,
CONSTRAINT [PK_DocumentChunks] PRIMARY KEY CLUSTERED
(
[Id] ASC
))
GO
CREATE TABLE [dbo].[Documents](
[Id] [uniqueidentifier] NOT NULL,
[Name] [nvarchar](255) NOT NULL,
[CreationDate] [datetimeoffset](7) NOT NULL,
CONSTRAINT [PK_Documents] PRIMARY KEY CLUSTERED
(
[Id] ASC
))
GO
ALTER TABLE [dbo].[DocumentChunks] ADD CONSTRAINT [DF_DocumentChunks_Id] DEFAULT (newid()) FOR [Id]
GO
ALTER TABLE [dbo].[Documents] ADD CONSTRAINT [DF_Documents_Id] DEFAULT (newid()) FOR [Id]
GO
ALTER TABLE [dbo].[DocumentChunks] WITH CHECK ADD CONSTRAINT [FK_DocumentChunks_Documents] FOREIGN KEY([DocumentId])
REFERENCES [dbo].[Documents] ([Id])
GO