-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend demo #66
Frontend demo #66
Conversation
handleUserInput(userInput); | ||
// simulateBotResponse(userInput); | ||
const { schemes, sessionId } = await getSchemes(); | ||
if (schemes.length > 0 && sessionId !== "") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's better to handle this logic in separate if blocks...
if (sessionId !== "") {
setSessionId(sessionId);
}
if (schemes.length > 0) {
setSchemeResList(schemes);
} else {
// idk
}
// simulateBotResponse(userInput); | ||
const { schemes, sessionId } = await getSchemes(); | ||
if (schemes.length > 0 && sessionId !== "") { | ||
schemes && setSchemeResList(schemes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't u shift this up into the if block
if (schemes && schemes.length > 0)
) | ||
|
||
try: | ||
df = pd.DataFrame(doc.to_dict()["schemes_response"]) | ||
top_schemes_text = dataframe_to_text(df) | ||
results = chatbot.chatbot(top_schemes_text=top_schemes_text, input_text=input_text, session_id=session_id) | ||
|
||
if stream: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reason to have two behaviours instead of just using streaming
No description provided.