Message

A Message is the basic unit of communication in LangDB workflows. Messages define the interaction between the user, the system, and the model. Every workflow is built around exchanging and processing messages.

Core Features:

  • Structured Interactions: Messages define roles (user, system, assistant) to organize interactions clearly.

  • Multi-Role Flexibility: Different roles (e.g., system for instructions, user for queries) enable complex workflows.

  • Dynamic Responses: Messages form the backbone of LangDB’s chat-based interactions.

Example:

A simple interaction to generate a poem might look like this:

[
  { "role": "system", "content": "You are a helful assistant" },
  { "role": "user", "content": "Write me a poem about celluloids." }
]

Last updated

Was this helpful?