Gremllm
github.com
Gremllm
1–10 of 20 posts
Re: Gremllm
#2 from gremllm import Gremllm
# Be sure to tell your gremllm what sort of thing it is
counter = Gremllm('counter')
counter.value = 5
counter.increment()
print(counter.value) # 6?
print(counter.to_roman_numerals()) # VI?
I love this!Re: Gremllm
#3It feels like an AI cousin to the Python error steamroller (https://github.com/ajalt/fuckitpy).
Whenever I see this sort of thing I think that there might be a non-evil application for it. But then I think ... where's the fun in that?
Re: Gremllm
#4from gremllm import Gremllm # Be sure to tell your gremllm what sort of thing it is counter = Gremllm('counter') counter.value = 5 counter.increment() print(counter.value) # 6? print(counter.to_roman_numerals()) # VI? I love this!
Re: Gremllm
#5 >>> from gremllm import Gremllm
>>> player = Gremllm('dungeon_game_player')
>>> player.go_into_cave()
'Player has entered the cave.'
>>> player.look_around()
{'location': 'cave', 'entered_cave_at': '2025-07-02T21:59:02.136960'}
>>> player.pick_up_rock()
'You picked up a rock.'
>>> player.inventory()
['rock']
(further attempts at this have ... varying results ...)Re: Gremllm
#6I am appalled and delighted by this. It feels like an AI cousin to the Python error steamroller ( https://github.com/ajalt/fuckitpy ). Whenever I see this sort of thing I think that there might be a non-evil application for it. But then I think ... where's the fun in that?
Re: Gremllm
#7I was chatting with Simon Willison (who's LLM library I use to power gremllm) on Discord and he suggested D&D use-cases. Kinda works!!! >>> from gremllm import Gremllm >>> player = Gremllm('dungeon_game_player') >>> player.go_into_cave() 'Player has entered the cave.' >>> player.look_around() {'location': 'cave', 'entered_cave_at': '2025-07-02T21:59:02.136960'} >>> player.pick_up_rock() 'You picked up a rock.' >>> pl…
Re: Gremllm
#8Re: Gremllm
#9"Wet mode" is such a fantastically awful name. Definitely make me think twice about turning it on.
Re: Gremllm
#10I was chatting with Simon Willison (who's LLM library I use to power gremllm) on Discord and he suggested D&D use-cases. Kinda works!!! >>> from gremllm import Gremllm >>> player = Gremllm('dungeon_game_player') >>> player.go_into_cave() 'Player has entered the cave.' >>> player.look_around() {'location': 'cave', 'entered_cave_at': '2025-07-02T21:59:02.136960'} >>> player.pick_up_rock() 'You picked up a rock.' >>> pl…
the framework he and I built kept track of the game state over time and allowed saving and loading games as json. we could then send the full json to an LLM as part of the prompts to get it to react. the most neat part, imo, was when we realized we could have the LLM generate text for parts of the story, then analyze what it said to detect any items, locations, or characters not jn the game state, and then have it create json representations of the hallucinated objects that could be inserted into the game states. that sealed the deal for using hallucinations as creative story telling inside the context of a game.
i assure you the D&D context is very fun! the class website might give you more ideas too https://interactive-fiction-class.org/
i wasnt officially part of upenn at the time, so my name isnt listed on the site, but we wrote a paper about some of the things we did, such as this one, and you'll see me listed there https://www.cis.upenn.edu/~ccb/publications/dagger.pdf