msticpy.aiagents.config_utils module
Utility Modules related to AI agents used in MSTICpy.
- msticpy.aiagents.config_utils.get_autogen_config_from_msticpyconfig() Dict[str, str | float | List[Dict[str, str | Callable]]]
Get Autogen configuration from msticpyconfig.yaml.
See https://microsoft.github.io/autogen/docs/topics/llm_configuration for more information on the structure of the LLM configuration object.
Please note that a configuration list is required, rather than a single configuration.
- Returns:
Autogen configuration.
- Return type:
Config
- Raises:
MsticpyUserConfigError – Autogen settings not found in msticpyconfig.yaml configuration
MsticpyUserConfigError – Autogen.config_list setting not found in msticpyconfig.yaml configuration
- msticpy.aiagents.config_utils.inject_environment_variable(config: Dict[str, str | Callable]) Dict[str, str | Callable]
Replace autogen configuration api_key with the value of an environment variable.
- Parameters:
config (ConfigItem) – Autogen LLM configuration.
- Returns:
Autogen LLM configuration with the environment variable value.
- Return type:
ConfigItem
- msticpy.aiagents.config_utils.inject_token_provider_callable(config: Dict[str, str | Callable]) Dict[str, str | Callable]
Replace autogen configuration azure_ad_token_provider with a token provider callable.
- Parameters:
config (ConfigItem) – Autogen LLM configuration.
- Returns:
Autogen LLM configuration with the token provider callable.
- Return type:
ConfigItem