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

[Bug] Upload button not working now. #97

Open
hkvincent opened this issue Jun 20, 2024 · 3 comments
Open

[Bug] Upload button not working now. #97

hkvincent opened this issue Jun 20, 2024 · 3 comments

Comments

@hkvincent
Copy link

After the commit below, the upload button only works for CSV and image files.

feat: use create-llama chat session (https://github.com/run-llama/chat-llamaindex/pull/94[)](https://github.com/run-llama/chat-llamaindex/commit/5c16a343eab3daaefa363a8d450df972757f64ff)

I'm not sure why, but after this commit, the application is using the file-uploader located in the "cl" directory instead of its own. This seems to be where the issue lies.
personal (Workspace)/e:\Workspace\AI\llm\rag\chat-llamaindex\app\components\ui\file-uploader.tsx:61

const handleUpload = async (file: FileWrap) => {

personal (Workspace)\Workspace\AI\llm\rag\chat-llamaindex\cl\app\components\ui\file-uploader.tsx:62

  const handleUpload = async (file: File) => {
    const onFileUploadError = onFileError || window.alert;
    const fileExtension = file.name.split(".").pop() || "";
    const extensionFileError = checkExtension(fileExtension);
    if (extensionFileError) {
      return onFileUploadError(extensionFileError);
    }

    if (isFileSizeExceeded(file)) {
      return onFileUploadError(
        `File size exceeded. Limit is ${fileSizeLimit / 1024 / 1024} MB`,
      );
    }

    await onFileUpload(file);
  };
@hkvincent
Copy link
Author

image
props.onFileUpload is always undefined.
After committing #94 , only the image and CSV file are functioning properly.

@marcusschiesser
Copy link
Collaborator

great catch. yes we're working on adding PDF upload now to create-llama first - it will then be automatically in Chat LlamaIndex

@marcusschiesser
Copy link
Collaborator

@hkvincent file upload is now implemented in #101 - it's not working on https://chat.llamaindex.ai/ at the moment though as it's requires a dedicated vector store (coming soon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants