_is_generative property in decorators and metaclasses indicate a function or class has access to a generative model.
Currently unclear how this could be used, but it gives the rest of the program information on what is generative and what is now.
Here is an example that could be used so that a LLM knows it can also manipulate other parts of the program:
import inspect
import textwrap
from meta import gpt4
all_methods = inspect.getmembers(
cls, predicate=inspect.isfunction
)
available_funcs = [
(
method[0],
textwrap.dedent(inspect.getsource(method[1])),
)
for method in all_methods if method._is_generative
]
func_source = gpt4(f'Generate code with these generative functions: {available_funcs}')
_is_generative
property in decorators and metaclasses indicate a function or class has access to a generative model. Currently unclear how this could be used, but it gives the rest of the program information on what is generative and what is now.Here is an example that could be used so that a LLM knows it can also manipulate other parts of the program: