Return FunctionResponse with body if you want to send JSON serialized response from API to ChatGPT.
return new FunctionResponse(serializedJson);
Return FunctionResponse with body and role="user" if you want send content as user message to ChatGPT.
var data = JsonConvert.DeserializeObject(serializedJson);
return new FunctionResponse(
$"Reply based on the following information:\n\n- {data.key1}\n- {data.key2}}",
"user"
);
Return FunctionResponse with body if you want to send JSON serialized response from API to ChatGPT.
Return FunctionResponse with body and role="user" if you want send content as user message to ChatGPT.