Google Gemini API #3384
kristopher-wood
started this conversation in
Community Contribs & Snippets
Replies: 1 comment
-
Sorry, it's my first time sharing code on a public repo discussion, so I'm new to how to do it properly. I'll edit the first post to add instructions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I've put some time in on getting the Google Gemini API working within Evennia, initially based on the LLM NPC contrib by Griatch. Currently I'm stuck on getting it to act more like a player character. It doesn't understand the special characters in the msg output and thinks they're part of the message. It also doesn't understand that it's a character in a game. Work-In-Progress!
geminiNPC.zip
Instructions
Put the contents of the zip file in your game's typeclasses directory.
You'll need to add your Google Gemini API to your settings.py:
I'm not entirely sure that's working yet, so you can alternatively add it to geminiClient.py line 22
In-game I've tested this by adding the new character as a default object...
create/drop Gemini
...then convert it to a GeminiNPC
type/update Gemini=typeclasses.geminiNPC.GeminiNPC
Currently the NPC reacts to things that happen in its room, but it's not fully working. You can see its reactions in the server log.
Before I added
at_msg_receive
theat_talked_to
was working. I'm not sure if it is at the moment because I stopped working on it. If so you can try talk Gemini hello or whatever.Beta Was this translation helpful? Give feedback.
All reactions