MRKL agent is passing "Observation" text to tools when using non-OpenAI LLMs and breaks structured input tools
Labels: name: area: agent, name: auto:bug

### System Info

Python 3.9.16
Langchain 0.0.326
Linux (Fedora 37)

### Who can help?

_No response_

### Information

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

### Related Components

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

### Reproduction

```python
from langchain.utilities import SerpAPIWrapper
from langchain.agents import AgentType, initialize_agent
from langchain.tools import Tool

import langchain
langchain.debug = True

from langchain.llms import OpenAI
llm = OpenAI(temperature=0, verbose=True)

search = SerpAPIWrapper()

events_tool = Tool(
    name="events_tool_serp",
    description="A tool to look up current events",
    func=search.run,
)
tools = [events_tool]

agent = initialize_agent(
    tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
)

agent.run("What happened yesterday?")
```

When the above code is run with OpenAI, things work OK. However, when swapped for a different LLM endpoint:

```python
# using IBM watsonx.ai
from model_context import get_watsonx_predictor
llm = get_watsonx_predictor(
    model="codellama/codellama-34b-instruct", min_new_tokens=5, verbose=True
)
```

Odd things happen:

```
[llm/start] [1:chain:AgentExecutor > 2:chain:LLMChain > 3:llm:LangChainInterface] Entering LLM run with input:
{
  "prompts": [
    "Answer the following questions as best you can. You have access to the following tools:\n\nevents_tool_serp: A tool to look up current events\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [events_tool_serp]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: What happened yesterday?\nThought:"
  ]
}
[llm/end] [1:chain:AgentExecutor > 2:chain:LLMChain > 3:llm:LangChainInterface] [2.65s] Exiting LLM run with output:
{
  "generations": [
    [
      {
        "text": " I should look up current events\nAction: events_tool_serp\nAction Input: yesterday\nObservation:",
        "generation_info": {
          "generated_token_count": 25,
          "input_token_count": 160,
          "stop_reason": "STOP_SEQUENCE",
          "stop_sequence": "\nObservation:",
          "input_text": "Answer the following questions as best you can. You have access to the following tools:\n\nevents_tool_serp: A tool to look up current events\n\nUse the following format:\n\nQuestion: the input question you must answer\nThought: you should always think about what to do\nAction: the action to take, should be one of [events_tool_serp]\nAction Input: the input to the action\nObservation: the result of the action\n... (this Thought/Action/Action Input/Observation can repeat N times)\nThought: I now know the final answer\nFinal Answer: the final answer to the original input question\n\nBegin!\n\nQuestion: What happened yesterday?\nThought:"
        },
        "type": "Generation"
      }
    ]
  ],
  "llm_output": {
    "token_usage": {
      "generated_token_count": 25,
      "input_token_count": 160
    }
  },
  "run": null
}
[chain/end] [1:chain:AgentExecutor > 2:chain:LLMChain] [2.65s] Exiting Chain run with output:
{
  "text": " I should look up current events\nAction: events_tool_serp\nAction Input: yesterday\nObservation:"
}
[tool/start] [1:chain:AgentExecutor > 4:tool:events_tool_serp] Entering Tool run with input:
"yesterday
Observation:"
```

The `Observation:` text is being passed into the tool. For simple tools like search engines, this often is not a problem. However, when your tool expects a structured input, you sometimes end up with tool input like the following:

```
"foo,bar
Observation:"
```

This results in the tool attempting to do something like splitting on `,` and then the second part of the resulting array is:

```
bar
Observation:
```

Which definitely breaks the tool.

### Expected behavior

The `Observation:` text should definitely not be passed as part of the tool input.

The MRKL output parser is here:
https://github.com/langchain-ai/langchain/blob/v0.0.327/libs/langchain/langchain/agents/mrkl/output_parser.py#L26-L77

The regex does appear to match the groups correctly:
https://regex101.com/r/v7Tg1n/1

It's unclear, though, why the `Observation:` text is ending up getting passed into the input.

Although, when you use newline characters (`\n`) in the string, and not actual newlines, it does appear that the `Observation` part is being caught in the group:
https://regex101.com/r/MMCvYn/1

I tried to spelunk into the code to figure out when the agent "base" calls `parse` to see why the `Observation` text would be getting passed into parse in the first place, but it seems that one possible fix here would be to modify the parse RegEx for MRKL to make sure it does NOT capture the observation component.

Changing the RegEx in the MRKL agent to the following:
```python
            r"Action\s*\d*\s*:[\s]*(.*?)[\s]*Action\s*\d*\s*Input\s*\d*\s*:[\s]*(.*)Observation:"
```

And then modifying the tool input strip:
```python
        if action_match:
            action = action_match.group(1).strip()
            action_input = action_match.group(2)
            tool_input = action_input.strip()
```

fixes the issue if "Observation" got passed in, but I am assuming that `parse` shouldn't have gotten this in the first place.