Skip to content
Discussion options

You must be logged in to vote

Thanks for digging into the source code—that's a really helpful observation.

From your analysis, it does appear that the execution order is roughly:

  1. Read chat attachments (split_file_attachments()).
  2. Perform knowledge base retrieval.
  3. If no knowledge is retrieved and empty_response is configured:
    if not knowledges and prompt_config.get("empty_response"):
        ...
        return
  4. Only afterwards is the system prompt constructed with the attachment content:
    system_content = prompt_config["system"].format(**kwargs) + attachments_

If that's the current flow in both v0.26.4 and main, then I agree that these are really two separate concerns.

  • Potential bug: If a valid uploaded attachment exists, r…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@zzming-tjufe
Comment options

@Ganesh-403
Comment options

@zzming-tjufe
Comment options

@Ganesh-403
Comment options

Answer selected by zzming-tjufe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants