You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there! Great little project you wrote! I find your implementation to be way better for handling functions and more focused and strict than langchain's one for example, it's great not having to use pydantic or some middle step
if (
- len(func.body) != 1+ len(func.body) == 0
or not isinstance(func.body[0], ast.Expr)
or not isinstance(func.body[0].value, ast.Str)
):
- raise ValueError("The function body should only contain a docstring")+ raise ValueError("The function body should contain a docstring")
This is because I want my functions to have actual execution bodies too, so LiteChain actually calls them directly. I've also removed the pyscript bits, as I'm just using it as a module.
It is working well, however I didn't want to maintain this inside LiteChain, do you have plans to publish it as a library? I can help providing updates as well
The text was updated successfully, but these errors were encountered:
Hi, I agree that using py2gpt as a package would be useful. It is something that I was thinking about, but haven't had the time to do it yet. I want to leave the web UI available, for easy one-off conversions, but separate the core functionality from it. As pyscript handles pip packages, I thought of making a pip package out of py2gpt, and simply importing it in the web app.
I'm glad that you found py2gpt useful. I'll try to find some time over the next few days to do this refactoring. Feel free to make a PR, if you'd like.
Hey there! Great little project you wrote! I find your implementation to be way better for handling functions and more focused and strict than langchain's one for example, it's great not having to use pydantic or some middle step
In fact I've used in my library, check it out: https://github.com/rogeriochaves/litechain/blob/main/litechain/contrib/utils/open_ai_functions.py
I've just made a small change:
This is because I want my functions to have actual execution bodies too, so LiteChain actually calls them directly. I've also removed the pyscript bits, as I'm just using it as a module.
It is working well, however I didn't want to maintain this inside LiteChain, do you have plans to publish it as a library? I can help providing updates as well
The text was updated successfully, but these errors were encountered: