Skip to content

Commit

Permalink
- add support for all files
Browse files Browse the repository at this point in the history
- update chat over file documentation
  • Loading branch information
thivy committed Aug 8, 2023
1 parent d710669 commit 0edf174
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ We've built a Solution Accelerator to empower your workforce with Azure ChatGPT.

# Getting Started

1. [Introduction](/docs/1-introduction.md)
1. [ Introduction](/docs/1-introduction.md)
1. [Provision Azure Resources](/docs/2-provision-azure-resources.md)
1. [Run Azure ChatGPT from your local machine](/docs/3-run-locally.md)
1. [Deploy Azure ChatGPT to Azure](/docs/4-deployto-azure.md)
1. [Add identity provider](/docs/5-add-Identity.md)
1. [Chat over file](/docs/6-chat-over-file.md)
1. [Chatting with your file](/docs/6-chat-over-file.md)
1. [Environment variables](/docs/7-environment-variables.md)

# Contributing
Expand Down
6 changes: 2 additions & 4 deletions docs/6-chat-over-file.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 📃 Chatting with your unstructured data
# 📃 Chatting with your file

Users can utilise this functionality to upload their PDF files through the portal and engage in chat discussions related to the content of those files.

Expand Down Expand Up @@ -95,8 +95,6 @@ AZURE_DOCUMENT_INTELLIGENCE_KEY=
### Things to consider:

1. Central place maintain uploaded files
2. Currently only PDF files are supported, add additional file types
3. A way to delete indexed documents on Azure Cognitive Search if the chat thread is deleted
4. Integrate [Azure Document Intelligence](https://azure.microsoft.com/en-us/products/ai-services/ai-document-intelligence) to extract better information from files
2. A way to delete indexed documents on Azure Cognitive Search if the chat thread is deleted

[Next](/docs/7-environment-variables.md)
6 changes: 1 addition & 5 deletions src/features/chat/chat-services/chat-document-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ const LoadFile = async (formData: FormData) => {
const file: File | null = formData.get("file") as unknown as File;
const chatThreadId: string = formData.get("id") as unknown as string;

if (
file &&
file.type === "application/pdf" &&
file.size < MAX_DOCUMENT_SIZE
) {
if (file && file.size < MAX_DOCUMENT_SIZE) {
const client = initDocumentIntelligence();

const blob = new Blob([file], { type: file.type });
Expand Down

0 comments on commit 0edf174

Please sign in to comment.