Commit Graph
2816 Commits
Author SHA1 Message Date
GitHub 98c034114f [maven-release-plugin] prepare for next development iteration 2024-05-22 22:40:34 +01:00
GitHub 4df2fb27cd [maven-release-plugin] prepare release java-1.1.4 2024-05-22 22:40:33 +01:00
John Oliver 8b55f2b702 Java: Add example of a multi turnaround chat with tool calls. Fixes bug with serializing tool call arguments (#6372)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-22 21:36:34 +00:00
GitHub 72f05104ed [maven-release-plugin] prepare for next development iteration 2024-05-20 19:49:54 +01:00
GitHub f2152e1846 [maven-release-plugin] prepare release java-1.1.3 2024-05-20 19:49:54 +01:00
John Oliver bb5103aafd Java: Fix #6325 and #6273 (#6330)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-20 18:02:51 +00:00
GitHub 85f4d15bd5 [maven-release-plugin] prepare for next development iteration 2024-05-17 16:44:17 +01:00
GitHub 8b12fee509 [maven-release-plugin] prepare release java-1.1.2 2024-05-17 16:44:16 +01:00
John Oliver 702aa82163 Java: Upgrade azure-identity to 1.12.1 (#6314)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-17 15:40:23 +00:00
GitHub 6352aba4fe [maven-release-plugin] prepare for next development iteration 2024-05-17 16:01:36 +01:00
GitHub 546b8b3972 [maven-release-plugin] prepare release java-1.1.1 2024-05-17 16:01:36 +01:00
John Oliver 555a1799e8 Java: Upgrade azure-ai-openai to 1.0.0-beta.8 (#6312)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-17 14:58:13 +00:00
GitHub a207f9a67b [maven-release-plugin] prepare for next development iteration 2024-05-17 14:22:31 +01:00
GitHub 68a11cbf8e [maven-release-plugin] prepare release java-1.1.0 2024-05-17 14:22:30 +01:00
John Oliver 1f1fc97cf0 Java: Apply a number of fixes from API review (#6252)
- Remove default chat history message, fixes #6222
- Allow setting deploymentName, fixes #6229
- Fix some samples
2024-05-16 19:48:32 +00:00
Milder Hernandez 9ffa87efc1 Java: Add customer information to reservations (#6296)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-16 16:08:50 +00:00
Milder Hernandez c5c85c462f Java: Add chat resources for learn docs (#6243)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-14 11:04:28 +00:00
John Oliver d92ad4f33e Java: Java Reorg demos (#6004)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-13 21:05:40 +00:00
John Oliver 828998da65 Java: Skip spotless on Java 8 (#6219)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-13 16:14:47 +00:00
John Oliver a57eb89254 Java: Sync main and java-v1 into java-development (#6102)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-02 17:19:39 +01:00
John Oliver 7689013de3 Fix typos 2024-05-02 16:51:12 +01:00
John Oliver 40706571fd Revert bad link 2024-05-02 16:39:13 +01:00
John Oliver 0f5c851277 Merge branch 'java-v1' into java-development 2024-05-02 16:31:46 +01:00
John Oliver 42ea30fc88 Merge remote-tracking branch 'upstream/main' into java-development 2024-05-02 16:26:32 +01:00
Mark Wallace c1d5fd4991 .Net: Split safe prompt into multiple unit tests (#6096)
### Motivation and Context

Closes #5881 

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-05-02 13:57:49 +00:00
89686e3729 Python: Update 04-kernel-arguments-chat.ipynb (#5910)
InputVariable name should be changed from "input" to "user_input". But
in my test, Both works well.

chat_history.add_user_message(input_text) command should be after
kernel.invoke() function. Otherwise chat_history will include the
current new input_text in the prompt. It is not necessary.

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

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Eduard van Valkenburg <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2024-05-02 13:45:09 +00:00
7b194980b5 Python: Update import paths for OpenAI settings functions (#6059)
This commit corrects the import paths for openai_settings_from_dot_env
and azure_openai_settings_from_dot_env functions (and some more).
Previously, these functions were incorrectly accessed directly from the
semantic_kernel module. The updated paths point correctly to
semantic_kernel.utils.settings, aligning with the package structure.
This change ensures better code maintainability and error-free imports.

### Motivation and Context

Thank you for your contribution to the semantic-kernel repo! Please help
reviewers and future users, providing the following information:

**Why is this change required?**
The change is required to correct incorrect import paths for
configuration loading functions which were previously leading to
AttributeError. This improvement ensures that the module imports
function correctly and aligns with the expected package structure.
**What problem does it solve?**
This change solves the problem of AttributeError being thrown when
attempting to access openai_settings_from_dot_env and
azure_openai_settings_from_dot_env. These functions were incorrectly
imported, causing module resolution errors in the user's environment.
**What scenario does it contribute to?**
This contributes to scenarios where developers need to integrate the
semantic-kernel package seamlessly with their projects without
encountering import errors. It facilitates easier setup and usage of the
semantic-kernel functionalities, particularly in settings involving
environmental configurations for AI services.

### Description

This update corrects the import paths for
**openai_settings_from_dot_env** and
**azure_openai_settings_from_dot_env** by specifying their correct
locations within the **semantic_kernel.utils.settings** module.
Previously, attempts to import these functions directly from the
**semantic_kernel** root module led to errors. The corrected paths
ensure these essential configuration functions are accessible,
supporting error-free configuration loading for OpenAI and Azure AI
services integration.

### Contribution Checklist



- [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: Konstantin Kohl <[email protected]>
Co-authored-by: Evan Mattson <[email protected]>
2024-05-02 13:35:16 +00:00
Evan Mattson deb813bdca Python: Remove references to text-davinci-003 text models as it causes tests to hang. (#6089)
### Motivation and Context

Python PR merges were failing due to integration tests. Local
integration tests were hanging on running Azure text completions. It
appears text-davinci-003 was deprecated, and needed to be replaced by
gpt-35-turbo-instruct.

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

Remove references to text-davinci-003 text models as it causes tests to
hang.to hang. Updated to gpt-35-turbo-instruct, which passes. Add EastUS
AOAI deployment name var.

<!-- 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-05-02 12:47:17 +00:00
Chris 1bcb9ce265 .Net - Agent Logging (#6075)
### 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.
-->

Introduce logging for _Agent Framework_

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

Basic diagnostics are critical.
Added a single logging sample in _Getting Started_. (Enabling logging
for all samples obscures the sample focus)

Logging Levels:

- Pre-Action ([verb]-ing): DEBUG
- Post-Action ([verb]-ed): INFORMATION (This often contains the result
of the action)
- Exception Thrown: ERROR (intuitive)
- Sensitive Data: TRACE (Tao was explicit on this / I think from working
with Toub)

Intent is that INFORMATION is for the messages we want enabled by
default for a deployed service (with agents). Whereas DEBUG/TRACE
messages are more opt-in detail for developers, as you've suggested.

### 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-05-02 03:08:13 +00:00
Chris ac6e03ba98 Java: Python: Docs: Fix broken link (#6092)
### 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.
-->
`https://openai.com/product` is failing `Check .md links` workflow.

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

Revise links.


https://github.com/microsoft/semantic-kernel/actions/workflows/markdown-link-check.yml

Whitespace edits peformed by VS Code

### 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-05-01 19:55:48 -07:00
Chris 75dccb3f83 .Net - Update Agent Readme (#6070)
### 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.
-->

Enhance `readme.md` associated with _Agent_ samples.

Also include _ agent sample in _Getting Started with Agents_.

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

- Updated readmes
- Clean-up pass on samples
- Added an OpenAI Assistant to _Getting Started_

### 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-05-01 20:34:45 +00:00
Kevin Pilch e51c34daa6 .Net: Fix spelling of 'Euclidean' (#6087) 2024-05-01 20:06:54 +00:00
Daniel Gonzalez 3a4cbdb829 .Net: Handle Default Values for KernelParameterMetadata Correctly (#6053)
### Motivation and Context

We've noticed in our local testing that when working with a
KernelFunction that has no default value that later when interacting
with the generated `KernelParameterMetadata` for that function the
`DefaultValue` property is not `null`. This leads to cases where if the
provided default value for a method is an empty string (which is valid),
we can't distinguish between a case where there is no default value
provided (which is not valid).

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

This PR updates the `KernelFunctionFromMethod` class to first check if
the DefaultValue retrieved from the System.Reflection.ParameterInfo is a
[DBNull](https://learn.microsoft.com/en-us/dotnet/api/system.dbnull?view=net-8.0).
If it is, DefaultValue is set to null, otherwise the original logic is
provided and adds a unit test performing assertions for various methods
in the test Plugin class.

<!-- 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
- [ ] I didn't break anyone 😄
2024-05-01 18:52:43 +00:00
Dmytro StrukandRoger Barreto 861cefa05a .Net: Azure AI Content Safety and Prompt Shields demo application (#6024)
### 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.
-->

This PR contains demo application using [Azure AI Content
Safety](https://learn.microsoft.com/en-us/azure/ai-services/content-safety/overview)
resource and [Prompt
Shields](https://learn.microsoft.com/en-us/azure/ai-services/content-safety/quickstart-jailbreak)
service.

For text moderation and attack detection logic, Semantic Kernel Prompt
Filters are used as a demonstration, how to write functionality that
verifies prompts before sending it to LLM in a dedicated place to avoid
mixing it with business logic in applications.

### 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: Roger Barreto <[email protected]>
2024-05-01 16:37:00 +00:00
Stephen Toub 8665df3d1d .Net: Tweak RegexTerminationStrategy (#6078)
1. RegEx should be cased as Regex
2. The type should support being passed Regex instances, not just string
patterns, so that the consumer can control the options, use the source
generator, etc.
3. Delete duplicate test file
2024-05-01 08:35:14 +00:00
Stephen Toub 184d9b8050 .Net: Add netstandard2.0 build of Microsoft.SemanticKernel.Connectors.Onnx (#6076) 2024-05-01 04:56:51 +00:00
Roger BarretoandStephen Toub 9afa08d732 .Net BugFix Issue 6058 Changing Dictionary in Enumeration (#6067)
### Motivation and Context

Resolve #6058

---------

Co-authored-by: Stephen Toub <[email protected]>
2024-05-01 01:55:14 +00:00
Chris c27fa87f3a .Net - Agent DI Sample (#6055)
### 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.
-->

Demonstrate dependency-injection with agents.

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

Similiar to:
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/DependencyInjection/Kernel_Injecting.cs

### 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-04-30 19:56:10 +00:00
Chris eb915c153b .Net - Agent Aggregator / Complex Chat (#6029)
### 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.
-->

Introduce agent grouping/aggregator support via `AggregatorAgent` to
enable complex chat-patterns (not always flat).

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

> Tested on GPT-3.5-Turbo.

`Aggregator` allows a group of agents to participate in their own
sub-chat:

## OUTER / USER CHAT
```
# user: 'Can you provide three original birthday gift ideas.  I don't want a gift that someone else will also pick.'

# assistant - Shopper: 'I'd be happy to help with that! Could you please tell me your relationship to the recipient and any specific interests they have to make the gift ideas as personalized as possible?'

# IS COMPLETE: False

# user: 'The gift is for my adult brother.'

# assistant - Shopper: 'Great, thank you for sharing that! Do you know if he has any particular interests or hobbies that could guide the gift selection?'

# IS COMPLETE: False

# user: 'He likes photography.'

# assistant - Shopper: 'Thank you for sharing that your brother enjoys photography! Here are three personalized birthday gift ideas tailored to his interest:

1. Vintage Camera Bookends
2. Photography-Themed Whiskey Decanter
3. Custom Camera Strap'

# IS COMPLETE: True
```

### INNER / AGGREGATED CHAT
```
# user - *: 'Can you provide three original birthday gift ideas.  I don't want a gift that someone else will also pick.'

# assistant - PersonalShopper: 'I'd be happy to help with that! Could you please tell me your relationship to the recipient and any specific interests they have to make the gift ideas as personalized as possible?'

# assistant - Spokesperson: 'I'd be happy to help with that! Could you please tell me your relationship to the recipient and any specific interests they have to make the gift ideas as personalized as possible?'

# user - *: 'The gift is for my adult brother.'

# assistant - PersonalShopper: 'Great, thank you for sharing that! Do you know if he has any particular interests or hobbies that could guide the gift selection?
'

# assistant - Spokesperson: 'Great, thank you for sharing that! Do you know if he has any particular interests or hobbies that could guide the gift selection?'

# user - *: 'He likes photography.'
# assistant - PersonalShopper: 'Thank you for that information! Here are three personalized birthday gift ideas for your brother who enjoys photography:

1. Vintage Camera Bookends
2. Photography-Themed Whiskey Decanter
3. Custom Camera Strap'
# assistant - ShopperReviewer: 'The response provides a prompt request for additional information to tailor gift suggestions accurately, which is appropriate for ensuring the gift ideas are well-suited to the recipient. However, once the user specifies the gift recipient's interests, the response jumps straight into listing the gift ideas without acknowledging the new information provided about the recipient's interest in photography. This could make the suggested gifts seem less thoughtfully connected to the recipient's hobby.

To improve the response, it could:
- Acknowledge the provided information about the brother's interest in photography before listing the gift suggestions. This would make the response feel more personalized and considerate.
- Explain why each recommended gift particularly fits a photography enthusiast, enhancing the relevance and thoughtfulness of the suggestions.'
# assistant - PersonalShopper: 'Thank you for sharing that your brother enjoys photography! Here are three personalized birthday gift ideas tailored to his interest:

1. Vintage Camera Bookends
2. Photography-Themed Whiskey Decanter
3. Custom Camera Strap'
# assistant - ShopperReviewer: 'The response effectively specifies that it is tailored to your requirements by acknowledging your brother's interest in photography. It then lists three unique gift ideas that align well with this interest, making the suggestions personalized and thoughtfully chosen. This approach directly correlates the gifts to the recipient's hobby, potentially ensuring the gifts feel unique and special. No further critical feedback is needed as the response adequately addresses your request for original gift ideas related to photography.'

# assistant - Spokesperson: 'Thank you for sharing that your brother enjoys photography! Here are three personalized birthday gift ideas tailored to his interest:

1. Vintage Camera Bookends
2. Photography-Themed Whiskey Decanter
3. Custom Camera Strap'
```

### 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-04-30 19:44:13 +00:00
Chris 2119695f23 .Net - Agents Fix: Capture Function-Calling Content (ChatCompletionAgent) (#6046)
### 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.
-->

Result from function-calling not being captured in agent-chat history
for ChatCompletionAgent.


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

Updated logic to:

1. Capture mutated chat-history, in addition to the iterated messages.
2. Suppress exposing function-content as `AgentChat` interaction (while
retaining in history).
3. "Tool" role transformed to "Assistant" for OpenAI Assistant API

### 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-04-30 17:21:06 +00:00
GitHub 8d158e5c43 [maven-release-plugin] prepare for next development iteration 2024-04-30 14:13:17 +01:00
GitHub c31fad1c8f [maven-release-plugin] prepare release java-1.0.2 2024-04-30 14:13:16 +01:00
John Oliver 7c03920b1f Java: Fix null warnings (#6060)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-04-30 14:09:13 +01:00
Roger Barreto f66a30bbd9 .Net Samples Restructure - Phase 4 (#6057)
### Motivation and Context

Make samples more console friendly.

This change allows the code to be copy and pasted in a Console App,
which virtually no code changes to the core code in sample
implementations.
2024-04-30 11:34:44 +00:00
Mark Wallace 312c96cd7d .Net: Baseline 1.10.0 (#6045)
### 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.
-->

### Description

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
2024-04-30 10:37:33 +00:00
Dmytro Struk 6223c7aebe .Net: Moved BookingRestaurant project to Demos folder in solution (#6056)
### 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.
-->

I noticed that `BookingRestaurant` project is located in `Demos` folder
in file system:

![image](https://github.com/microsoft/semantic-kernel/assets/13853051/9c3b6303-a442-402c-80b8-8e20bf9372bc)

But not in solution:

![image](https://github.com/microsoft/semantic-kernel/assets/13853051/11b71c00-fe69-49b6-ac6e-1c0c1cb6dd5c)

This PR moves `BookingRestaurant` project to `Demos` folder in solution:

![image](https://github.com/microsoft/semantic-kernel/assets/13853051/e079d1d9-63e5-4642-b396-fbabe7806261)

### 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-04-30 08:29:06 +00:00
Rob Clevenger ea25f6232d Python: Fix typo in line to instantiate Kernel. (#6020)
Kernel is already imported and there's no sk reference anymore since
it was removed last week in:

Python: fixing python readme
(https://github.com/microsoft/semantic-kernel/pull/5903)

### 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?
The change https://github.com/microsoft/semantic-kernel/pull/5903
imported Kernel directly so the code
no longer works as written

  2. What problem does it solve?
Code sample does not run
  3. What scenario does it contribute to?
sample code in README.md working
  4. If it fixes an open issue, please link to the issue here.
 None
-->

### Description

<!-- 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-04-30 07:59:34 +00:00
Roger Barreto 1e94588c06 .Net Samples Restructure - Phase 3 (#6043)
### Motivation and Context

Resolves #5949

- Fixed Bug in Visual Studio not running Tests using Test Explorer
- Update Readme.md + Added GettingStartedWithAgents ReadMe.
- Filtering Examples Split
- Added Namespaces for better organization of the Test Explorer View.

![image](https://github.com/microsoft/semantic-kernel/assets/19890735/2a81aafd-4de9-4143-ad53-7104ac22e5f3)
dotnet-1.10.0-nightly-240430.1
2024-04-29 21:00:38 +00:00
Chris 80aa777103 .Net: Agents - Getting Started Step4 Improvement: Cross Model (#6044)
### 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.
-->


[Step4_KernelFunctionStrategies](https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/GettingStartedWithAgents/Step4_KernelFunctionStrategies.cs)
was either:
1. Failing with null selection
2. Exceeding model token limit
3. Not performing the requested task

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

A couple things at play here:
1. The selection prompt was copied from AutoGen. While it worked on
`GPT-4`, it wasn't generating a reliable result for `GPT-3.5-Turbo`
2. The agent instructions were never tuned outsidre of `GPT-4`
3. No sensible default / fall-through (can't trust model 100%)
4. 4k token limit may be too low for history evaluation. Tested with
`gpt-35-turbo-16k`

> Note: When formal support for history manipulation comes on line, we
should be able to optimize around last(n) messages.

### 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-04-29 20:40:53 +00:00
Roger Barreto 7b4785496a .Net Restaurant Bookings Demo (#5988)
### Motivation and Context

Resolves #5960 

This pull request includes several changes to the `dotnet` directory,
mainly adding a new project called `BookingRestaurant` and updating
dependencies. The `BookingRestaurant` is a demo application for booking
restaurant tables using Microsoft Graph Bookings API. The most important
changes include adding a new project to the solution, updating package
versions, and adding new patterns to the markdown link check config.

New Project:

*
[`dotnet/SK-dotnet.sln`](diffhunk://#diff-6728f39c7d31a256668698ee869487799bf43c93dc8cc7e889befe95b0ec09e6R262):
Added a new project called `BookingRestaurant` to the solution.
[[1]](diffhunk://#diff-6728f39c7d31a256668698ee869487799bf43c93dc8cc7e889befe95b0ec09e6R262)
[[2]](diffhunk://#diff-6728f39c7d31a256668698ee869487799bf43c93dc8cc7e889befe95b0ec09e6R623-R628)
[[3]](diffhunk://#diff-6728f39c7d31a256668698ee869487799bf43c93dc8cc7e889befe95b0ec09e6R717)
*
[`dotnet/samples/Demos/BookingRestaurant/*`](diffhunk://#diff-f846bffbf2145055d4ab6e138b8e20d2ada4000292541e98d5b242c250327881R1-R74):
Added several new files for the `BookingRestaurant` project, including
`AppConfig.cs`, `Appointment.cs`, `BookingRestaurant.csproj`,
`BookingsPlugin.cs`, and `Program.cs`. These files contain the main
logic and configuration for the new project.
[[1]](diffhunk://#diff-f846bffbf2145055d4ab6e138b8e20d2ada4000292541e98d5b242c250327881R1-R74)
[[2]](diffhunk://#diff-5b3c66c05657fed5958d03e136b3c2376aaa1d9afea5d30c0653e69c92e39890R1-R24)
[[3]](diffhunk://#diff-ff4fe71831c229af576b18e123e87869077b64f9d41338f02fe583e35b1f761bR1-R30)
[[4]](diffhunk://#diff-21617b4ad8043159f5d5d0f394e839bc3b700e7bf965cd75b037fb0149e0c3cbR1-R140)
[[5]](diffhunk://#diff-624c47bcfbbff8c6156f7056d410a92b05e0a0c4038172b213903e03fa81511eR1-R128)
2024-04-29 20:18:23 +00:00