Skip to content

Commit

Permalink
Merge pull request #1029 from solliancenet/cp-bugfix-sk
Browse files Browse the repository at this point in the history
Get Resource bug in SemanticKernelBase
  • Loading branch information
ciprianjichici authored May 23, 2024
2 parents e2bc861 + 75789ac commit 2587212
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dotnet/SemanticKernel/Agents/SemanticKernelAgentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ private async Task<T> GetResource<T>(string objectId, string resourceTypeName, I
UserId = "SemanticKernelAPI",
Username = "SemanticKernelAPI"
});
return (result as List<T>)!.First();
var resource = (result as List<ResourceProviderGetResult<T>>)!.First().Resource;
return resource;
}

private void ValidateRequest()
Expand Down

0 comments on commit 2587212

Please sign in to comment.