Techalicious Academy / 2026-03-19-chatbot

Visit our meetup for more great tutorials

OPENWEBUI FORMAT

OpenWebUI gives you a browser-based UI with conversation history, parameter controls, and character models without touching the command line. It's faster to test, easier to iterate, and perfect for non-technical users.

WHY OPENWEBUI MODELS

Ollama is CLI-based. OpenWebUI is browser-based. Both connect to Magidonia, but:

Ollama:     + Portable as a .modelfile
            + Can be shared/versioned
            - No GUI, command-line only
            - No conversation history saved by default

OpenWebUI:  + Browser-based GUI
            + Conversation history auto-saves
            + Parameter controls in UI
            + Prompt suggestions (quick buttons)
            - Models saved locally in OpenWebUI only
            - Not as portable

Use OpenWebUI for interactive development and testing. Use Ollama for production/sharing.

KEY DIFFERENCES FROM SILLYAVERN/CHUB

If you've used SillyTavern or Chub.ai, OpenWebUI is simpler but less powerful:

MISSING in OpenWebUI:
- No Lorebooks (character-specific knowledge bases)
- No Author's Notes (global context injections)
- No Regex post-processing
- No Group Chat
- No Complex conditional logic

PRESENT in OpenWebUI:
- Conversation history
- Parameter controls
- Simple character prompts
- Prompt suggestions
- Multiple model support

DYNAMIC VARIABLES

OpenWebUI supports these placeholders:

{{ USER_NAME }}      = User's name (you can set this)
{{ CURRENT_DATE }}   = Today's date
{{ CURRENT_TIME }}   = Current time
{{ MODEL_NAME }}     = The model being used

Example system prompt:

You are Luna, a warm musician. Today is {{ CURRENT_DATE }}.
You're talking to {{ USER_NAME }}.

THE XML STRUCTURE

OpenWebUI uses XML tags for organization. Here's the full template:

<SYSTEM_PROMPT>
Character description and instructions go here.
</SYSTEM_PROMPT>

<CHARACTER>
[Name: Luna]
[Personality: warm, curious, patient, witty, occasionally sarcastic]
[Speech: casual, uses contractions, natural *actions*, no emoji]
</CHARACTER>

<DESCRIPTION>
Luna is a late-20s musician. Warm but not a doormat. Asks one follow-up per message.
Shows genuine interest without being pushy.
</DESCRIPTION>

<SCENARIO>
It's Thursday evening. Luna is relaxed on her couch when you message her.
She glances up and responds naturally.
</SCENARIO>

<EXAMPLE_DIALOGUE>
User: I had a rough day.
Luna: *sits down next to you* That bad? Want to talk about it, or just vent?

User: My boss was impossible.
Luna: *listens* Temporary frustration or building resentment?

User: Building, I think.
Luna: Then we need to talk about what leaving looks like. What would that feel like?
</EXAMPLE_DIALOGUE>

<OPENING>
Luna: Hey. What's up?
</OPENING>

Wait—that's a lot of tags. Let me simplify. OpenWebUI doesn't REQUIRE all of these. Here's what actually matters:

MINIMAL OPENWEBUI PROMPT

You can get away with just:

Luna is a late-20s musician, warm and curious. She asks one follow-up per message.
Speech: casual, uses contractions, witty, occasionally sarcastic.

It's Thursday evening. Luna's on the couch when you message.

Example dialogue:
User: I had a rough day.
Luna: *sits down* That bad? Want to talk about it?

User: My boss was impossible.
Luna: *listens* Temporary frustration or has it been building?

User: Building.
Luna: Then we need to talk about what leaving looks like.

[OPENING:] Luna: Hey. What's up?

Literally that's it. Paste it into OpenWebUI, set the base model to Magidonia, configure stop sequences, and you're done.

THE [OPENING:] TAG

The [OPENING:] tag tells OpenWebUI: this is the model's first message. When you start a new conversation, the model will greet with this pattern.

[OPENING:] Luna: Hey! Long time no talk. What's been going on?

This is important because it sets the tone template for the entire conversation.

PROMPT SUGGESTIONS

OpenWebUI lets you add clickable conversation starters. In the advanced settings:

Suggestion 1: "I'm dealing with some relationship stuff"
Suggestion 2: "I've been thinking about quitting my job"
Suggestion 3: "What's your take on AI?"
Suggestion 4: "Tell me something surprising"

Users see these as buttons. Makes the interface feel more guided.

COMPLETE OPENWEBUI TEMPLATE

Here's the full, annotated template:

---BEGIN OPENWEBUI PROMPT---

[Name: Luna] [Personality: warm, curious, patient, witty, occasionally sarcastic] [Speech: casual, uses contractions, natural *actions*, no emoji]

Luna is a late-20s musician. She feels things deeply. Asks one follow-up per message. Shows genuine interest without being pushy. Never gives unsolicited advice.

It's Thursday evening. Luna is relaxed on her couch when you message her. She glances up and responds naturally.

EXAMPLE DIALOGUES:

Example 1: User: I had a rough day. Luna: *sits down next to you* That bad? Want to talk about it, or just vent?

Example 2: User: My boss was impossible today. Luna: *listens* Is this temporary frustration, or has it been building?

Example 3: User: Building, I think. Luna: *nods* That's the harder one. It's easy to talk yourself out of panic. But harder

to ignore what you already knew. What would leaving look like?

[OPENING:] Luna: Hey. What's up?

---END OPENWEBUI PROMPT---

Copy all of that (minus the BEGIN/END markers) into the OpenWebUI system prompt field.

SETTING UP IN OPENWEBUI: STEP-BY-STEP

1. Open OpenWebUI in your browser (usually localhost:8080)

2. Go to Workspace > Models > Create New Model

3. Fill in:

4. Copy your full prompt (from above) into the "System Prompt" field

5. Scroll to Advanced Parameters:

Temperature:      1.0
Top K:            40
Top P:            0.95
Min P:            0.02
Repeat Penalty:   1.0

6. In Stop Sequences, add:

User:
\nUser:

(These are separate entries, one per line)

7. Optional: Add Prompt Suggestions

Click the + button and add:
- "I had a rough day"
- "What's your philosophy on life?"
- "Tell me something funny"
- "I'm thinking about making a change"

8. Click "Save"

The model is now available in your OpenWebUI chat.

STOP SEQUENCES IN OPENWEBUI

Stop sequences work the same as in Ollama. The model stops generating when it hits one.

Minimum set:

User:
\nUser:

Add more if needed. If you want the character to stop before generating its own name:

User:
\nUser:
Luna:
\nLuna:

Each entry is on its own line in the Stop Sequences field.

PREVENTING CHARACTER BREAKS

The biggest challenge: the model generating "[As an AI, I should clarify...]" or breaking character mid-conversation.

This happens when:

  1. The system prompt has too many rules (use positive framing, Section 08)
  2. The examples aren't consistent
  3. Stop sequences are missing
  4. Temperature is too high

Fix:

  1. Rewrite system prompt with positive framing only
  2. Make sure all example dialogues are consistent in tone
  3. Double-check stop sequences
  4. Lower temperature from 0.95 to 0.8

If the model STILL breaks character on a specific topic (e.g., always breaks when asked about being AI), you have options:

Option A: Rephrase the opening example to show how the character handles that topic
Option B: Add a targeted negative instruction (last resort)
          "If asked about being an AI, respond as Luna would: with humor or deflection"
Option C: Accept that this is a limitation of the model on this topic

Most of the time, fixing the examples solves it.

CONVERSATION HISTORY

OpenWebUI auto-saves conversations. Each conversation appears in the sidebar.

The history is LOCAL to your browser/OpenWebUI installation. If you want to export:

  1. Click the conversation
  2. Click the three-dot menu
  3. "Export as JSON" or "Export as Markdown"

This is useful for testing and debugging. You can review conversations and tweak your character card based on what worked and what didn't.

QUICK TEST WORKFLOW

1. Create character in OpenWebUI 2. Click "Chat" and start a new conversation 3. Test with:

4. Review the conversation in history 5. If something breaks:

6. Iterate until you're happy

Much faster than Ollama CLI for this workflow.

EXPORTING TO OLLAMA

If you build a character in OpenWebUI that you love, you can convert it to an Ollama Modelfile:

1. Copy your OpenWebUI system prompt 2. Create an Ollama Modelfile (Section 09) with the same prompt 3. Run: ollama create [name] -f [modelfile]

Now you have both: a browser version (OpenWebUI) and a portable version (Ollama).

KNOWN LIMITATIONS

1. NO LOREBOOKS: You can't add separate knowledge bases for context. Everything must be

in the main system prompt.

2. NO POST-PROCESSING: You can't use regex to clean up output.

3. NO CONDITIONAL LOGIC: You can't say "if user mentions X, inject Y."

4. NO GROUP CHAT: Only 1:1 conversations with the character.

5. NO AUTHOR'S NOTES: No secondary context that gets injected globally.

If you need these, SillyTavern is the tool. But for simple character chat, OpenWebUI is excellent.

TROUBLESHOOTING

Q: The model is too verbose. Every response is a paragraph. A: Lower temperature (0.8 or 0.7) and check if the opening example is too long.

Q: The model keeps breaking character. A: Check positive framing in system prompt. Rewrite any NEVER/DON'T statements.

Q: Responses feel generic, like an AI assistant. A: Your examples are too generic. Make them specific and quirky. Show personality.

Q: The model ignores stop sequences and keeps generating. A: Make sure "User:" and "\nUser:" are EXACTLY as shown in the Stop Sequences field.

Q: I want to modify an existing model. A: Click the model name in Workspace > Models, make changes, click Save.

QUICK REFERENCE

Creating a character in OpenWebUI:

  1. Workspace > Models > Create
  2. Name, Base Model (Magidonia), System Prompt (full prompt from above)
  3. Advanced Parameters: temp 0.95, top_k 40, top_p 0.95, min_p 0.05, repeat 1.05
  4. Stop Sequences: "User:" and "\nUser:"
  5. Prompt Suggestions: Optional conversation starters
  6. Save

System prompt includes:

Testing:

Dynamic variables available:

{{ USER_NAME }}, {{ CURRENT_DATE }}, {{ CURRENT_TIME }}, {{ MODEL_NAME }}

NEXT STEPS

You now have two ways to run your character:

  1. Ollama: CLI-based, portable, shareable
  2. OpenWebUI: Browser-based, interactive, great for development

For a meetup or shared session, start with OpenWebUI. It's visual and no one has to remember command-line syntax.

For personal use or sharing a character with someone else, create an Ollama Modelfile so they can just run it directly.

The character card is the same foundation for both. You're just changing the format.

That's it. You're ready to build. Start with Magidonia, design a character, test in OpenWebUI, refine based on what works, and share what you build.

Happy chatting.