Commit Graph
2 Commits
Author SHA1 Message Date
Tao ChenandEvan Mattson 15ca7a7192 Python: Agent get_response API (#10701)
### Motivation and Context

<!-- 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.
-->
With the recent push for improving developer's quality of life, we have
decided to make it easier for developers to get started with agents by
introducing a new `get_response` API, that hides the complexity of
interacting with agents when developers are ramping up with the Agent
concept.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
1. Add the `get_response` API on all agent types. This API skips hides
the intermediate steps of the agent execution and only returns the final
results as a single message.
2. Add tests and samples.
3. Updates the `Agent` class to be an `ABC`, and adds `get_response`,
`invoke`, and `invoke_stream` methods as overridable.

### 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 😄

---------

Co-authored-by: Evan Mattson <[email protected]>
2025-02-27 20:22:05 +09:00
Evan Mattson 684309d5cb Python: Add a samples README and a demos README. (#8543)
### Motivation and Context

The Python samples folder is a lacking an overall README file covering
what each samples folder does.

<!-- 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

Adds a samples README as well as a demos folder README.

<!-- 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-09-05 16:45:46 +00:00