Skip to content

Support structured messages with roles in generate() #45

Description

@Alistorm

Hi Celeste team,
I’ve been experimenting with the generate() function and noticed that currently it only accepts a plain string as input:

response = await client.generate("Explain quantum computing")

While this works, it limits the ability to specify roles (system, user, assistant) or to include multi-turn context. Many LLMs support structured messages for more precise control over behavior, such as:

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Explain quantum computing."}
]

It would be great if generate() could accept a list of such message objects, similar to OpenAI’s Chat API, enabling richer and more controlled interactions.
This would make Celeste more flexible for chat-based applications and multi-turn prompting scenarios.
Thank you for considering this enhancement!

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions