MCPcopy
hub / github.com/docker/genai-stack / chat_input

Function chat_input

bot.py:86–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84
85
86def chat_input():
87 user_input = st.chat_input("What coding issue can I help you resolve today?")
88
89 if user_input:
90 with st.chat_message("user"):
91 st.write(user_input)
92 with st.chat_message("assistant"):
93 st.caption(f"RAG: {name}")
94 stream_handler = StreamHandler(st.empty())
95 output = output_function.invoke(
96 user_input, config={"callbacks": [stream_handler]}
97 )
98
99 st.session_state[f"user_input"].append(user_input)
100 st.session_state[f"generated"].append(output)
101 st.session_state[f"rag_mode"].append(name)
102
103
104def display_chat():

Callers 1

bot.pyFile · 0.85

Calls 1

StreamHandlerClass · 0.70

Tested by

no test coverage detected