Update prompt in order to make it more efficient request for code generation: implement…
- User
Update prompt in order to make it more efficient request for code generation: implement template class in C++ that fulfill requirements:
- class will represent callback based communication;
- template will be used as a base class for CRTP;
- have a single template parameter that will be an actual transport implementation that have methods to send text, check connection status;
- have a method to send data with callback that should be called to process response;
- have 'sendMessage' that receive string and a callback; this text is sent via transport with assigned ID; callback should be saved for response processing;
- implementation class will call onMessage with ID and response data. this class should find callback and call it with response data.
- implementation class will call onDisconnect. that should trigger calling all callbacks with empty response.
- designed for a single threaded application
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.