https://www.boundaryml.com logo
Message Roles
# suggestions
e
Access to underlying API message structure, e.g. role = Assistant | User | System and ability to modify and send w/ these From inspecting claude code's requests, it makes sense to me that the providers are trained on these, and simulating it isn't the same. Especially for multiturn interactions pydantic-ai surfaces this [message structure](https://ai.pydantic.dev/api/messages/) [Here](https://discord.com/channels/1119368998161752075/1397029993103753216/1397250253790511195) I was asking about this
g
Hi exrhizo! We have some jinja functionality for breaking your prompt into multiple messages, and specifying the role of each message:
Copy code
#"
  {{ _.role("User") }}
  What is the capital of France?

  {{ _.role("Assistant") }}
  You are a helpful geography bot
"#
If you put this in a prompt and look at the Raw cURL pane in the vscode or promptfiddle.com, you should see that the raw request does have multiple messages, and the messages have the roles you assigned. Does that address your suggestion?
e
oh cool thank you, that is what I was looking for