Skip to content

v0.3.18

Compare
Choose a tag to compare
@sarahwooders sarahwooders released this 27 Jun 03:54
· 358 commits to main since this release
8880792

This release introduces tool creation from inside Python scripts, returning usage statistics, and many bug fixes.

🔧 Tool creation in the Python Client

We added support for directly creating tools in Python:

def print_tool(message: str):
    """ 
    Args: 
        message (str): The message to print.
        
    Returns:
        str: The message that was printed.
        
    """
    print(message)
    return message

tool = client.create_tool(print_tool, tags=["extras"])
agent_state = client.create_agent(tools=[tool.name]))

📊 Usage Statistics

Sending a message to an agent now also returns usage statistics for computing cost metrics:

class MemGPTUsageStatistics(BaseModel):
    completion_tokens: int
    prompt_tokens: int
    total_tokens: int
    step_count: int

What's Changed

New Contributors

Full Changelog: 0.3.17...0.3.18