File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717# Simple tool for searching. Requires the langchain-community package.
1818# Mellea allows you to interop with langchain defined tools.
1919lc_ddg_search = DuckDuckGoSearchResults (output_format = "list" )
20- search_tool = MelleaTool .from_langchain (lc_ddg_search )
20+ search_tool : MelleaTool = MelleaTool .from_langchain (lc_ddg_search )
2121
2222
2323class Email (pydantic .BaseModel ):
Original file line number Diff line number Diff line change 2323 python_tool_hf = PythonInterpreterTool ()
2424
2525 # Convert to Mellea tool - now you can use it with Mellea!
26- python_tool = MelleaTool .from_smolagents (python_tool_hf )
26+ python_tool : MelleaTool = MelleaTool .from_smolagents (python_tool_hf )
2727
2828 # Use with Mellea session
2929 m = start_session ()
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def test_from_langchain_args_handling(caplog):
127127@pytest .mark .ollama
128128@pytest .mark .e2e
129129def test_from_langchain_generation (session : MelleaSession ):
130- t = MelleaTool .from_langchain (langchain_tool )
130+ t : MelleaTool = MelleaTool .from_langchain (langchain_tool )
131131
132132 out = session .instruct (
133133 "Call the langchain_tool." ,
You can’t perform that action at this time.
0 commit comments