Crash occurs when using RedisSemanticCache() as a cache 
Labels: name: auto:bug

### System Info

langchain==0.0.232
python==3.8.16
M1 mac

### Who can help?

@hwchase17 @ago

The way that cache is stored in redis is like

> HGET key_name "metadata"
"{\"llm_string\": \"{\\\"lc\\\": 1, \\\"type\\\": \\\"constructor\\\", \\\"id\\\": [\\\"langchain\\\", \\\"chat_models\\\", \\\"openai\\\", \\\"ChatOpenAI\\\"], \\\"kwargs\\\": {\\\"model_name\\\": \\\"gpt-3.5-turbo-0613\\\", \\\"temperature\\\": 0.1, \\\"streaming\\\": true, \\\"openai_api_key\\\": {\\\"lc\\\": 1, \\\"type\\\": \\\"secret\\\", \\\"id\\\": [\\\"OPENAI_API_KEY\\\"]}}}---[('stop', None)]\", \"prompt\": \"[{\\\"lc\\\": 1, \\\"type\\\": \\\"constructor\\\", \\\"id\\\": [\\\"langchain\\\", \\\"schema\\\", \\\"messages\\\", \\\"HumanMessage\\\"], \\\"kwargs\\\": {\\\"content\\\": \\\"Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language.\\\\n\\\\nChat History:\\\\n\\\\nHuman: how is it similar to VQ-GAN?\\\\nAssistant: I don't know what\\\\nFollow Up Input: what is nas?\\\\nStandalone question:\\\"}}]\", \"return_val\": [\"What does NAS stand for?\"]}"

> HGET key_name "content"
"[{\"lc\": 1, \"type\": \"constructor\", \"id\": [\"langchain\", \"schema\", \"messages\", \"HumanMessage\"], \"kwargs\": {\"content\": \"Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question, in its original language.\\n\\nChat History:\\n\\nHuman: how is it similar to VQ-GAN?\\nAssistant: I don't know what\\nFollow Up Input: what is nas?\\nStandalone question:\"}}]"

Is this how its supposed to be?

### 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
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

langchain.llm_cache = RedisSemanticCache(
    redis_url="redis://localhost:6379", embedding=emb_fn
)

retrieved_chat_history = RedisChatMessageHistory(
       session_id=f"{MEM_INDEX_NAME}:",
       url=REDIS_URL,
)
retrieved_memory = ConversationBufferMemory(
       chat_memory=retrieved_chat_history,
       memory_key="history",
       return_messages=True,
)
llm = ChatOpenAI(
    model_name=CHAT_MODEL,
    temperature=0.1,
    streaming=True,
    callbacks=[StreamingStdOutCallbackHandler()],
)
qa = ConversationChain(llm=llm, memory=retrieved_memory, prompt=CHAT_PROMPT)

res = qa({"question": query})

Enter a question: what is nas?
Thinking... (print_fn)
'message'
Traceback (most recent call last):
  File "chat.py", line 109, in <module>
    response = chain({"input": query})
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chains/base.py", line 243, in __call__
    raise e
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chains/base.py", line 237, in __call__
    self._call(inputs, run_manager=run_manager)
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chains/llm.py", line 92, in _call
    response = self.generate([inputs], run_manager=run_manager)
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chains/llm.py", line 102, in generate
    return self.llm.generate_prompt(
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chat_models/base.py", line 230, in generate_prompt
    return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs)
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chat_models/base.py", line 125, in generate
    raise e
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chat_models/base.py", line 115, in generate
    self._generate_with_cache(
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/chat_models/base.py", line 272, in _generate_with_cache
    return ChatResult(generations=cache_val)
  File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__
  File "pydantic/main.py", line 1076, in pydantic.main.validate_model
  File "pydantic/fields.py", line 895, in pydantic.fields.ModelField.validate
  File "pydantic/fields.py", line 928, in pydantic.fields.ModelField._validate_sequence_like
  File "pydantic/fields.py", line 1094, in pydantic.fields.ModelField._validate_singleton
  File "pydantic/fields.py", line 884, in pydantic.fields.ModelField.validate
  File "pydantic/fields.py", line 1101, in pydantic.fields.ModelField._validate_singleton
  File "pydantic/fields.py", line 1157, in pydantic.fields.ModelField._apply_validators
  File "pydantic/class_validators.py", line 337, in pydantic.class_validators._generic_validator_basic.lambda13
  File "pydantic/main.py", line 719, in pydantic.main.BaseModel.validate
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/load/serializable.py", line 74, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__
  File "pydantic/main.py", line 1102, in pydantic.main.validate_model
  File "/Users/sparshgupta/mambaforge/envs/openai_env/lib/python3.8/site-packages/langchain/schema/output.py", line 42, in set_text
    values["text"] = values["message"].content
KeyError: 'message'

### Expected behavior

Regular caching behaviour as shown in https://python.langchain.com/docs/modules/model_io/models/llms/integrations/llm_caching