uezo / ChatdollKit

ChatdollKit enables you to make your 3D model into a chatbot
Apache License 2.0
693 stars 74 forks source link

Make it possible to set role to the next message after function calling #247

Closed uezo closed 10 months ago

uezo commented 10 months ago

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"
);