File tree 1 file changed +11
-4
lines changed
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,11 @@ def magic_number_tool(input: int) -> int:
89
89
[magic_number_tool ], tool_choice = "magic_number_tool"
90
90
)
91
91
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
+ )
93
97
94
98
tool_call_chunks = []
95
99
for chunk in stream :
@@ -99,6 +103,12 @@ def magic_number_tool(input: int) -> int:
99
103
assert len (tool_call_chunks ) > 0
100
104
assert tool_call_chunks [0 ]["name" ] == "magic_number_tool"
101
105
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
+ )
102
112
def test_auto_function_calling (self , instance : LlamaChatModel ):
103
113
@tool
104
114
def magic_number_tool (input : int ) -> int :
@@ -109,9 +119,6 @@ def magic_number_tool(input: int) -> int:
109
119
110
120
stream = llm_with_tool .stream (
111
121
[
112
- SystemMessage (
113
- content = "The assistant calls functions with appropriate input when necessary."
114
- ),
115
122
HumanMessage (content = "What is the magic mumber of 2?" ),
116
123
]
117
124
)
You can’t perform that action at this time.
0 commit comments