Repository: langchain
Issue: Can ChatHuggingFace model perform Function Calling?
Labels: 🤖:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

I was using the following code to demonstrate the tool-calling feature of HuggingFace model, but i got error.

```python
from langchain_huggingface import ChatHuggingFace, HuggingFacePipeline

pipeline = HuggingFacePipeline.from_model_id(
    model_id="NousResearch/Hermes-2-Pro-Llama-3-8B",
    task="text-generation",
    pipeline_kwargs={
        "max_new_tokens": 500,
        "top_k": 50,
        "temperature": 0.1,
        "do_sample": True,
        "return_full_text": False
    },
    device=0
)

model = ChatHuggingFace(llm=pipeline)
from pydantic import BaseModel, Field
from langchain_core.tools import tool

class GetWeather(BaseModel):
    '''Get the current weather in a given location'''
    location: str = Field(description="The city and state,e.g. San Francisco, CA")

class GetPopulation(BaseModel):
    '''Get the current population in a given location'''
    location: str = Field(description="The city and state, e.g. San Francisco, CA")

model_with_tools = model.bind_tools([GetWeather, GetPopulation])
model_with_tools.invoke(
    "Which city is hotter today and which is bigger: LA or NY?",
)
model_with_tools.tool_calls
```

### Error Message and Stack Trace (if applicable)
```
{
	"name": "AttributeError",
	"message": "'ChatHuggingFace' object has no attribute 'tool_calls'",
	"stack": "---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In[7], line 1
----> 1 model_with_tools.tool_calls

File /dccstor/kirushikesh/.conda/testenv/lib/python3.10/site-packages/langchain_core/runnables/base.py:5704, in RunnableBinding.__getattr__(self, name)
   5703 def __getattr__(self, name: str) -> Any:
-> 5704     attr = getattr(self.bound, name)
   5706     if callable(attr) and (
   5707         config_param := inspect.signature(attr).parameters.get(\"config\")
   5708     ):
   5709         if config_param.kind == inspect.Parameter.KEYWORD_ONLY:

File /dccstor/kirushikesh/.conda/testenv/lib/python3.10/site-packages/pydantic/main.py:856, in BaseModel.__getattr__(self, item)
    853     return super().__getattribute__(item)  # Raises AttributeError if appropriate
    854 else:
    855     # this is the current error
--> 856     raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')

AttributeError: 'ChatHuggingFace' object has no attribute 'tool_calls'"
}
```
### Description

Ok, i am try to use langchain library to play with the tool-calling capability of HuggingFace models. Recently, i got to know about the Hermes-LLM tool calling capability from [this](https://huggingface.co/blog/unified-tool-use) blog. I am a big fan of Langchain and i thought of doing the function calling with that model in Langchain. First i am not sure if its possible yet in Langchain, but when i checked this [class definition](https://github.com/langchain-ai/langchain/blob/0a177ec2cc39213eb8fc8c185b5afb73c3f1d028/libs/partners/huggingface/langchain_huggingface/chat_models/huggingface.py#L266) i thought its possible and i tried to reproduce the same code. 

The .bind_tools() is working from ChatHuggingFace, but when i tried to read the tool_calls from the response i was getting the error.

### System Info


System Information
------------------
> OS:  Linux
> OS Version:  #1 SMP Thu Dec 7 03:06:13 EST 2023
> Python Version:  3.10.4 (main, Mar 31 2022, 08:41:55) [GCC 7.5.0]

Package Information
-------------------
> langchain_core: 0.3.0
> langchain: 0.3.0
> langchain_community: 0.3.0
> langsmith: 0.1.121
> langchain_huggingface: 0.1.0
> langchain_ibm: 0.2.0
> langchain_openai: 0.2.0
> langchain_text_splitters: 0.3.0

Optional packages not installed
-------------------------------
> langgraph
> langserve

Other Dependencies
------------------
> aiohttp: 3.10.5
> async-timeout: 4.0.3
> dataclasses-json: 0.6.7
> httpx: 0.27.2
> huggingface-hub: 0.24.7
> ibm-watsonx-ai: 1.1.9
> jsonpatch: 1.33
> numpy: 1.26.4
> openai: 1.45.1
> orjson: 3.10.7
> packaging: 24.1
> pydantic: 2.9.2
> pydantic-settings: 2.5.2
> PyYAML: 6.0.2
> requests: 2.32.2
> sentence-transformers: 3.1.0
> SQLAlchemy: 2.0.35
> tenacity: 8.5.0
> tiktoken: 0.7.0
> tokenizers: 0.19.1
> transformers: 4.44.2
> typing-extensions: 4.12.2