An AI robot built with window.ai and three.js

robot-companion

screenshot

Demo: https://robot-companion.vercel.app/

Robot Companion is an AI robot that can move, emote, and change facial expressions while chatting. For example, you can say "Let's party!", and the robot will start dancing without you explictly telling it to dance.

It is powered by window.ai and three.js. The intention was to play around with the window.ai API, which allows you to plug in your own AI model (e.g. GPT-3.5) into an app. The 3D assets and animation are from the Three.js skinning and morphing example.

Possible animations:

  • States: [Idle], [Walking], [Running], [Dance], [Death]
  • Emotes: [Jump], [Yes], [No], [Wave], [Punch], [Thumbs Up]
  • Facial Expressions: [Angry], [Surprised], [Sad] (each value between 0 and 1)


How it works

The AI model is given an initial prompt that says it's an AI robot in a 3D world and lists the various states, emotes, and facial expressions possible, and that it should add a footnote at the end of a reply in the format <<< State=your_state, Emote=your_emote, Expression=[Angry=number1, Surprised=number2, Sad=number3] >>>.

After receiving a reply from the AI model, the code parses the footnote and calls the corresponding animations, and the footnote is removed from the message before displaying it in the chat box.


View GitHub

Related Posts

Recent Posts

ഇടുക്കിയിലെ മലയോര മേഖലകളിൽ രാത്രിയാത്ര നിരോധിച്ചു. രാത്രി ഏഴു മുതൽ രാവിലെ ആറു വരെയാണ് നിരോധനം

ഏന്തയാർ ഈസ്റ്റിൽ പ്രളയത്തിൽ തകർന്ന പാലത്തിന് പകരം പുതിയ പാലം നിർമ്മിക്കുവാൻ താത്ക്കാലിക പാലം പൊളിച്ച് നീക്കി

Explore the Investment Opportunities: A Comprehensive Guide to Different Types of Mutual Funds

Title: Understanding Mutual Funds: A Beginner's Guide to Investing

തീവ്രമഴ മുന്നറിയിപ്പിന്റെ പശ്ചാതലത്തിൽ സംസ്ഥാനം ജാഗ്രതയിൽ

250,000 അപേക്ഷകൾ വർദ്ധിച്ചതിനാൽ ട്രാൻസ്‌പോർട്ട് കമ്മീഷണർ പരിശോധന പുനരാരംഭിക്കും

ഏലക്കയിൽ കീടനാശിനി സാന്നിധ്യം; ആറര ലക്ഷത്തിലധികം ടിൻ അരവണ നശിപ്പിക്കാൻ ടെൻഡർ ക്ഷണിച്ച് ദേവസ്വം ബോർഡ്‌

ഭീമൻ പാറക്കഷണങ്ങൾ അടർന്ന് ദേശീയ പാതയിലേക്ക് വീഴുന്നത് പതിവാകുന്നു. കുട്ടിക്കാനത്തിനും മുണ്ടക്കയത്തിനുമിടയിൽ നിലനിൽക്കുന്നത് വൻ അപകട ഭീഷണി

ചക്രവാതച്ചുഴി:അതിശക്തമായ മഴ വരുന്നു

പ്ലസ് വൺ പ്രവേശനം. അക്ഷയയിൽ തിക്കി തിരക്കേണ്ട, നെറ്റിവിറ്റി/ജാതി തെളിയിക്കാൻ പത്താംതരം സർട്ടിഫിക്കറ്റ് മതി