### Description
This PR fixes two issues our integration tests in the Dapr runtime. All
tests pass after this change is applied.
### 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 😄
Adding workflow for automated integration testing of Processes across
all supported runtimes.
### 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 😄
### 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 😄
### Motivation and Context
As part of graduating vector stores we want to remove the experimental
flag from the implementations and only keep them on memory store
implementations.
#8539
### Description
- Remove experimental flag from packages with vector store
implementations.
- Add experimental flag to any memory store files in the same package.
- Clean up warning suppressions in vector store projects.
### 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 😄
### 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.
-->
Support ability to capture and restore `AgentChat` history:
https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0048-agent-chat-serialization.md
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Introduces `AgentChatSerializer` that supports serialization and
deserialization of entire conversation state.
```json
{
"Participants": [
{
"Id": "asst_YaLY1TRmxsIReVa0BiuhEDAj",
"Name": "agent-1",
"Type": "Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantAgent"
},
{
"Id": "1e884890-c344-4bc0-9367-068c482a499d",
"Name": "agent-2",
"Type": "Microsoft.SemanticKernel.Agents.ChatCompletionAgent"
}
],
"History": [{"Role":{"Label":"user"},"Items":[{"$type":"TextContent","Text":"..."}],"ModelId":"gpt-35-turbo-16k"},{"Role":{"Label":"assistant"},"Items":[{"$type":"TextContent","Text":"..."}],"ModelId":"gpt-35-turbo-16k"}],
"Channels": [
{
"ChannelKey": "4kjDzpCpeOLUNbsSUisHd9cphSzEAb6Hxdnmr\u002Bem1Jw=",
"ChannelType": "Microsoft.SemanticKernel.Agents.OpenAI.OpenAIAssistantChannel",
"ChannelState": "thread_ZSF1ovTVzyYy8cg9GEwmDWgy"
},
{
"ChannelKey": "Vdx37EnWT9BS\u002BkkCkEgFCg9uHvHNw1\u002BhXMA4sgNMKs4=",
"ChannelType": "Microsoft.SemanticKernel.Agents.ChatHistoryChannel",
"ChannelState": [{"Role":{"Label":"user"},"Items":[{"$type":"TextContent","Text":"..."}],"ModelId":"gpt-35-turbo-16k"},{"Role":{"Label":"assistant"},"Items":[{"$type":"TextContent","Text":"..."}],"ModelId":"gpt-35-turbo-16k"}]
}
]
}
```
Includes sample showing serialization and deserialization with
`ChatCompletionAgent` and `OpenAIAssistantAgent` partipating on the same
chat, as well as a chat that includes `ChatCompletionAgent` that calls a
plug-in.
### 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: Ben Thomas <[email protected]>
### Motivation and Context
There's been an error for a while where serializing the chat history
leads to the following error:
```
PydanticSerializationError(Error serializing to JSON: TypeError: 'MockValSer' object
cannot be converted to 'SchemaSerializer')}
```
This is due to the fact that we're trying to do a model dump of an
object that we don't have a Pydantic model for as the `inner_content`
type is `Any`. Most, if not all, of the `inner_content` info is already
included in our `ChatMessageContent`, therefore we're excluding this
attribute from serialization.
Note: if you require the information in this `inner_content` attribute,
you will be responsible for grabbing the content before serializing the
chat history, as it won't be included.
<!-- 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 excludes the `inner_content` from the `model_dump()`,
`model_dump_json()`, or `serialize()` calls.
- Fixes#7903
- Adds a concept sample showing how to serialize the `ChatHistory` after
invoking a prompt via the kernel.
<!-- 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 😄
# Problem & Solution
This PR updates the Ollama Connector to use it's latest `OllamaSharp`
updated version `4.0` where already supports the new
`Microsoft.Extensions.AI` that can be completely leveraged by SK
Abstractions including Function Calling support.
- Resolves#7442
### 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.
-->
Addresses: https://github.com/microsoft/semantic-kernel/issues/7434
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Add audio to text to SK Python.
### Contribution Checklist
1. Add audio to text to SK Python.
2. Add text to image integration tests.
3. Refactor Azure AI connector AD auth.
<!-- 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 😄
### 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.
-->
Updated ability to serialize complex types here:
https://github.com/microsoft/semantic-kernel/pull/9525
...but missed the remoting boundary for invoke the process. This change
addresses this final gap without altering external patterns.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Convert event to JSON when invoking `ProcessActor` from
`DaprKernelProcessContext`
### 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 😄
### Description
- fixing definition of `KernelProcessStateMetadata` to be easier to
inherit/manage
- fixing missing plumbing of version in KernelState
- Updating Build interface in `ProcessStepBuilder` and `ProcessBuilder`
Fixes#9599
### 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 😄
### Motivation and Context
Bump Python version to 1.14.0 for a release.
<!-- 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
Bump Python version to 1.14.0 for a release.
<!-- 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 😄
### Motivation and Context
Update version to 1.28.0
### 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 😄
### Motivation and Context
The `ProcessStepEdgeBuilder` `send_event_to` method allows one to pass
in a target that isn't of type `ProcessFunctionTargetBuilder`. If it is
of the other type `ProcessStepBuilder` we build the expected type
`ProcessFunctionTargetBuilder`. The `send_event_to` method was missing
the type hint, which can cause issues for type checkers.
Secondly, during json schema building, we get the type hints using the
builder's globals and locals. This is an issue because it doesn't allow
us to find types defined outside of this module. Improve this by getting
type hints for user defined modules, as well.
<!-- 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 adds the proper type hint.
- Closes#9605
- Closes#9606
- Renames a `test_postgres.py` file that existed both in unit tests and
integration tests and caused a load conflict.
<!-- 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 😄
### 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.
-->
Adds vectorized search and text search to the In Memory connector.
### 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 😄
---------
Co-authored-by: Tao Chen <[email protected]>
### Motivation, Context and Description
The public OpenAPI model classes that have "operation" in their name
were renamed to align with the other classes that do not have the word
in their name.
Additionally, the `RestApiPayloadProperty.Type`,
`RestApiParameter.Type`, and `RestApiParameter.ArrayItemType` were made
internal to simplify the update to OpenAPI.NET v2, where their types
have been changed.
### Motivation, Context and Description
The new version, V2, of the
[OpenAPI.NET](https://github.com/microsoft/OpenAPI.NET/pull/1906) SDK
comes with changes to its model classes. This PR updates the SK OpenAPI
model classes to match the SDK's ones. The goal is to reduce breaking
changes from the update.
Similar changes were done in this PR - [.Net: Rename OpenAPI model
classes](https://github.com/microsoft/semantic-kernel/pull/9595) where
the `RestApiPayloadProperty.Type`, `RestApiParameter.Type`, and
`RestApiParameter.ArrayItemType` were made internal to simplify the
update to OpenAPI.NET v2, where their types have been changed.
Related task: https://github.com/microsoft/semantic-kernel/issues/6884
### 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.
-->
Fixes the mypy pre-commit job, and subsequent fixes from there.
Moved all python tests to use the uv setup task instead of manual cache,
python install and uv install.
### 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 😄
### Motivation and Context
Closes#9567
### Description
The fix handles the case where a streaming update contains an empty
string for the function name. I haven't been able to reproduce the
scenario where this happens and I have asked the issue creator for more
information. The function name has a max size of 64 chars and when I use
that the function isn't split over multiple streaming responses.
Referencing the approach shown here:
https://community.openai.com/t/functions-calling-with-streaming/305742
### 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 😄
### 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.
-->
Resolves: https://github.com/microsoft/semantic-kernel/issues/4759
This PR adds a support for the `detail` property in the OpenAI image
API. The property can be configured using `ImageContent.Metadata`
property.
`ImageContent.Metadata` usage:
```csharp
chatHistory.AddUserMessage(
[
new TextContent("What’s in this image?"),
new ImageContent(imageBytes, "image/jpg") { Metadata = new Dictionary<string, object?> { ["ChatImageDetailLevel"] = "high" } }
]);
```
### 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 😄
### Motivation and Context
This PR introduces integration tests for Processes that are shared
across all runtimes. This will allow us to run the exact same tests
using all supported runtimes.
### Description
This PR creates a few new projects that are needed to share the
integration tests across runtimes.
- `Process.IntegrationTests.Resources` contains all the definitions or
steps, state, processes, etc. that are used in the shared tests.
- `Process.IntegrationTests.Shared` contains all of the shared tests.
- `Process.IntegrationTestRunner.Local` is the test project that
executes the shared tests against the Local runtime.
- `Process.IntegrationTestRunner.Dapr` is the test project that executes
the shared tests against the Dapr runtime.
- `Process.IntegrationTestHost.Dapr` is the project that hosts Dapr
tests in an ASP.NET Core Web API.
The PR enables all of these tests to run locally, a follow up PR will
configure these tests to run in the GitHub pipeline.
### 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: alliscode <[email protected]>
Co-authored-by: Chris <[email protected]>
### Motivation and Context
Exploring a fix for #9429
### 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 😄
### 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.
-->
Assistant polling not propertly responding to terminal error conditions.
Fixes: https://github.com/microsoft/semantic-kernel/issues/9579
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
- Added explicit check for cancelling state: Invoke, InvokeStreaming, &
Polling loops
- Discriminate on different exception modes when polling
- Ensure stale run state isn't evaluated in polling loop
- Remove initial polling delay
### 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 😄
### Motivation, Context and Description
Taking into account that the OpenAPI model classes have become exposed
through the `KernelFunction.Metadata` property and that there could be
requests to change their public API surface, it makes sense to label
them as experimental to communicate the potential changes to the
consumers of the classes.
Related task: https://github.com/microsoft/semantic-kernel/issues/6884
### 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 does the following things:
- Introduces TextSearch abstractions, including implementation for Bing
- This consists of the TextSearch class, which implements three public
search methods, and handles the internals, the search methods are:
'search' returns a string, 'get_text_search_results' returns a
TextSearchResult object and 'get_search_results' returns a object native
to the search service (i.e. BingWebPages for Bing)
- This also has a method called "create_{search_method}' which returns a
KernelFunction based on the search method. This function can be adapted
by setting the parameters and has several adaptability options and
allows you to create a RAG pipeline easily with custom names and
descriptions of both the functions and the parameters!
- Introduces VectorSearch abstractions, including implementation for
Azure AI Search
- This consists of a VectorStoreBase class which handles all the
internal and three public interfaces, vectorized_search (supply a
vector), vectorizable_text_search (supply a string that get's vectorized
downstream), vector_text_search (supply a string), each vector store
record collection can pick and choose which ones they need to support by
importing one or more next to the VectorSearchBase class.
- Introduces VectorStoreTextSearch as a way to leverage text search
against vector stores
- Since this builds on TextSearch this is now the best way to create a
super powerfull RAG setup with your own data model!
- Adds all the related classes, samples and tests for the above.
- Also reorders the data folder, which might cause some slight breaking
changes for the few stores that have the new vector store model.
- Adds additional IndexKinds and DistanceFunctions to stay in sync with
dotnet.
- Renames VolatileStore and VolatileCollection to InMemoryVectorStore
and InMemoryVectorCollection.
Closes#6832#6833
### 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 😄
---------
Co-authored-by: Tao Chen <[email protected]>
### Motivation and Context
Breaking changes coming to the GitHub Actions product. [Details are
posted in the GitHub
Changelog](https://github.blog/changelog/2024-11-05-notice-of-breaking-changes-for-github-actions/).
If you use the upload-artifact or download-artifact actions, be sure you
have updated your workflows to v4
Closes#9563
### 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 😄
### Motivation, Context and Description
OpenAPI specification allows specifying multiple servers. This PR
refactors the `OpenApiDocumentParser` to return a collection of servers
instead of one.
---------
Co-authored-by: Mark Wallace <[email protected]>
### Motivation and Context
Fixes: https://github.com/microsoft/semantic-kernel/issues/9510
Process Framework: Simplify Event Emission in Process Steps
I would like to propose a simplification of the event emission mechanism
within the Process Framework, specifically in process steps. Currently,
emitting events involves multiple method calls and boilerplate code,
which can make the codebase harder to read and maintain.
### Description
I created an overload of EmitEventAsync with simplified signature to
reduce developer cognitive load, updated some tests to verify on build.
If decided to update the signature completely (replace it) I can update
all the examples and tests.
### 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 😄
### 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.
-->
DAPR events and messages result in runtime failure when contain anything
other than the supported primitive types:
https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-actors/dotnet-actors-serialization/#supported-primitive-types
This means arrays, lists, and objects are not currently able to be
emitted by steps.
### Description
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Translating `ProcessMessage`, `ProcessEvent`, and `KernelProcessMessage`
into JSON strings prior to data-contract serialization. As part of this,
any relevant type information is included in the json payload.
On deserialization, the type information is utilized to convert any
`JsonElement` data values to the expected type.
**Notes:**
- Added unit tests (DAPR specific project)
- Removed `DataContract` where not needed (and tests)
- Verified DAPR demo
- Attempted to minimize postfix null-supression operator as able.
- Replaced `var` with explicit types for my own clarity...and left them
for posterity.
- Eliminated redundant namespace scoping
### 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 😄
### Motivation and Context
Version bump for the 1.27.0 release
### 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 😄
### Motivation and Context
Update for #9496 to include the `RestApiOperation` in the
`KernelFunction.MetaData`
### Description
This will help us avoid having to add all `RestApiOperation` properties
individually to metadata.
### 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 😄
### 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.
-->
Resolves: https://github.com/microsoft/semantic-kernel/issues/7263
This PR contains an example how to access `ChatHistory` in SK function
using `Kernel.Data` property or `KernelArguments` and
`IAutoFunctionInvocationFilter`.
This scenario can be useful with auto function calling, when logic in SK
function depends on results from previous messages in the same chat
history.
### 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 😄
### Description
- Moving `ProcessStateMetadata` logic to factory/extension to try to
keep clean existing core components
- Adding check of step name when adding new steps/processes to process -
names must be unique so when applying saved state it propagates
properly. Currently there are issues if multiple steps have the same
name
- State versioning initial support:
- Processes with 1:1 step match previous and new version (step name
change and/or step logic change) - minor changes on process steps and
not in root process itself
Fixing #9358
#### Out of scope but will be addressed in next PRs
- Processes with N:M steps (process flow changed and potentially also
step logic changed)
- New samples showcasing how to make use of N:M mapping
### 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: Chris <[email protected]>
### Motivation and Context
Currently we do support binary image generation, but was lacking
examples how to do it in the `Concepts`. This PR adds concept tests and
resolves the issue.
- Resolves#6991
### Motivation and Context
Taking into account the plans to add REST API operation details to
KernelFunction.Metadata, it makes sense to review the REST API operation
model classes and ensure their surface is good enough to be publicly
exposed, making it easy for the SK team to develop them over time with
minimal or no breaking changes.
### Description
1. Changes collections/dictionaries to their read-only equivalents to
prevent modifications - metadata is read-only.
2. Makes the constructors of REST API operation model classes internal,
allowing changes and development without the concern of introducing
breaking changes.
Closes: https://github.com/microsoft/semantic-kernel/issues/6884
### Motivation and Context
The sample could be improved by having a common data model that matches
the one used in Lanchain, which also makes interoperable consumption of
the different collections easier.
#9013
### Description
- Added Pinecone to samples
- Added factories that expose the same data type for all vector stores
- Added key mapping for Qdrant so that it can use the same data model
### 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 😄
### Motivation and Context
**Why is this change required?**
This change is required to enhance the functionality of audio processing
in the Semantic Kernel by allowing the inclusion of timestamps in audio
responses.
**What problem does it solve?**
It resolves the limitation of missing audio timestamp support in the
`GeminiPromptExecutionSettings`, which has been a significant blocker
for developers trying to utilize audio prompts effectively.
**What scenario does it contribute to?**
This contribution is particularly useful for applications that require
precise audio response management, enabling better synchronization and
analysis of audio data in real-time scenarios.
If it fixes an open issue, please link to the issue here.
#9500
### Description
This contribution adds a new feature that allows audio responses to
include timestamps, a crucial element for many applications. Here’s a
quick overview of what’s been implemented:
**New Property:** The `AudioTimestamp` property indicates whether the
audio response should include timestamps. When enabled, this property
will ensure that audio timestamps are included in requests to the model,
providing developers with the precise control they need for their
applications.
**Seamless Integration:** I conducted a thorough review of the existing
codebase to ensure that this new feature integrates smoothly without
disrupting current functionalities. This change is designed to be
backward-compatible, making it easier for developers to adopt.
**Future-Proofing:** By adding this property, we’re not just solving an
immediate need; we’re also paving the way for future enhancements in
audio processing capabilities within the Semantic Kernel framework.
### Contribution Checklist
- [Y] The code builds clean without any errors or warnings
- [Y] 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
- [Y] All unit tests pass, and I have added new tests where possible
- [Y] I didn't break anyone 😄
---------
Co-authored-by: Adit Sheth <[email protected]>
Co-authored-by: Mark Wallace <[email protected]>
Co-authored-by: Roger Barreto <[email protected]>