Commit Graph
1 Commits
Author SHA1 Message Date
Evan Mattson 240280a37b Python: Introduce the single, non-group chat completion agent (#7116)
### Motivation and Context

Following in the steps of dotnet, we're beginning to add agent support
to Python. For an initial implementation the focus is on non-grouped,
chat completion agents. The first pass is covering a ChatCompletionAgent
that allows the user to define a ChatCompletion Service as part of the
SK Kernel, and then reference that service in an agent implementation.

<!-- 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:
- Adds support for a standard chat completion agent
- Adds the required abstractions to allow the single chat completion
agent to work
- Introduces a new agent concept sample showing how to invoke the agent
for a streaming and non-streaming context.
- Adds unit tests to cover the new code
- Closes #7079 


![image](https://github.com/microsoft/semantic-kernel/assets/35585003/8fa1f248-52b2-41b9-85ac-38ac80a05a68)

<!-- 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-07-11 19:57:28 +00:00