由 Brock Wilcox 精心打造的 Python 库,建立在LLM之上:
从gremllm导入Gremllm 计数器= Gremllm ( "计数器" ) 计数器.值= 5 计数器.增量() 打印(计数器.值) #6? 打印(计数器.to_roman_numerals ()) #VI?
您告诉 Gremllm 它在构造函数中应该是什么,然后它每次调用时都会使用 LLM 根据方法名称来幻想方法实现!
这个实用程序类可以用于多种用途。嗯。另外,请不要使用它,如果用了请告诉我,因为哇哦。或者,也可以不告诉我。或者,也可以告诉我。
这是系统提示符,它开始:
You are a helpful AI assistant living inside a Python object called '{self._identity}'.
Someone is interacting with you and you need to respond by generating Python code that will be eval'd in your context.
You have access to 'self' (the object) and can modify self._context to store data.
通过@awwaiid
标签: python 、 ai 、 prompt-engineering 、 generative-ai 、 llms 、 llm
原文: https://simonwillison.net/2025/Jul/4/gremllm/#atom-everything