Adopted smarter decoding method for streaming response