Skip to main content

Overview

The AskFredMessage type represents a single question-answer exchange within an AskFred conversation thread. Each message contains the user’s query, the AI-generated response, and optional follow-up suggestions.

Fields

id
String!
required
Unique identifier for the message
thread_id
String!
required
ID of the parent thread this message belongs to
query
String!
required
The question or query submitted by the user
answer
String!
required
The AI-generated response to the query, formatted according to the specified format_mode
suggested_queries
[String!]
Array of suggested follow-up questions based on the context of the conversation
status
AskFredMessageStatus!
required
Current status of the message processing. See AskFredMessageStatus below.
created_at
String!
required
ISO 8601 timestamp when the message was created
updated_at
String
ISO 8601 timestamp when the message was last updated

AskFredMessageStatus

An enum representing the processing status of a message:
processing
enum value
The query is currently being processed
completed
enum value
The query has been successfully processed and answered
failed
enum value
The query processing failed

Example

{
  "id": "msg_001",
  "thread_id": "thread_abc123",
  "query": "What were the main action items from the meeting?",
  "answer": "Based on the meeting transcript, here are the main action items:\n\n1. **Marketing Team** - Prepare Q4 campaign strategy by March 25th\n2. **Product Team** - Finalize feature roadmap by March 20th\n3. **Engineering** - Complete API v2 architecture review by March 18th",
  "suggested_queries": [
    "Who is responsible for the Q4 campaign strategy?",
    "What features are planned for the roadmap?",
    "What are the API v2 requirements?"
  ],
  "status": "completed",
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T10:30:15Z"
}

Format Modes

The answer field can be formatted in different ways based on the format_mode parameter used when creating or continuing a thread:

Markdown Format

Rich text with headers, lists, bold/italic text, and other markdown features for enhanced readability.

Plaintext Format

Concise text without any formatting, suitable for systems that don’t support markdown.