Skip to content

.Net: Replacing FunctionsView class with List#2878

Merged
shawncal merged 10 commits intomicrosoft:mainfrom
shawncal:funcview-sep18
Sep 20, 2023
Merged

.Net: Replacing FunctionsView class with List#2878
shawncal merged 10 commits intomicrosoft:mainfrom
shawncal:funcview-sep18

Conversation

@shawncal
Copy link
Contributor

@shawncal shawncal commented Sep 19, 2023

Motivation and Context

The FunctionsView class wraps two inner Dictionaries of FunctionView objects: Native and Semantic. Since we no longer differentiate between these two for any practical purpose, we could merge those into one list, and we no longer need a special class for that.

Description

  • Removing the different collections to store Semantic vs Native functions
  • Removing FunctionsView collection
  • From SkillCollection.GetFunctionsView(), returning an IReadOnlyList<FunctionView>
  • Callers can then easily use LINQ to filter the resulting flat list, or group by skill name.
  • Updating callers, tests

Resolves #604

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
  • All unit tests pass, and I have added new tests where possible
  • I didn't break anyone 😄
    • BREAKING CHANGE as it modifies the public API. Low impact.

@shawncal shawncal added .NET Issue or Pull requests regarding .NET code kernel.core PR: breaking change Pull requests that introduce breaking changes labels Sep 19, 2023
@shawncal shawncal requested a review from a team as a code owner September 19, 2023 00:14
@shawncal shawncal added the kernel Issues or pull requests impacting the core kernel label Sep 19, 2023
@rogerbarreto
Copy link
Member

Resolves #604

@shawncal shawncal added this pull request to the merge queue Sep 20, 2023
Merged via the queue into microsoft:main with commit 9d638e5 Sep 20, 2023
@shawncal shawncal deleted the funcview-sep18 branch September 20, 2023 06:25
SOE-YoungS pushed a commit to SOE-YoungS/semantic-kernel that referenced this pull request Nov 1, 2023
### Motivation and Context
The `FunctionsView` class wraps two inner Dictionaries of `FunctionView`
objects: Native and Semantic. Since we no longer differentiate between
these two for any practical purpose, we could merge those into one list,
and we no longer need a special class for that.

### Description

- Removing the different collections to store Semantic vs Native
functions
- Removing `FunctionsView` collection
- From `SkillCollection.GetFunctionsView()`, returning an
`IReadOnlyList<FunctionView>`
- Callers can then easily use LINQ to filter the resulting flat list, or
group by skill name.
- Updating callers, tests

Resolves microsoft#604

### 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 😄
    - BREAKING CHANGE as it modifies the public API. Low impact.

---------

Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Co-authored-by: Lee Miller <lemiller@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code PR: breaking change Pull requests that introduce breaking changes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Potential concurrency bugs in FunctionsView

5 participants