Pass a JSON string and get an error mismatched or missing input parameter
Labels: name: auto:bug

### System Info

LangChain: 0.0.230
Python: 3.10

### Who can help?

_No response_

### Information

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

### Related Components

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

### Reproduction

I have a dictionary in python

```python

dict = {
                          "keyfeatures": [
                              {
                                  "title": "Search for Charitable Activities",
                                  "description": "The system must provide a search function that allows users to enter keywords and returns a list of charitable activities that match those keywords."
                              },
                              {
                                  "title": "Display Charitable Activities",
                                  "description": "The system must display the search results in a user-friendly format."
                              },
                              {
                                  "title": "Filter and Sort Charitable Activities",
                                  "description": "The system must provide options for users to filter and sort the search results."
                              },
                              {
                                  "title": "View Details of a Charitable Activity",
                                  "description": "The system must allow users to select a charitable activity from the search results and view more detailed information about it."
                              },
                              {
                                  "title": "Save or Bookmark Charitable Activities",
                                  "description": "The system must allow users to save or bookmark charitable activities that they're interested in."
                              }
                          ]
                      }

``` 

i convert the dictionary in a json string

```python

json_string = json.dumps(dict)

```
and i obtain the following string

```json

{"keyfeatures": [{"title": "Search for Charitable Activities", "description": "The system must provide a search function that allows users to enter keywords and returns a list of charitable activities that match those keywords."}, {"title": "Display Charitable Activities", "description": "The system must display the search results in a user-friendly format."}, {"title": "Filter and Sort Charitable Activities", "description": "The system must provide options for users to filter and sort the search results."}, {"title": "View Details of a Charitable Activity", "description": "The system must allow users to select a charitable activity from the search results and view more detailed information about it."}, {"title": "Save or Bookmark Charitable Activities", "description": "The system must allow users to save or bookmark charitable activities that they're interested in."}]}

``` 

if i pass that string to an AIMessagePromptTemplate

```python

AIMessagePromptTemplate.from_template(msg)

```

i get the following error:

```text

File "/home/andrea/PycharmProjects/ArchAI/venv/lib/python3.10/site-packages/langchain/prompts/chat.py", line 85, in from_template
    prompt = PromptTemplate.from_template(template, template_format=template_format)
  File "/home/andrea/PycharmProjects/ArchAI/venv/lib/python3.10/site-packages/langchain/prompts/prompt.py", line 145, in from_template
    return cls(
  File "/home/andrea/PycharmProjects/ArchAI/venv/lib/python3.10/site-packages/langchain/load/serializable.py", line 74, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for PromptTemplate
__root__
  Invalid prompt schema; check for mismatched or missing input parameters. '"title"' (type=value_error)

```

i have already added f-string formater with multiple curly-brackets but still fail

thanks in advance

### Expected behavior

the PromptMessage must import a formatted JSON string correctly without interfere with internal template curly-brackets format