Skip to content

Commit e6c8782

Browse files
committed
chore: update stream auto tool_choice test
1 parent 83b8277 commit e6c8782

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Diff for: tests/test_functional/test_function_calling.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ def magic_number_tool(input: int) -> int:
8989
[magic_number_tool], tool_choice="magic_number_tool"
9090
)
9191

92-
stream = llm_with_tool.stream("What is the magic mumber of 2?")
92+
stream = llm_with_tool.stream(
93+
[
94+
HumanMessage(content="What is the magic mumber of 2?"),
95+
]
96+
)
9397

9498
tool_call_chunks = []
9599
for chunk in stream:
@@ -99,6 +103,12 @@ def magic_number_tool(input: int) -> int:
99103
assert len(tool_call_chunks) > 0
100104
assert tool_call_chunks[0]["name"] == "magic_number_tool"
101105

106+
@pytest.mark.skip(
107+
reason="""\
108+
Stream + auto tool choice not supported yet. \
109+
https://github.com/abetlen/llama-cpp-python/discussions/1615\
110+
"""
111+
)
102112
def test_auto_function_calling(self, instance: LlamaChatModel):
103113
@tool
104114
def magic_number_tool(input: int) -> int:
@@ -109,9 +119,6 @@ def magic_number_tool(input: int) -> int:
109119

110120
stream = llm_with_tool.stream(
111121
[
112-
SystemMessage(
113-
content="The assistant calls functions with appropriate input when necessary."
114-
),
115122
HumanMessage(content="What is the magic mumber of 2?"),
116123
]
117124
)

0 commit comments

Comments
 (0)