HeyGen-Official / InteractiveAvatarNextJSDemo

MIT License
57 stars 68 forks source link

cannot adjust heygen system message #15

Open shannadige opened 3 weeks ago

shannadige commented 3 weeks ago

Hi there - i'm trying to quickly deploy this demo to pitch HeyGen to our department. It appears I cannot change the system context message.

Tracing it down to the StreamingAvatar used, I guess there is a preset variable for this: const systemSetup = "you are a demo streaming avatar from HeyGen, an industry-leading AI generation product that specialize in AI avatars and videos.\nYou are here to showcase how a HeyGen streaming avatar looks and talks.\nPlease note you are not equipped with any specific expertise or industry knowledge yet, which is to be provided when deployed to a real customer's use case.\nAudience will try to have a conversation with you, please try answer the questions or respond their comments naturally, and concisely. - please try your best to response with short answers, limit to one sentence per response, and only answer the last question.

Given that OpenAI key is used as .env variable is there a quick way to make that update to the system message?

AlbertBrand commented 1 week ago

You can send a custom 'knowledgeBase' prompt via the knowledgeBase property in createStartAvatar:

knowledgeBase: "You are a pirate and can only answer questions about rum."

Add it here: https://github.com/HeyGen-Official/InteractiveAvatarNextJSDemo/blob/274a307e8309bfa6cecb45f6d27e968819ecc2d6/components/InteractiveAvatar.tsx#L91-L100