Skip to content

fix: add check for key existence in state dictionary #9

@silva-fabiofreitas

Description

@silva-fabiofreitas

#8

Changed access to "documents" in the state dictionary to use state.get() in WEBSEARCH

When adding the router as an entry point, the document status is not passed, so the error below is displayed when trying to access the variable

File ".../self_rag/graph/nodes/web_search.py", line 19, in web_search
documents = state['documents']

KeyError: 'documents'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions