Files
semantic-kernel/python/semantic_kernel/processes/process_message.py
T
Evan Mattson 29e3e83c2d Python: Add the Dapr Runtime for Processes (#9642)
### Motivation and Context

In addition to the Python local process runtime, we're adding the
ability to congfigure the Dapr runtime for Python SK processes.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

The PR introduces:
- The ability to configure the Dapr Runtime for Python processes
- Adds a sample FastAPI app showing how to configure the Dapr runtime
with a sample SK Python process (see the README for details on setup)
- Adds some unit test coverage for the Dapr runtime
- Closes #9355 

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
2024-11-15 14:43:15 +00:00

18 lines
407 B
Python

# Copyright (c) Microsoft. All rights reserved.
from typing import Any
from semantic_kernel.kernel_pydantic import KernelBaseModel
class ProcessMessage(KernelBaseModel):
"""Represents a message used in a process runtime."""
source_id: str
destination_id: str
function_name: str
values: dict[str, Any]
target_event_id: str | None = None
target_event_data: Any | None = None