File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -976,6 +976,25 @@ public static async Task ResponseLocalShellTool()
976976 int z = 0 ;
977977 }
978978
979+ [ TornadoTest ]
980+ public static async Task ResponseCountInputTokens ( )
981+ {
982+ TornadoApi api = Program . Connect ( ) ;
983+
984+ ResponseInputTokensResult result = await api . Responses . CountInputTokens ( new ResponseRequest
985+ {
986+ Model = ChatModel . OpenAi . Gpt41 . V41Mini ,
987+ Instructions = "You are a helpful assistant" ,
988+ InputItems = [
989+ new ResponseInputMessage ( ChatMessageRoles . User , "What is the capital of France?" )
990+ ]
991+ } ) ;
992+
993+ Console . WriteLine ( $ "Input tokens: { result . InputTokens } ") ;
994+ Assert . That ( result . InputTokens , Is . GreaterThan ( 0 ) ) ;
995+ Assert . That ( result . Object , Is . EqualTo ( "response.input_tokens" ) ) ;
996+ }
997+
979998 [ TornadoTest , Flaky ( "only for dev" ) ]
980999 public static async Task Deserialize ( )
9811000 {
You can’t perform that action at this time.
0 commit comments