Skip to content

swiss-ai/apertus-format

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apertus Format

A Python library for working with the Apertus chat format - a custom conversational format designed for agentic AI models.

Features

  • Multi-layered assistant messages with thinking, tool calls, and responses.
  • Native tool integration with parallel calls.

Documentation

Quick Start

from apertus_format import Message, Conversation, ApertusFormatter

# Create a conversation
messages = [
    Message.system("You are a helpful assistant."),
    Message.user("What is 2 + 2?"),
    Message.assistant("The answer is 4.")
]

conversation = Conversation(messages)

# Format for model consumption
formatter = ApertusFormatter(enable_thinking=True)
formatted = formatter.format_conversation(conversation)
print(formatted)

About

Response format to be used with apertus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published