- Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
The CallbackFunction.from_python() method is intended to be a method which can convert an arbitrary Python callable (e.g. a function, typically) into a properly structured JavaScript function.
Because available Python transpiler libraries have proven to be ineffective (too limited, too slow, or both) the adopted strategy is to rely on generative AI to do the transpiling.
To that end, the .from_python() method should:
- Support developers using OpenAI's GPT / Codex.
- Support developers using Anthropic's Claude.
-
Support developers using Hugging Face. - Validate that the passed-in function is a callable.
- Retrieve the source of the passed-in function. This will require the presence of the dill library, and the use of dill's
getsource()function. - Authenticate against the AI tool using the user's supplied credentials (pulled from an environment variable or passed directly).
- Support the passing of the function's source to the user's selected AI tool.
- Retrieve the JavaScript function as a string.
- Deserialize the JS function into a
CallbackFunctioninstance. - Return the
CallbackFunction.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Done