init
This commit is contained in:
22
tests/test_llm_tools_tricu_bridge.py
Normal file
22
tests/test_llm_tools_tricu_bridge.py
Normal file
@ -0,0 +1,22 @@
|
||||
import llm
|
||||
import json
|
||||
from llm_tools_tricu_bridge import tricu-bridge
|
||||
|
||||
|
||||
def test_tool():
|
||||
model = llm.get_model("echo")
|
||||
chain_response = model.chain(
|
||||
json.dumps(
|
||||
{
|
||||
"tool_calls": [
|
||||
{"name": "tricu-bridge", "arguments": {"input": "pelican"}}
|
||||
]
|
||||
}
|
||||
),
|
||||
tools=[tricu-bridge],
|
||||
)
|
||||
responses = list(chain_response.responses())
|
||||
tool_results = json.loads(responses[-1].text())["tool_results"]
|
||||
assert tool_results == [
|
||||
{"name": "tricu-bridge", "output": "hello pelican", "tool_call_id": None}
|
||||
]
|
Reference in New Issue
Block a user