File tree Expand file tree Collapse file tree
src/haystack_integrations/components/generators/llama_cpp/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ dependencies = [
6767 " pytest-rerunfailures" ,
6868 " mypy" ,
6969 " pip" ,
70- " transformers[sentencepiece]" ,
70+ " transformers[sentencepiece]<5 " ,
7171]
7272
7373[tool .hatch .envs .test .scripts ]
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ def _convert_message_to_llamacpp_format(message: ChatMessage) -> ChatCompletionR
8686 if tool_call_results [0 ].origin .id is None :
8787 msg = "`ToolCall` must have a non-null `id` attribute to be used with llama.cpp."
8888 raise ValueError (msg )
89+ # handle list of multimodal tool call results
90+ if not isinstance (tool_call_results [0 ].result , str ):
91+ msg = "ToolCallResult.result must be a string to be used with llama.cpp."
92+ raise ValueError (msg )
8993 return {
9094 "role" : "function" ,
9195 "content" : tool_call_results [0 ].result ,
You can’t perform that action at this time.
0 commit comments