Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Net: Small improvements in Structured Outputs #9906

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Small improvement
  • Loading branch information
dmytrostruk committed Dec 9, 2024
commit 4decea1fce06e69db11bb160a91f11a32bb1bac4
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,7 @@ public async Task StructuredOutputsWithFunctionsFromYamlAsync()
var functionPath = Path.Combine(Directory.GetCurrentDirectory(), "Resources", "Plugins", "MoviePlugins", "MoviePluginYaml", "TopMovies.yaml");

// Load YAML prompt.
using Stream stream = File.OpenRead(functionPath);
using StreamReader reader = new(stream);

var topMoviesYaml = reader.ReadToEnd();
var topMoviesYaml = File.ReadAllText(functionPath);

// Import a function from YAML.
var function = kernel.CreateFunctionFromPromptYaml(topMoviesYaml);
Expand Down
Loading