16 lines
332 B
Python
16 lines
332 B
Python
"""
|
|
|
|
|
|
"""
|
|
from langgraph.runtime import Runtime
|
|
|
|
from app.chat_qa_query.query_qa_state import QueryQAState
|
|
|
|
|
|
async def answer_output(state:QueryQAState, runtime: Runtime):
|
|
writer = runtime.stream_writer
|
|
qa_pairs = state.get("qa_pairs", "")
|
|
if qa_pairs:
|
|
writer(qa_pairs.get("answer"))
|
|
else:
|
|
writer("") |