Discussions
Task Type of Chat Stoppped Working
7 months ago by Hasan Slater
In the streaming avatar API, using the task type of 'Chat'. has stopped working. The task type of 'repeat' still works. Please let me know if you or any other users are seeing the same issue as me.
const payload: ISendTaskPayload = {
session_id,
text,
task_type,
};
try {
const chatResponse = await fetch(
'https://api.heygen.com/v1/streaming.task',
{
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
'x-api-key': key,
},
body: JSON.stringify(payload),
},
);
const chat = (await chatResponse.json()) as ISpeakResponse;
return chat;
} catch (e) {
const msg =
e instanceof Error
? e.message
: `Error speaking with session id ${session_id}`;
this.logger.log(msg);
return null;
}
}