Direct Chat Guide

Direct Chat is LangMart's standard chat interface for straightforward conversations with AI models. It provides a fast, responsive experience without the overhead of tool execution.

Getting Started

Starting a Conversation

  1. Navigate to the Chat page from the sidebar
  2. Select a model from the model selector dropdown
  3. Type your message in the input box
  4. Press Enter or click Send

The AI will respond with streaming text, appearing word by word as it's generated.

Using the Global Chat Overlay

Access chat from anywhere in the platform:

  1. Look for the floating chat button in the bottom-right corner
  2. Click to open the chat overlay
  3. The overlay remembers your last conversation
  4. Resize by dragging the top edge
  5. Expand to full height with the expand button

Model Selection

Choosing a Model

Click the Model Selector button in the toolbar to open the model picker:

Quick Selection:

  • Recently used models appear at the top
  • Favorites are marked with a star
  • Search by name or provider

Model Information Display:

  • Model name and provider
  • Pricing (input/output per million tokens)
  • Context window size
  • Capability badges (vision, reasoning, tools, etc.)

Model Picker Tabs

The model picker organizes models into tabs:

Tab Description
All Models Browse all available models
Favorites Your starred models
Collections Custom model groups

Filtering Models

Use the filter options to narrow down choices:

  • Search - Type to filter by name or provider
  • Capabilities - Filter by vision, reasoning, tool use, etc.
  • Billing - Show org-paid or self-paid models
  • Provider - Filter by specific provider tabs

Streaming Responses

How Streaming Works

Direct Chat uses server-sent events (SSE) for real-time responses:

  1. Your message is sent to the selected model
  2. The response streams back token by token
  3. Text appears progressively in the chat
  4. A typing indicator shows while generating

Stopping a Response

If a response is taking too long or going in the wrong direction:

  1. Click the Stop button that appears during generation
  2. The response stops at its current point
  3. You can continue the conversation or start fresh

Chat History

Automatic Session Saving

Every conversation is automatically saved:

  • Sessions are created when you send your first message
  • Messages are persisted as they're received
  • Sessions include model information and timestamps

Viewing History

Open the History panel on the left:

  1. Click the clock icon or History toggle
  2. Browse your past sessions
  3. Sessions show:
    • Auto-generated name (from first message)
    • Date and message count
    • Model used
    • Session status

Resuming a Session

Click any session in the history to resume it:

  1. The conversation loads in the main chat area
  2. Continue from where you left off
  3. Switch models mid-conversation if needed

Session Names

Sessions are automatically named based on content, but you can customize:

  1. Double-click the session name in the history list
  2. Type a new name
  3. Press Enter to save or Escape to cancel

Settings and Preferences

Chat Preferences

Your preferences are remembered across sessions:

Preference Description
Last Used Model Automatically selected on next visit
History Panel Open/closed state remembered
Panel Width Resized dimensions preserved
Show Logs Request logs panel visibility

Model Preferences

When selecting models, your preferences help:

  • Favorites - Quick access to preferred models
  • Collections - Group models for different tasks
  • Recent - Recently used models shown first

Adjusting the Interface

History Panel:

  • Drag the right edge to resize
  • Double-click the edge to cycle preset sizes
  • Click the collapse button to minimize

Chat Overlay:

  • Drag the top edge to resize height
  • Click expand for full-height mode
  • Click minimize to collapse to icon

Context and System Prompts

Page Context

When using chat from specific pages, context is automatically included:

  • Context appears as a badge in the chat header
  • The AI understands the relevant page content
  • Useful for asking questions about current data

Custom System Prompts

For advanced users, customize the AI's behavior:

  1. Click the system prompt icon in the toolbar
  2. View or edit the current system prompt
  3. Save to apply to the current session

Tip: System prompts affect the entire conversation. Use them to set tone, format preferences, or specific instructions.

Request Logs

Viewing Request Details

Enable the Logs panel to see API details:

  1. Click the logs toggle in the toolbar
  2. Each message shows request information:
    • Model used
    • Token counts
    • Cost estimate
    • Response time

Understanding Costs

The logs panel helps track usage:

  • Input tokens - Your messages and context
  • Output tokens - AI responses
  • Total cost - Calculated from model pricing

Tips for Better Conversations

Writing Effective Prompts

  1. Be specific - Clear questions get better answers
  2. Provide context - Include relevant background
  3. Set expectations - Specify format or length if needed
  4. Iterate - Refine based on responses

Model Selection Tips

Use Case Recommended Model Type
Quick questions Fast, smaller models
Complex analysis Reasoning-capable models
Image understanding Vision-enabled models
Long documents Large context window models
Cost-sensitive Lower-priced models

Managing Long Conversations

  • Context windows have limits
  • Very long conversations may lose early context
  • Start fresh sessions for new topics
  • Use collections to organize by project

Troubleshooting

Common Issues

Model not responding:

  • Check your connection status
  • Verify model availability
  • Try a different model

Slow responses:

  • Large models take longer
  • Check your network connection
  • Consider a faster model for quick tasks

Conversation not saving:

  • Ensure you're logged in
  • Check browser storage settings
  • Refresh and try again

Error Messages

Error Solution
Rate limit exceeded Wait a moment and retry
Model unavailable Select a different model
Context too long Start a new session
Authentication error Re-login to refresh session

Next Steps