import openai

    prompt = CustomPromptTemplate(
        template=template,
        tools=tools,
        # This omits the `agent_scratchpad`, `tools`, and `tool_names` variables because those are generated dynamically
        # This includes the `intermediate_steps` variable because that is needed
        input_variables=["input", "intermediate_steps"]
    )

    output_parser = CustomOutputParser()

    openai.api_key = "EMPTY"  # Not support yet
    # openai.api_base = "http://i-2.gpushare.com:43036/v1"
    # model_name = "StableBeluga-13B"
    # model_name = "chatglm2-6b"
    # openai.api_base = "http://i-2.gpushare.com:42054/v1"
    openai.api_base = "http://i-2.gpushare.com:20778/v1"
    # model_name = "SFT_Model"
    # model_name = "openbuddy-llama2-13b-v11.1-bf16"
    model_name = "izdax-llama2-7b-v1-chat"

    llm = OpenAI(model=model_name, openai_api_key=openai.api_key, openai_api_base=openai.api_base)

    # LLM chain consisting of the LLM and a prompt
    llm_chain = LLMChain(llm=llm, prompt=prompt)

    tool_names = [tool.name for tool in tools]
    agent = LLMSingleActionAgent(
        llm_chain=llm_chain,
        output_parser=output_parser,
        stop=["\nObservation:"],
        allowed_tools=tool_names
    )
    # print(agent.llm_chain.prompt.template)

    agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=True) 我想查看最终的prompt 我该如何查看 类似这种template = """Respond to the human as helpfully and accurately as possible. You have access to the following tools:

terminal: Run shell commands on this MacOS machine., args: {{{{'commands': {{{{'title': 'Commands', 'description': 'List of shell commands to run. Deserialized using json.loads', 'anyOf': [{{{{'type': 'string'}}}}, {{{{'type': 'array', 'items': {{{{'type': 'string'}}}}}}}}]}}}}}}}}
get_time: get_time(text: str = '') -> str - Returns todays date, use this for any questions related to knowing todays date . this input should always be an empty string, and this function will always return todays date - any date mathmatics should occur outside this function., args: {{{{'text': {{{{'title': 'Text', 'default': '', 'type': 'string'}}}}}}}}
Search: Search(query: str, top_n: int) -> dict - A wrapper around film search plugin. Useful for when you need to answer  questions about films or other movies., args: {{{{'query': {{{{'title': 'Query', 'description': 'should be a chinese search query', 'type': 'string'}}}}, 'top_n': {{{{'title': 'Top N', 'description': 'should be a integer number that agent want to get  If you cannot find a number, should be 10', 'type': 'integer'}}}}}}}}
text_to_image: text_to_image(query, top_n: int) -> dict - A wrapper around Text To Image plugin. Useful for when you need to generate image., args: {{{{'query': {{{{'title': 'Query', 'description': 'should be a chinese search query', 'type': 'string'}}}}, 'top_n': {{{{'title': 'Top N', 'description': 'should be a integer number that agent want to get  If you cannot find a number, should be 3', 'type': 'integer'}}}}}}}}
weather_info: weather_info(city_name: str, time_str: str) -> dict - A wrapper around weather info plugin. Useful for when you need to get weather info., args: {{{{'city_name': {{{{'title': 'City Name', 'description': 'should be a chinese city name if you cannot find a name should be 乌鲁木齐', 'type': 'string'}}}}, 'time_str': {{{{'title': 'Time Str', 'description': 'should be a time str that like 20230726', 'type': 'string'}}}}}}}}
qa: qa(query: str) -> dict - A wrapper around QA plugin. input should be a chinese search query Useful for when you need to get answer., args: {{{{'query': {{{{'title': 'Query', 'type': 'string'}}}}}}}}

Use a json blob to specify a tool by providing an action key (tool name) and an action_input key (tool input).

Valid "action" values: "Final Answer" or terminal, get_time, Search, text_to_image, weather_info, qa

Provide only ONE action per $JSON_BLOB, as shown:

```
{{
  "action": $TOOL_NAME,
  "action_input": $INPUT
}}
```

Follow this format:

Question: input question to answer
Thought: consider previous and subsequent steps
Action:
```
$JSON_BLOB
```
Observation: action result
... (repeat Thought/Action/Observation N times)
Thought: I know what to respond
Action:
```
{{
  "action": "Final Answer",
  "action_input": "Final response to human"
}}
```

Begin! Reminder to ALWAYS respond with a valid json blob of a single action. Use tools if necessary. Respond directly if appropriate. Format is Action:```$JSON_BLOB```then Observation:.
Thought:"""