https://www.boundaryml.com logo
🟡 Accessing System Prompt/Input from Python BAML ...
# questions
g
is there any way to access system_prompt/input passed to llm from the python baml client side?
like
Copy code
function ExtractResume(resume: string) -> Resume {
  // Specify a client as provider/model-name
  // You can also use custom LLM params with a custom client name from clients.baml like "client CustomGPT5" or "client CustomSonnet4"
  client "openai/gpt-4.1"// Set OPENAI_API_KEY to use this client.
  prompt #"
    Extract from this content:
    {{ resume }}

    {{ ctx.output_format }}
  "#
}
in this i want to access prompt just value for adding it to logging
v
you'll have to use
b.request
via the modular API: https://docs.boundaryml.com/guide/baml-advanced/modular-api