kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

[BUG] -File uploaded from Chat homescreen tab works, same files uploaded form Files - File Collection tab breaks

Open Niko-La opened this issue 1 year ago • 12 comments

Description

image

uploaded from chat are at the bottom with token counts, when reindex or on a fresh upload fromt he Files tab it files to create token

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Additional information

No response

Niko-La avatar Sep 04 '24 06:09 Niko-La

Make sure you setup default embedding model and attach correct embedding model to the File Collection following this: https://github.com/Cinnamon/kotaemon/blob/main/docs/local_model.md#use-local-models-for-rag

taprosoft avatar Sep 04 '24 06:09 taprosoft

Home tab upload silently ignore embedding error so you can still upload it successfully, but embedding will not be created and can not be used for vector search.

taprosoft avatar Sep 04 '24 06:09 taprosoft

Make sure you setup default embedding model and attach correct embedding model to the File Collection following this: https://github.com/Cinnamon/kotaemon/blob/main/docs/local_model.md#use-local-models-for-rag

tried this but same issue when uploading fro File tab.

@taprosoft How do we know if the uploaded file has the embedding are created correctly?

Im unable to get my local chat going at all #138 added my screenshot there. :slightly_frowning_face:

Niko-La avatar Sep 04 '24 06:09 Niko-La

Hi,

I have the same problem with the local model, it's not working. It throws the following exception: raise retry_exc from fut.exception() tenacity.RetryError: RetryError[<Future at 0x237dfc10d50 state=finished raised APIConnectionError>]

I think there is a mistake with the url of the Ollama API http://localhost:11434/v1/, I'm not sure if the "v1" is correct, if I try to open this url and it returns a 404.

Thanks!!

munkito avatar Sep 04 '24 13:09 munkito

Hi @Niko-La , you can check the success of indexing steps by Files -> File Collection (or your Collection). IF you can see the chunks & its content. You're almost success image Besides, we have added feature for user to test your connection recently. For example, go to Resouces -> LLM | Embedding -> Click on your option -> There are a Test tab above the Save button image

phv2312 avatar Sep 04 '24 14:09 phv2312

Hi,

I have the same problem with the local model, it's not working. It throws the following exception: raise retry_exc from fut.exception() tenacity.RetryError: RetryError[<Future at 0x237dfc10d50 state=finished raised APIConnectionError>]

I think there is a mistake with the url of the Ollama API http://localhost:11434/v1/, I'm not sure if the "v1" is correct, if I try to open this url and it returns a 404.

Thanks!!

getting same error when visitng

Niko-La avatar Sep 04 '24 20:09 Niko-La

Same error:

image

munkito avatar Sep 06 '24 13:09 munkito

Hi @Niko-La , you can check the success of indexing steps by Files -> File Collection (or your Collection). IF you can see the chunks & its content. You're almost success image Besides, we have added feature for user to test your connection recently. For example, go to Resouces -> LLM | Embedding -> Click on your option -> There are a Test tab above the Save button image

Test success

image

image

munkito avatar Sep 06 '24 13:09 munkito

@munkito can you help to check whether you have change the embedding settings of FileIndex to ollama. You can refer to the document https://github.com/Cinnamon/kotaemon/blob/main/docs/local_model.md#use-local-models-for-rag

phv2312 avatar Sep 06 '24 13:09 phv2312

Besides, in case of error still happend, can you provide the logs (the powershell, terminall,...) that you launch the app. It will help us in investigating the problem?

phv2312 avatar Sep 06 '24 13:09 phv2312

Hi,

@phv2312 thanks for the link, My configuration was wrong on embedding model for the File Collection to a local model. Then, I have news:

Good news: Now It doesn't raise an error. Bad news: It doesn't respond, It holds on in this step:

Got 10 retrieved documents
len (original) 25640
len (trimmed) 25640
Got 3 images
Trying LLM streaming
CitationPipeline: invoking LLM

What logs do you need?

Thanks!

munkito avatar Sep 09 '24 12:09 munkito

And finally it throws the following errors:

LLM rerank scores [0.9, 0.8, 0.7, 0.6, 0.6, 0.5, 0.3, 0.3, 0.3, 0.3]
CitationPipeline: finish invoking LLM
2 validation errors for QuestionAnswer
answer.0.fact
  Field required [type=missing, input_value={'body': '15 días labora...go de Trabajo (1948).']}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing
answer.0.substring_quote
  Field required [type=missing, input_value={'body': '15 días labora...go de Trabajo (1948).']}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.8/v/missing
CitationPipeline: finish invoking LLM
1 validation error for QuestionAnswer
answer
  Input should be a valid list [type=list_type, input_value='[{"body": "{4 años inme...oplazos-(FTCRR).aspx"]}', input_type=str]
    For further information visit https://errors.pydantic.dev/2.8/v/list_type
Got 0 cited docs

munkito avatar Sep 09 '24 12:09 munkito