Skip to content

Commit 476fa80

Browse files
committed
docs(dotnet): supply maxTokens to avoid response truncation
1 parent 67dfb4c commit 476fa80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotnet/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var prompt = @"{{$input}}
4141
4242
One line TLDR with the fewest words.";
4343

44-
var summarize = kernel.CreateSemanticFunction(prompt);
44+
var summarize = kernel.CreateSemanticFunction(prompt, maxTokens: 100);
4545

4646
string text1 = @"
4747
1st Law of Thermodynamics - Energy cannot be created or destroyed.
@@ -80,8 +80,8 @@ string summarizePrompt = @"{{$input}}
8080
8181
Give me a TLDR with the fewest words.";
8282

83-
var translator = kernel.CreateSemanticFunction(translationPrompt);
84-
var summarize = kernel.CreateSemanticFunction(summarizePrompt);
83+
var translator = kernel.CreateSemanticFunction(translationPrompt, maxTokens: 200);
84+
var summarize = kernel.CreateSemanticFunction(summarizePrompt, maxTokens: 100);
8585

8686
string inputText = @"
8787
1st Law of Thermodynamics - Energy cannot be created or destroyed.

0 commit comments

Comments
 (0)