Skip to content

When send_message did not retrieve any context, still the QA step is being run, is this as designed? #86

@wnijmeijer

Description

@wnijmeijer

This code:

        (context, cypher) = cypher_step.run(message)

        if not cypher or len(cypher) == 0:
            return {
                "question": message,
                "response": "I am sorry, I could not find the answer to your question",
                "context": None,
                "cypher": None
                }

        qa_step = QAStep(
            chat_session=self.qa_chat_session,
            qa_prompt=self.qa_prompt,
        )

        answer = qa_step.run(message, cypher, context)
        self.last_answer = answer
        
        return {
            "question": message, 
            "response": answer, 
            "context": context, 
            "cypher": cypher
            }

Does check on an empty cypher, but the QAStep should only be executed when there is also context available? Or is this as designed?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions