|
Let's have a look at one example: |
|
```text |
|
Task: "Identify the oldest person in thedocument` and create an image showcasing the result as a banner." |
|
I will use the following tools: document_qa to find the oldest person in the document, then image_generator to generate an image according to the answer. |
|
Answer: |
|
py |
|
answer = document_qa(document, question="What is the oldest person?") |
|
print(f"The answer is {answer}.") |
|
image = image_generator("A banner showing " + answer) |
|
` |
|
The pattern the model is prompted to repeat has three parts: The task statement, the agent's explanation of |
|
what it intends to do, and finally the generated code. |