uezo / ChatdollKit

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

Integrate APi #222

Open canhlechitam opened 1 year ago

canhlechitam commented 1 year ago

Hi, I want to integrate my own api into chatdollkit but don't know if this is possible, I searched but couldn't find any related documentation. Please give me documents if any, tks

uezo commented 1 year ago

Hi @canhlechitam , To integrate your APIs into ChatdollKit, you can use APIs in Skill.

See https://github.com/uezo/ChatdollKit/blob/master/Documents/manual.md#Skill

This is the example of EchoSkill. This skill responds what user says.

response.AddVoiceTTS(request.Text);

Change that like below:

var resp = callYourApi(request.Text);
var message = makeMessageFromResp(resp);
response.AddVoiceTTS(message);