Skip to content

.Net: Enable InvokeAsync() and InvokeAsync<T> To Return the Connector Type - #4085

Merged
Roger Barreto (rogerbarreto) merged 8 commits into
microsoft:mainfrom
rogerbarreto:issues/4079-invokeasync-multiple-T-enablement
Dec 8, 2023
Merged

Roger Barreto (rogerbarreto) merged 8 commits into
microsoft:mainfrom
rogerbarreto:issues/4079-invokeasync-multiple-T-enablement

Conversation

@rogerbarreto

Copy link
Copy Markdown
Member

Motivation and Context

Similar to InvokeStreamingAsync where you can specify the T that the connector is returning, this will allow the same for the non-streaming API

This change also allows IChatCompletionServices to be recognized by the Prompt Functions and return the underlying ChatMessages directly to the InvokeAsync calls.

Resolves #4079

@rogerbarreto
Roger Barreto (rogerbarreto) requested a review from a team as a code owner December 7, 2023 17:26
@shawncal Shawn Callegari (shawncal) added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel kernel.core labels Dec 7, 2023
@github-actions github-actions Bot changed the title Enable InvokeAsync() and InvokeAsync<T> To Return the Connector Type .Net: Enable InvokeAsync() and InvokeAsync<T> To Return the Connector Type Dec 7, 2023
@rogerbarreto
Roger Barreto (rogerbarreto) added this pull request to the merge queue Dec 8, 2023
Merged via the queue into microsoft:main with commit db7f3e4 Dec 8, 2023
@rogerbarreto
Roger Barreto (rogerbarreto) deleted the issues/4079-invokeasync-multiple-T-enablement branch December 8, 2023 14:19
Bryan (Bryan-Roe) pushed a commit to Bryan-Roe-ai/semantic-kernel that referenced this pull request Oct 6, 2024
… Type (microsoft#4085)

### Motivation and Context

Similar to InvokeStreamingAsync<T> where you can specify the T that the
connector is returning, this will allow the same for the non-streaming
API

This change also allows `IChatCompletionService`s to be recognized by
the `Prompt Functions` and return the underlying ChatMessages directly
to the InvokeAsync calls.

Resolves microsoft#4079
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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Enable InvokeAsync<T> To work with other types.

4 participants