Skip to content

API Reference parrot.bots.dynamic_values

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.bots.dynamic_values

View source

Dynamic Value Provider Registry.

This module provides a registry for dynamic values that can be injected into system prompts during runtime. It allows for registered functions to be called and their return values used for template substitution in prompts.

Class DynamicValueProvider

Registry for dynamic value functions

Method DynamicValueProvider.register

Decorator to register a dynamic value provider

register(name: str)

Parameter Type Default Description
name str

Method DynamicValueProvider.get_value

Get a dynamic value, passing runtime context

get_value(name: str, context: Dict[str, Any] = None) -> Any

Parameter Type Default Description
name str
context Dict[str, Any] None

Returns: Any

Method DynamicValueProvider.get_all_names

Return list of all registered value names

get_all_names()

Attribute dynamic_values

Function get_current_date

get_current_date(_=None)

Parameter Type Default Description
_ None

Function get_local_time

get_local_time(_=None)

Parameter Type Default Description
_ None

Function get_user_name

This one needs context to determine the user

get_user_name(context)

Parameter Type Default Description
context

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally