You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encounter an issue with calling function using Mistral 7b model through Huggingface pipeline
AttributeError Traceback (most recent call last)
Cell In [57], [line 1](vscode-notebook-cell:?execution_count=57&line=1)
----> [1](vscode-notebook-cell:?execution_count=57&line=1) out = rl("what is the time in new york city?")
[2](vscode-notebook-cell:?execution_count=57&line=2) # get_time(**out.function_call)
File /usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:262, in RouteLayer.__call__(self, text, vector, simulate_static)
[260](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:260) else:
[261](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:261) route.llm = self.llm
--> [262](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:262) return route(text)
[263](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:263) elif passed and route is not None and simulate_static:
[264](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:264) return RouteChoice(
[265](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:265) name=route.name,
[266](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:266) function_call=None,
[267](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:267) similarity_score=None,
[268](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/layer.py:268) )
File /usr/local/lib/python3.9/dist-packages/semantic_router/route.py:70, in Route.__call__(self, query)
[65](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:65) raise ValueError(
[66](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:66) "Query is required for dynamic routes. Please ensure the `query` "
[67](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:67) "argument is passed."
[68](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:68) )
[69](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:69) # if a function schema is provided we generate the inputs
---> [70](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:70) extracted_inputs = self.llm.extract_function_inputs(
[71](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:71) query=query, function_schema=self.function_schema
[72](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:72) )
[73](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:73) func_call = extracted_inputs
[74](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:74) else:
[75](https://file+.vscode-resource.vscode-cdn.net/usr/local/lib/python3.9/dist-packages/semantic_router/route.py:75) # otherwise we just pass None for the call
AttributeError: 'HuggingFacePipeline' object has no attribute 'extract_function_inputs'
The text was updated successfully, but these errors were encountered:
mrhimanshu
changed the title
Dynamic route function calling using Huggingface
Dynamic route function calling using Huggingface - 'HuggingFacePipeline' object has no attribute 'extract_function_inputs'
Mar 17, 2024
mrhimanshu
changed the title
Dynamic route function calling using Huggingface - 'HuggingFacePipeline' object has no attribute 'extract_function_inputs'
Dynamic route function calling - 'HuggingFacePipeline' object has no attribute 'extract_function_inputs'
Mar 17, 2024
I encounter an issue with calling function using Mistral 7b model through Huggingface pipeline
The text was updated successfully, but these errors were encountered: