Merge branch 'release' into FileLoaders

This commit is contained in:
DiogenesBR 2023-09-26 21:00:01 +00:00
commit 7031ccd6fd
6 changed files with 368 additions and 232 deletions

View file

@ -1,12 +1,13 @@
import ast
import inspect
import textwrap
from typing import Dict, Union
from langchain.agents.tools import Tool
def get_func_tool_params(func, **kwargs) -> Union[Dict, None]:
tree = ast.parse(inspect.getsource(func))
tree = ast.parse(textwrap.dedent(inspect.getsource(func)))
# Iterate over the statements in the abstract syntax tree
for node in ast.walk(tree):
@ -57,7 +58,7 @@ def get_func_tool_params(func, **kwargs) -> Union[Dict, None]:
def get_class_tool_params(cls, **kwargs) -> Union[Dict, None]:
tree = ast.parse(inspect.getsource(cls))
tree = ast.parse(textwrap.dedent(inspect.getsource(cls)))
tool_params = {}

View file

@ -25,6 +25,7 @@ class LangfuseInstance:
cls._instance = Langfuse(
public_key=settings.LANGFUSE_PUBLIC_KEY,
secret_key=settings.LANGFUSE_SECRET_KEY,
host=settings.LANGFUSE_HOST,
)
else:
logger.debug("No Langfuse credentials found")