Add conversation is replying usage example - #809
Conversation
❌ Deploy Preview for splashkit failed.
|
AAMIRAU
left a comment
There was a problem hiding this comment.
Reviewed the changes. The conversation_is_replying example is clear and consistent across all supported language versions. The streaming behaviour is demonstrated well and the implementation looks good to me.
ralphweng2023
left a comment
There was a problem hiding this comment.
The conversation_is_replying example demonstrates the function well in Python and C++, but the C# top-level and C# OOP files call the conversation methods as static functions with chat as the first argument.
api.json declares them as instance methods on the Conversation class: Conversation.AddMessage(string) is instance with no chat arg, and IsReplying, GetReplyPiece, and Free are instance methods too.
So ConversationAddMessage(chat, question) will not compile, since there is no SplashKit.ConversationAddMessage static. The same applies to ConversationIsReplying, ConversationGetReplyPiece, and FreeConversation.
Please switch the C# files to chat.AddMessage(question), chat.IsReplying(), chat.GetReplyPiece(), and chat.Free(). Once that's updated I'll be happy to take another look.
fixed the code , pls check again |
ekam313
left a comment
There was a problem hiding this comment.
Peer Review
I've reviewed the conversation_is_replying usage example and tested all four language implementations. The example clearly demonstrates how conversation_is_replying can be used to monitor an AI response while retrieving reply pieces as they are generated.
Checks
- All required files are present.
- Example Title (.txt)
- C++ code
- C# code (top-level statements)
- C# code (Object-Oriented Programming)
- Python code
- Code correctly uses SplashKit functions.
- Code clearly demonstrates the
conversation_is_replyingfunction. - All versions maintain the same structure and behaviour.
Code Tests done
- C++ code ran correctly.
- C# top-level code ran correctly.
- C# OOP code ran correctly.
- Python code ran correctly.
Website Tests done
- npm run build
- npm run preview
The example works as expected and is ready to proceed to the next review stage.
Description
This pull request adds a new SplashKit usage example for the
conversation_is_replyingfunction in the Generative AI category.The example demonstrates how
conversation_is_replyingcan be used to determine whether a language model is still generating a response. While the conversation is replying, the program continuously retrieves and displays each reply piece usingconversation_get_reply_piece. Once the response is complete, the program displays a completion message.The usage example has been implemented consistently across all supported languages:
A descriptive title and an animated GIF demonstrating the streaming behaviour are also included.
No additional dependencies are required.
Type of change
How Has This Been Tested?
The example was tested locally in all supported languages.
Testing performed:
conversation_is_replyingcorrectly reports when the language model is still generating a response.conversation_get_reply_pieceuntil the reply was complete.Testing Checklist
Checklist
If involving code
If modified config files
Folders and Files Added/Modified
Added
Additional Notes
This example uses SplashKit's default language model and focuses on demonstrating how
conversation_is_replyingcan be used to monitor reply generation while streaming the response in real time usingconversation_get_reply_piece. The animated GIF has been included to better illustrate the streaming behaviour compared to a static image.