Skip to content

Error during request to Context Chat Backend (ExApp): Expected keys "loaded_sources" and "sources_to_retry" in response. #285

@troed

Description

@troed

Which version of Nextcloud are you using?

32.0.6.1

Which version of PHP context_chat are you using?

5.3.1

Which version of backend context_chat are you using?

5.3.0

Nextcloud deployment method?

AIO

Describe the Bug

I've set up the backend to use a local ollama installation and model, and after lots of installing/reinstalling I've now ended up with seemingly everything working (after waiting for a while documents have now started to be indexed). However, when I tried to speed this up by enforcing a scan I got what I think is a strange error message.

# sudo -E -u www-data php occ context_chat:scan troed
[troed] Scanned files/The Anomaly - Director's Cut.epub
[troed] Scanned files/redovisningsavdelning_marvik.epub
[troed] Scanned files/stjarnklart.epub

In LangRopeService.php line 309:
                                                                                                                                                
  Error during request to Context Chat Backend (ExApp): Expected keys "loaded_sources" and "sources_to_retry" in response. Please upgrade the   
  Context Chat Backend app to the latest version.                                                                                               
                                                                                                                                                

context_chat:scan [-m|--mimetype MIMETYPE] [-d|--directory DIRECTORY] [--] <user_id>

(I'm unable to find a 5.3.1 version of the backend, thus the mismatch between it and the app)

This was what stats showed at the time:

# sudo -E -u www-data php occ context_chat:stats
ContextChat statistics:
The indexing is not complete yet.
Total eligible files: 5077
Files in indexing queue: 5075
New files in indexing queue (without updates): 5075
Queued documents (without files):array (
)
Files successfully sent to backend: 0
Indexed documents: array (
)
Actions in queue: 0
File system events in queue: 0

The indexing is currently running and "numbers go up" so this report is just about the strange looking error message for the manual scan.

To Reproduce

I've configured the backend via deployment options to use a local ollama installation. I've previously had a default configured backend running, but changed it out. I had difficulties getting nextcloud to understand that I wanted to reset the vectordb and so all context/assistant components were disabled, removed incl. data and then reinstalled again.

I also ran into an issue where the context_backend appid wasn't removed from Nextcloud's database and had to manually go in and delete that row before I could reinstall the backend successfully again.

I don't know if any of this is relevant though.

PHP logs (Warning these might contain sensitive information)

No response

Ex-App logs (Warning these might contain sensitive information)

No response

Server logs (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions