HumanMessage error expecting a str type in content
Labels: name: area: memory, name: auto:bug, name: area: models

### System Info

Python 3.11.6
Langchain 0.0.315

Device name	Precision7760
Processor	11th Gen Intel(R) Core(TM) i9-11950H @ 2.60GHz   2.61 GHz
Installed RAM	32.0 GB (31.2 GB usable)
Device ID	049EB0D9-D534-47A1-9F59-62B1F3D578D4
Product ID	00355-60713-95419-AAOEM
System type	64-bit operating system, x64-based processor
Pen and touch	No pen or touch input is available for this display

Edition	Windows 11 Pro
Version	22H2
Installed on	‎10/‎7/‎2023
OS build	22621.2428
Experience	Windows Feature Experience Pack 1000.22674.1000.0


### Who can help?

@hwchase17
@agola11

### Information

- [ ] The official example notebooks/scripts
- [X] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [X] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

from langchain.schema import AIMessage, HumanMessage
from langchain.chat_models import ChatOpenAI
from langchain.memory import ConversationBufferMemory
from langchain.chains import ConversationChain

chat = ChatOpenAI()
memory = ConversationBufferMemory()
conversation = ConversationChain(llm=chat, memory=memory)

user_input="Hola atenea yo me llamo franks y estoy interesado en adquirir un vehículo"

response = conversation.run([HumanMessage(content=str(user_input))])

print(response)


I am getting this errors:
Traceback (most recent call last):
  File "F:\Audi\Chatbot_Demo\mini_example.py", line 12, in <module>
    response = conversation.run([HumanMessage(content=str(user_input))])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 503, in run
    return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 310, in __call__
    final_outputs: Dict[str, Any] = self.prep_outputs(
                                    ^^^^^^^^^^^^^^^^^^
  File "E:\Python\Python311\Lib\site-packages\langchain\chains\base.py", line 406, in prep_outputs
    self.memory.save_context(inputs, outputs)
  File "E:\Python\Python311\Lib\site-packages\langchain\memory\chat_memory.py", line 36, in save_context
    self.chat_memory.add_user_message(input_str)
  File "E:\Python\Python311\Lib\site-packages\langchain\schema\chat_history.py", line 46, in add_user_message
    self.add_message(HumanMessage(content=message))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Python\Python311\Lib\site-packages\langchain\load\serializable.py", line 97, in __init__
    super().__init__(**kwargs)
  File "E:\Python\Python311\Lib\site-packages\pydantic\v1\main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for HumanMessage
content
  **str type expected (type=type_error.str)**

### Expected behavior

The argument passed to HumanMessage is a str, nevertheless an error is produced (as it wasn't).