{"id":907,"date":"2026-09-29T11:37:55","date_gmt":"2026-09-29T09:37:55","guid":{"rendered":"https:\/\/rhein-ruhr-informatik.de\/?p=907"},"modified":"2026-09-29T11:37:58","modified_gmt":"2026-09-29T09:37:58","slug":"strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming","status":"publish","type":"post","link":"https:\/\/rhein-ruhr-informatik.de\/en\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/","title":{"rendered":"Structured Multi-Persona Content Generation with Azure OpenAI and SSE Streaming"},"content":{"rendered":"<p>In this tutorial, we will build a <strong>Content-Generation-Studio<\/strong>that turns a single marketing brief into three structured content variations using distinct AI personas. The frontend is built with <strong>Next.js and TypeScript<\/strong> the backend uses <strong>Python with FastAPI<\/strong> and <strong>Azure OpenAI<\/strong> powers the structured generation and native Server-Sent Events (SSE) streaming with <strong>Azure Content Safety<\/strong> providing automated moderation guardrails.<\/p>\n\n\n\n<p>Instead of producing unpredictable raw text, our application enforces guaranteed data schemas (title, body, and SEO keywords), real-time progress feedback via SSE streaming, and three distinct perspectives tailored to specific audiences: <strong>Friendly SaaS Marketer<\/strong>, <strong>Technical Blogger<\/strong> and <strong>Skeptical CFO<\/strong>.<\/p>\n\n\n\n<p>Next.js (TypeScript) \u2192 FastAPI \u2192 Azure Content Safety (Guardrails)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2193<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Azure OpenAI (GPT-4.1 \/ Structured Outputs)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2193<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server-Sent Events (SSE-Stream)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \u2193<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3 Persona-Variationen (Title, Body, SEO Keywords)<\/p>\n\n\n\n<p><strong>Prerequisites<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Python and Node.js installed on your computer.<\/li>\n\n\n\n<li>An Azure OpenAI resource with a deployed model (e.g. GPT-4.1-mini or GPT-4o).<\/li>\n\n\n\n<li>An Azure Content Safety resource.<\/li>\n\n\n\n<li>Basic knowledge of FastAPI, Next.js, and TypeScript.<\/li>\n\n\n\n<li>Basic understanding of Server-Sent Events (SSE) and Pydantic schemas.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Step 1: Define the Pydantic Schema<\/strong><\/p>\n\n\n\n<p>The first step is defining the structure our application expects from the model. We create Pydantic models for individual variations and the overall response container:<\/p>\n\n\n\n<p>class Variation(BaseModel):<br>&nbsp;&nbsp;&nbsp; id: int<br>&nbsp;&nbsp;&nbsp; title: str<br>&nbsp;&nbsp;&nbsp; body: str<br>&nbsp;&nbsp;&nbsp; seoKeywords: list[str] = Field(default_factory=list)<br><br>class ResultSchema(BaseModel):<br>&nbsp;&nbsp;&nbsp; variations: list[Variation]<\/p>\n\n\n\n<p>This schema acts as a dual contract: it guarantees the shape of our backend API responses for the Next.js frontend, and it is passed directly to Azure OpenAI's <strong>Structured Outputs<\/strong>engine to strictly constrain the model's output JSON Schema.<\/p>\n\n\n\n<p><strong>Step 2: Implement Persona System Prompts<\/strong><\/p>\n\n\n\n<p>Marketing copy requires different tones depending on the channel and audience. In our app, we define three system prompts:<\/p>\n\n\n\n<p>PERSONAS = {<br>&nbsp;&nbsp;&nbsp; &#8222;friendly&#8220;: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;name&#8220;: &#8222;Friendly SaaS Marketer&#8220;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;system&#8220;: (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;You are a friendly SaaS marketer. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Write in a warm, benefit-led, conversational tone. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Prefer short sentences and a clear call to action.&#8220;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ),<br>&nbsp;&nbsp;&nbsp; },<br>&nbsp;&nbsp;&nbsp; &#8222;technical&#8220;: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;name&#8220;: &#8222;Technical Blogger&#8220;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;system&#8220;: (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;You are a technical blogger. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Write in a precise, credible, educational tone. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Include concrete details, trade-offs, and one practical tip.&#8220;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ),<br>&nbsp;&nbsp;&nbsp; },<br>&nbsp;&nbsp;&nbsp; &#8222;cfo&#8220;: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;name&#8220;: &#8222;Skeptical CFO&#8220;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;system&#8220;: (<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;You are a skeptical CFO. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Write in a direct, evidence-driven, ROI-focused tone. &#8222;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8222;Quantify impact where possible and flag risks explicitly.&#8220;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ),<br>&nbsp;&nbsp;&nbsp; },<br>}<\/p>\n\n\n\n<p>When a request arrives, the backend dynamically combines the selected persona system prompt with user instructions containing the brief, target audience, format (LinkedIn post, marketing email, or landing page copy), and output language.<\/p>\n\n\n\n<p><strong>Step 3: Guardrail Content with Azure Content Safety<\/strong><\/p>\n\n\n\n<p>Before invoking the language model, the backend validates the brief against <strong>Azure Content Safety<\/strong>. This detects harmful inputs across categories such as violence, hate speech, self-harm, and sexual content:<\/p>\n\n\n\n<p>response = content_safety_client.analyze_text(<br>&nbsp;&nbsp;&nbsp; AnalyzeTextOptions(text=req.brief)<br>)<br>is_safe = all(item.severity &lt; 2 for item in response.categories_analysis)<\/p>\n\n\n\n<p>If harmful content is detected, the API returns a structured <strong>400 Bad Request<\/strong> with specific category details. This prevents prompt injection and misuse while avoiding unnecessary token costs on blocked prompts. A local heuristic is also available as a fallback when offline.<\/p>\n\n\n\n<p><strong>Step 4: Real-Time SSE Streaming and Incremental Parsing<\/strong><\/p>\n\n\n\n<p>Generating three comprehensive marketing variations takes several seconds. Rather than making the user wait for the full response, we use <strong>Server-Sent Events (SSE)<\/strong> via FastAPI's <strong>StreamingResponse<\/strong> von FastAPI:<\/p>\n\n\n\n<p>@app.post(&#8222;\/generate\/stream&#8220;)<br>def generate_stream(req: GenerateRequest):<br>&nbsp;&nbsp;&nbsp; def events():<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield _sse_event(&#8222;safety&#8220;, {&#8222;safe&#8220;: True})<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield _sse_event(&#8222;start&#8220;, {&#8222;request_id&#8220;: request_id})<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; with client.responses.stream(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; model=DEPLOYMENT,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instructions=system,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input=user_prompt,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text_format=ResultSchema,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ) as stream:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for event in stream:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if event.type == &#8222;response.output_text.delta&#8220;:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield _sse_event(&#8222;delta&#8220;, {&#8222;text&#8220;: event.delta})<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Inkrementell abgeschlossene JSON-Variation-Objekte extrahieren<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for v in _complete_variations_from_json(accumulated_text):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yield _sse_event(&#8222;variation&#8220;, {&#8222;variation&#8220;: v.dict()})<br>&nbsp;&nbsp;&nbsp; return StreamingResponse(events(), media_type=&#8220;text\/event-stream&#8220;)<\/p>\n\n\n\n<p>The streaming generator parses JSON chunks on the fly. As soon as each variation's closing bracket is reached, an SSE <strong>variation<\/strong>event is emitted. This allows the Next.js frontend to render each content card immediately as it finishes, providing a fast and reactive user experience.<\/p>\n\n\n\n<p><strong>Step 5: Connect FastAPI and Next.js with Observability<\/strong><\/p>\n\n\n\n<p>The Next.js frontend connects directly to the FastAPI stream using standard<strong>fetch<\/strong> and reads chunks with a <strong>ReadableStreamDefaultReader<\/strong>. It renders live progress, displays persona badges, and supports instant copy, JSON view, and file export.\nIn addition, every request captures observability data:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Latency in milliseconds.<\/li>\n\n\n\n<li>Prompt, completion, and total token usage.<\/li>\n\n\n\n<li>Estimated execution cost based on Azure OpenAI token pricing.<\/li>\n\n\n\n<li>Per-client generation logs stored in SQLite and process memory.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Why Personas and Structured Outputs Matter<\/strong><\/p>\n\n\n\n<p>Without persona steering and structured outputs, LLM outputs tend to be generic, unpredictable, and difficult to parse reliably in production applications. Combining explicit persona instructions with Pydantic schemas yields predictable, high-quality results tailored to real marketing workflows.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The frontend receives a guaranteed, type-safe data schema.<\/li>\n\n\n\n<li>No regex or Markdown code block stripping is required in application code.<\/li>\n\n\n\n<li>Personas provide consistent brand voice and clear positioning.<\/li>\n\n\n\n<li>Streaming eliminates perceived latency and improves engagement.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Conclusion<\/strong><\/p>\n\n\n\n<p>With Next.js, FastAPI, Azure OpenAI, and Azure Content Safety, we built an end-to-end content generation application with enterprise-grade guardrails and real-time streaming.<\/p>\n\n\n\n<p>FastAPI Backend      \u2192 Controls safety checks, persona mapping, streaming, and token logs<br>Azure OpenAI         \u2192 Delivers structured, persona-driven generation via GPT-4.1<br>Azure Content Safety \u2192 Blocks harmful prompts before execution<br>Next.js Frontend     \u2192 Delivers a responsive, multi-language UI with live SSE card rendering<\/p>\n\n\n\n<p>This combination transforms generative AI from an unpredictable chat experiment into a dependable, production-ready content engineering pipeline.<\/p>\n\n\n\n<p>I hope this short tutorial was helpful.<\/p>\n\n\n\n<p><strong>Now let\u2019s code!<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>In diesem Tutorial erstellen wir ein Content-Generation-Studio, das ein einzelnes Marketing-Briefing mithilfe verschiedener KI-Personas in drei strukturierte Content-Variationen umwandelt. Das Frontend wird mit Next.js und TypeScript entwickelt, das Backend verwendet Python mit FastAPI und Azure OpenAI \u00fcbernimmt die strukturierte Generierung sowie das native Server-Sent-Events-Streaming (SSE), w\u00e4hrend Azure Content Safety f\u00fcr [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-907","post","type-post","status-publish","format-standard","hentry","category-articles"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rhein-ruhr-informatik.de\/en\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial erstellen wir ein Content-Generation-Studio, das ein einzelnes Marketing-Briefing mithilfe verschiedener KI-Personas in drei strukturierte Content-Variationen umwandelt. Das Frontend wird mit Next.js und TypeScript entwickelt, das Backend verwendet Python mit FastAPI und Azure OpenAI \u00fcbernimmt die strukturierte Generierung sowie das native Server-Sent-Events-Streaming (SSE), w\u00e4hrend Azure Content Safety f\u00fcr [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rhein-ruhr-informatik.de\/en\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\" \/>\n<meta property=\"og:site_name\" content=\"Rhein-Ruhr-Informatik\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-29T09:37:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-29T09:37:58+00:00\" \/>\n<meta name=\"author\" content=\"Rhein-Ruhr-Informatik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rhein-Ruhr-Informatik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\"},\"author\":{\"name\":\"Rhein-Ruhr-Informatik\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/person\/29f8c93b2080ee25df204d589a7f2477\"},\"headline\":\"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming\",\"datePublished\":\"2026-09-29T09:37:55+00:00\",\"dateModified\":\"2026-09-29T09:37:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\"},\"wordCount\":1471,\"publisher\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#organization\"},\"articleSection\":[\"Artikel\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\",\"url\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\",\"name\":\"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik\",\"isPartOf\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#website\"},\"datePublished\":\"2026-09-29T09:37:55+00:00\",\"dateModified\":\"2026-09-29T09:37:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rhein-ruhr-informatik.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#website\",\"url\":\"https:\/\/rhein-ruhr-informatik.de\/\",\"name\":\"Rhein-Ruhr-Informatik\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rhein-ruhr-informatik.de\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#organization\",\"name\":\"Rhein-Ruhr-Informatik\",\"url\":\"https:\/\/rhein-ruhr-informatik.de\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rhein-ruhr-informatik.de\/wp-content\/uploads\/2024\/02\/logo-2.png\",\"contentUrl\":\"https:\/\/rhein-ruhr-informatik.de\/wp-content\/uploads\/2024\/02\/logo-2.png\",\"width\":570,\"height\":570,\"caption\":\"Rhein-Ruhr-Informatik\"},\"image\":{\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/person\/29f8c93b2080ee25df204d589a7f2477\",\"name\":\"Rhein-Ruhr-Informatik\",\"sameAs\":[\"https:\/\/rhein-ruhr-informatik.de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rhein-ruhr-informatik.de\/en\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/","og_locale":"en_US","og_type":"article","og_title":"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik","og_description":"In diesem Tutorial erstellen wir ein Content-Generation-Studio, das ein einzelnes Marketing-Briefing mithilfe verschiedener KI-Personas in drei strukturierte Content-Variationen umwandelt. Das Frontend wird mit Next.js und TypeScript entwickelt, das Backend verwendet Python mit FastAPI und Azure OpenAI \u00fcbernimmt die strukturierte Generierung sowie das native Server-Sent-Events-Streaming (SSE), w\u00e4hrend Azure Content Safety f\u00fcr [&hellip;]","og_url":"https:\/\/rhein-ruhr-informatik.de\/en\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/","og_site_name":"Rhein-Ruhr-Informatik","article_published_time":"2026-09-29T09:37:55+00:00","article_modified_time":"2026-09-29T09:37:58+00:00","author":"Rhein-Ruhr-Informatik","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rhein-Ruhr-Informatik","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#article","isPartOf":{"@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/"},"author":{"name":"Rhein-Ruhr-Informatik","@id":"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/person\/29f8c93b2080ee25df204d589a7f2477"},"headline":"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming","datePublished":"2026-09-29T09:37:55+00:00","dateModified":"2026-09-29T09:37:58+00:00","mainEntityOfPage":{"@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/"},"wordCount":1471,"publisher":{"@id":"https:\/\/rhein-ruhr-informatik.de\/#organization"},"articleSection":["Artikel"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/","url":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/","name":"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming - Rhein-Ruhr-Informatik","isPartOf":{"@id":"https:\/\/rhein-ruhr-informatik.de\/#website"},"datePublished":"2026-09-29T09:37:55+00:00","dateModified":"2026-09-29T09:37:58+00:00","breadcrumb":{"@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/rhein-ruhr-informatik.de\/2026\/09\/29\/strukturierte-multi-persona-content-generierung-mit-azure-openai-und-sse-streaming\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rhein-ruhr-informatik.de\/"},{"@type":"ListItem","position":2,"name":"Strukturierte Multi-Persona-Content-Generierung mit Azure OpenAI und SSE-Streaming"}]},{"@type":"WebSite","@id":"https:\/\/rhein-ruhr-informatik.de\/#website","url":"https:\/\/rhein-ruhr-informatik.de\/","name":"Rhein-Ruhr-Informatik","description":"","publisher":{"@id":"https:\/\/rhein-ruhr-informatik.de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rhein-ruhr-informatik.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rhein-ruhr-informatik.de\/#organization","name":"Rhein-Ruhr-Informatik","url":"https:\/\/rhein-ruhr-informatik.de\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/logo\/image\/","url":"https:\/\/rhein-ruhr-informatik.de\/wp-content\/uploads\/2024\/02\/logo-2.png","contentUrl":"https:\/\/rhein-ruhr-informatik.de\/wp-content\/uploads\/2024\/02\/logo-2.png","width":570,"height":570,"caption":"Rhein-Ruhr-Informatik"},"image":{"@id":"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/rhein-ruhr-informatik.de\/#\/schema\/person\/29f8c93b2080ee25df204d589a7f2477","name":"Rhein-Ruhr-Informatik","sameAs":["https:\/\/rhein-ruhr-informatik.de"]}]}},"_links":{"self":[{"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/posts\/907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/comments?post=907"}],"version-history":[{"count":1,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/posts\/907\/revisions"}],"predecessor-version":[{"id":908,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/posts\/907\/revisions\/908"}],"wp:attachment":[{"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/media?parent=907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/categories?post=907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rhein-ruhr-informatik.de\/en\/wp-json\/wp\/v2\/tags?post=907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}