Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
llumpy docs
llumpy docs
  • Installation
  • Basic Usage
    • Provider Clients
    • Prompting
  • Async Usage
    • Provider Clients
    • Prompting
  • Advance Usage
    • Conversation
    • Vendor Responses
    • Custom Retry Handlers
    • Custom Clients
  • API Reference
    • llumpy.providers.AnthropicClient
    • llumpy.providers.AsyncAnthropicClient
    • llumpy.providers.OpenAIClient
    • llumpy.providers.AsyncOpenAIClient
    • llumpy.providers.OllamaClient
    • llumpy.providers.AsyncOllamaClient
    • llumpy.providers.InvalidOllamaServerError
    • llumpy.core.ConversationBuilder
    • llumpy.core.Conversation
    • llumpy.core.Message
    • llumpy.core.Role
    • llumpy.core.ModelClient
    • llumpy.core.AsyncModelClient
    • llumpy.core.load_api_key
    • llumpy.core.InvalidAPIKeyError
    • llumpy.core.ModelNotFoundError
    • llumpy.retry.RetryHandler
    • llumpy.retry.AsyncRetryHandler
    • llumpy.retry.JSONRetryHandler
    • llumpy.retry.AsyncJSONRetryHandler
    • llumpy.retry.ExceededRetriesError
Back to top
View this page

llumpy.core.Message¶

class Message(role, content)[source]¶

Bases: object

DTO for LLM messages

Parameters:
  • role (Role)

  • content (str)

__init__(role, content)¶
Parameters:
  • role (Role)

  • content (str)

Return type:

None

Methods

__init__(role, content)

to_dict()

Attributes

role

content

content: str¶
role: Role¶
to_dict()[source]¶
Returns:

DTO as dict

Return type:

Dict

Next
llumpy.core.Role
Previous
llumpy.core.Conversation
Copyright © 2026, Derek Garcia
Made with Sphinx and @pradyunsg's Furo
On this page
  • llumpy.core.Message
    • Message
      • Message.__init__()
      • Message.content
      • Message.role
      • Message.to_dict()