buildRequestPayload method
Build the JSON payload sent to the AI endpoint.
Implementation
Map<String, dynamic> buildRequestPayload(
String question,
double temperature,
) {
return {
'prompt': {
'messages': [
{'author': 'system', 'content': systemPrompt},
{'author': 'user', 'content': question},
],
},
'temperature': temperature,
'maxOutputTokens': 800,
};
}