import langchain
from langchain.chat_models import ChatOpenAI
from langchain_core.tools import Tool

langchain.verbose = True
langchain.debug = True


def get_chat():
    return ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0)


def my_super_func(params):
    return 42


if __name__ == "__main__":
    tools = [
        Tool.from_function(
            func=my_super_func,
            name="The_Answer",
            description="生命、宇宙、そして万物について究極の疑問の答え"
        ),
    ]



langchain_core.tools.Tool.from_function langchain.chat_models.ChatOpenAI
[((178, 231), 'langchain.chat_models.ChatOpenAI', 'ChatOpenAI', ([], {'model_name': '"""gpt-3.5-turbo"""', 'temperature': '(0)'}), "(model_name='gpt-3.5-turbo', temperature=0)\n", (188, 231), False, 'from langchain.chat_models import ChatOpenAI\n'), ((326, 427), 'langchain_core.tools.Tool.from_function', 'Tool.from_function', ([], {'func': 'my_super_func', 'name': '"""The_Answer"""', 'description': '"""生命、宇宙、そして万物について究極の疑問の答え"""'}), "(func=my_super_func, name='The_Answer', description=\n    '生命、宇宙、そして万物について究極の疑問の答え')\n", (344, 427), False, 'from langchain_core.tools import Tool\n')]