@@ -409,7 +409,7 @@ export interface Run {
409
409
/**
410
410
* Specifies the format that the model must output. Compatible with
411
411
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
412
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
412
+ * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
413
413
*
414
414
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
415
415
* message the model generates is valid JSON.
@@ -446,7 +446,7 @@ export interface Run {
446
446
* Controls which (if any) tool is called by the model. `none` means the model will
447
447
* not call any tools and instead generates a message. `auto` is the default value
448
448
* and means the model can pick between generating a message or calling a tool.
449
- * Specifying a particular tool like `{"type": "TOOL_TYPE "}` or
449
+ * Specifying a particular tool like `{"type": "file_search "}` or
450
450
* `{"type": "function", "function": {"name": "my_function"}}` forces the model to
451
451
* call that tool.
452
452
*/
@@ -459,6 +459,10 @@ export interface Run {
459
459
*/
460
460
tools : Array < AssistantsAPI . AssistantTool > ;
461
461
462
+ /**
463
+ * Controls for how a thread will be truncated prior to the run. Use this to
464
+ * control the intial context window of the run.
465
+ */
462
466
truncation_strategy : Run . TruncationStrategy | null ;
463
467
464
468
/**
@@ -534,6 +538,10 @@ export namespace Run {
534
538
}
535
539
}
536
540
541
+ /**
542
+ * Controls for how a thread will be truncated prior to the run. Use this to
543
+ * control the intial context window of the run.
544
+ */
537
545
export interface TruncationStrategy {
538
546
/**
539
547
* The truncation strategy to use for the thread. The default is `auto`. If set to
@@ -620,7 +628,7 @@ export interface RunCreateParamsBase {
620
628
* The maximum number of completion tokens that may be used over the course of the
621
629
* run. The run will make a best effort to use only the number of completion tokens
622
630
* specified, across multiple turns of the run. If the run exceeds the number of
623
- * completion tokens specified, the run will end with status `complete `. See
631
+ * completion tokens specified, the run will end with status `incomplete `. See
624
632
* `incomplete_details` for more info.
625
633
*/
626
634
max_completion_tokens ?: number | null ;
@@ -629,7 +637,7 @@ export interface RunCreateParamsBase {
629
637
* The maximum number of prompt tokens that may be used over the course of the run.
630
638
* The run will make a best effort to use only the number of prompt tokens
631
639
* specified, across multiple turns of the run. If the run exceeds the number of
632
- * prompt tokens specified, the run will end with status `complete `. See
640
+ * prompt tokens specified, the run will end with status `incomplete `. See
633
641
* `incomplete_details` for more info.
634
642
*/
635
643
max_prompt_tokens ?: number | null ;
@@ -673,7 +681,7 @@ export interface RunCreateParamsBase {
673
681
/**
674
682
* Specifies the format that the model must output. Compatible with
675
683
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
676
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
684
+ * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
677
685
*
678
686
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
679
687
* message the model generates is valid JSON.
@@ -706,7 +714,7 @@ export interface RunCreateParamsBase {
706
714
* Controls which (if any) tool is called by the model. `none` means the model will
707
715
* not call any tools and instead generates a message. `auto` is the default value
708
716
* and means the model can pick between generating a message or calling a tool.
709
- * Specifying a particular tool like `{"type": "TOOL_TYPE "}` or
717
+ * Specifying a particular tool like `{"type": "file_search "}` or
710
718
* `{"type": "function", "function": {"name": "my_function"}}` forces the model to
711
719
* call that tool.
712
720
*/
@@ -722,9 +730,15 @@ export interface RunCreateParamsBase {
722
730
* An alternative to sampling with temperature, called nucleus sampling, where the
723
731
* model considers the results of the tokens with top_p probability mass. So 0.1
724
732
* means only the tokens comprising the top 10% probability mass are considered.
733
+ *
734
+ * We generally recommend altering this or temperature but not both.
725
735
*/
726
736
top_p ?: number | null ;
727
737
738
+ /**
739
+ * Controls for how a thread will be truncated prior to the run. Use this to
740
+ * control the intial context window of the run.
741
+ */
728
742
truncation_strategy ?: RunCreateParams . TruncationStrategy | null ;
729
743
}
730
744
@@ -770,6 +784,10 @@ export namespace RunCreateParams {
770
784
}
771
785
}
772
786
787
+ /**
788
+ * Controls for how a thread will be truncated prior to the run. Use this to
789
+ * control the intial context window of the run.
790
+ */
773
791
export interface TruncationStrategy {
774
792
/**
775
793
* The truncation strategy to use for the thread. The default is `auto`. If set to
@@ -865,7 +883,7 @@ export interface RunCreateAndPollParams {
865
883
* The maximum number of completion tokens that may be used over the course of the
866
884
* run. The run will make a best effort to use only the number of completion tokens
867
885
* specified, across multiple turns of the run. If the run exceeds the number of
868
- * completion tokens specified, the run will end with status `complete `. See
886
+ * completion tokens specified, the run will end with status `incomplete `. See
869
887
* `incomplete_details` for more info.
870
888
*/
871
889
max_completion_tokens ?: number | null ;
@@ -874,7 +892,7 @@ export interface RunCreateAndPollParams {
874
892
* The maximum number of prompt tokens that may be used over the course of the run.
875
893
* The run will make a best effort to use only the number of prompt tokens
876
894
* specified, across multiple turns of the run. If the run exceeds the number of
877
- * prompt tokens specified, the run will end with status `complete `. See
895
+ * prompt tokens specified, the run will end with status `incomplete `. See
878
896
* `incomplete_details` for more info.
879
897
*/
880
898
max_prompt_tokens ?: number | null ;
@@ -918,7 +936,7 @@ export interface RunCreateAndPollParams {
918
936
/**
919
937
* Specifies the format that the model must output. Compatible with
920
938
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
921
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
939
+ * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
922
940
*
923
941
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
924
942
* message the model generates is valid JSON.
@@ -944,7 +962,7 @@ export interface RunCreateAndPollParams {
944
962
* Controls which (if any) tool is called by the model. `none` means the model will
945
963
* not call any tools and instead generates a message. `auto` is the default value
946
964
* and means the model can pick between generating a message or calling a tool.
947
- * Specifying a particular tool like `{"type": "TOOL_TYPE "}` or
965
+ * Specifying a particular tool like `{"type": "file_search "}` or
948
966
* `{"type": "function", "function": {"name": "my_function"}}` forces the model to
949
967
* call that tool.
950
968
*/
@@ -960,9 +978,15 @@ export interface RunCreateAndPollParams {
960
978
* An alternative to sampling with temperature, called nucleus sampling, where the
961
979
* model considers the results of the tokens with top_p probability mass. So 0.1
962
980
* means only the tokens comprising the top 10% probability mass are considered.
981
+ *
982
+ * We generally recommend altering this or temperature but not both.
963
983
*/
964
984
top_p ?: number | null ;
965
985
986
+ /**
987
+ * Controls for how a thread will be truncated prior to the run. Use this to
988
+ * control the intial context window of the run.
989
+ */
966
990
truncation_strategy ?: RunCreateAndPollParams . TruncationStrategy | null ;
967
991
}
968
992
@@ -1008,6 +1032,10 @@ export namespace RunCreateAndPollParams {
1008
1032
}
1009
1033
}
1010
1034
1035
+ /**
1036
+ * Controls for how a thread will be truncated prior to the run. Use this to
1037
+ * control the intial context window of the run.
1038
+ */
1011
1039
export interface TruncationStrategy {
1012
1040
/**
1013
1041
* The truncation strategy to use for the thread. The default is `auto`. If set to
@@ -1056,7 +1084,7 @@ export interface RunCreateAndStreamParams {
1056
1084
* The maximum number of completion tokens that may be used over the course of the
1057
1085
* run. The run will make a best effort to use only the number of completion tokens
1058
1086
* specified, across multiple turns of the run. If the run exceeds the number of
1059
- * completion tokens specified, the run will end with status `complete `. See
1087
+ * completion tokens specified, the run will end with status `incomplete `. See
1060
1088
* `incomplete_details` for more info.
1061
1089
*/
1062
1090
max_completion_tokens ?: number | null ;
@@ -1065,7 +1093,7 @@ export interface RunCreateAndStreamParams {
1065
1093
* The maximum number of prompt tokens that may be used over the course of the run.
1066
1094
* The run will make a best effort to use only the number of prompt tokens
1067
1095
* specified, across multiple turns of the run. If the run exceeds the number of
1068
- * prompt tokens specified, the run will end with status `complete `. See
1096
+ * prompt tokens specified, the run will end with status `incomplete `. See
1069
1097
* `incomplete_details` for more info.
1070
1098
*/
1071
1099
max_prompt_tokens ?: number | null ;
@@ -1109,7 +1137,7 @@ export interface RunCreateAndStreamParams {
1109
1137
/**
1110
1138
* Specifies the format that the model must output. Compatible with
1111
1139
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1112
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
1140
+ * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1113
1141
*
1114
1142
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1115
1143
* message the model generates is valid JSON.
@@ -1135,7 +1163,7 @@ export interface RunCreateAndStreamParams {
1135
1163
* Controls which (if any) tool is called by the model. `none` means the model will
1136
1164
* not call any tools and instead generates a message. `auto` is the default value
1137
1165
* and means the model can pick between generating a message or calling a tool.
1138
- * Specifying a particular tool like `{"type": "TOOL_TYPE "}` or
1166
+ * Specifying a particular tool like `{"type": "file_search "}` or
1139
1167
* `{"type": "function", "function": {"name": "my_function"}}` forces the model to
1140
1168
* call that tool.
1141
1169
*/
@@ -1151,9 +1179,15 @@ export interface RunCreateAndStreamParams {
1151
1179
* An alternative to sampling with temperature, called nucleus sampling, where the
1152
1180
* model considers the results of the tokens with top_p probability mass. So 0.1
1153
1181
* means only the tokens comprising the top 10% probability mass are considered.
1182
+ *
1183
+ * We generally recommend altering this or temperature but not both.
1154
1184
*/
1155
1185
top_p ?: number | null ;
1156
1186
1187
+ /**
1188
+ * Controls for how a thread will be truncated prior to the run. Use this to
1189
+ * control the intial context window of the run.
1190
+ */
1157
1191
truncation_strategy ?: RunCreateAndStreamParams . TruncationStrategy | null ;
1158
1192
}
1159
1193
@@ -1199,6 +1233,10 @@ export namespace RunCreateAndStreamParams {
1199
1233
}
1200
1234
}
1201
1235
1236
+ /**
1237
+ * Controls for how a thread will be truncated prior to the run. Use this to
1238
+ * control the intial context window of the run.
1239
+ */
1202
1240
export interface TruncationStrategy {
1203
1241
/**
1204
1242
* The truncation strategy to use for the thread. The default is `auto`. If set to
@@ -1247,7 +1285,7 @@ export interface RunStreamParams {
1247
1285
* The maximum number of completion tokens that may be used over the course of the
1248
1286
* run. The run will make a best effort to use only the number of completion tokens
1249
1287
* specified, across multiple turns of the run. If the run exceeds the number of
1250
- * completion tokens specified, the run will end with status `complete `. See
1288
+ * completion tokens specified, the run will end with status `incomplete `. See
1251
1289
* `incomplete_details` for more info.
1252
1290
*/
1253
1291
max_completion_tokens ?: number | null ;
@@ -1256,7 +1294,7 @@ export interface RunStreamParams {
1256
1294
* The maximum number of prompt tokens that may be used over the course of the run.
1257
1295
* The run will make a best effort to use only the number of prompt tokens
1258
1296
* specified, across multiple turns of the run. If the run exceeds the number of
1259
- * prompt tokens specified, the run will end with status `complete `. See
1297
+ * prompt tokens specified, the run will end with status `incomplete `. See
1260
1298
* `incomplete_details` for more info.
1261
1299
*/
1262
1300
max_prompt_tokens ?: number | null ;
@@ -1300,7 +1338,7 @@ export interface RunStreamParams {
1300
1338
/**
1301
1339
* Specifies the format that the model must output. Compatible with
1302
1340
* [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
1303
- * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
1341
+ * all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
1304
1342
*
1305
1343
* Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1306
1344
* message the model generates is valid JSON.
@@ -1326,7 +1364,7 @@ export interface RunStreamParams {
1326
1364
* Controls which (if any) tool is called by the model. `none` means the model will
1327
1365
* not call any tools and instead generates a message. `auto` is the default value
1328
1366
* and means the model can pick between generating a message or calling a tool.
1329
- * Specifying a particular tool like `{"type": "TOOL_TYPE "}` or
1367
+ * Specifying a particular tool like `{"type": "file_search "}` or
1330
1368
* `{"type": "function", "function": {"name": "my_function"}}` forces the model to
1331
1369
* call that tool.
1332
1370
*/
@@ -1342,9 +1380,15 @@ export interface RunStreamParams {
1342
1380
* An alternative to sampling with temperature, called nucleus sampling, where the
1343
1381
* model considers the results of the tokens with top_p probability mass. So 0.1
1344
1382
* means only the tokens comprising the top 10% probability mass are considered.
1383
+ *
1384
+ * We generally recommend altering this or temperature but not both.
1345
1385
*/
1346
1386
top_p ?: number | null ;
1347
1387
1388
+ /**
1389
+ * Controls for how a thread will be truncated prior to the run. Use this to
1390
+ * control the intial context window of the run.
1391
+ */
1348
1392
truncation_strategy ?: RunStreamParams . TruncationStrategy | null ;
1349
1393
}
1350
1394
@@ -1390,6 +1434,10 @@ export namespace RunStreamParams {
1390
1434
}
1391
1435
}
1392
1436
1437
+ /**
1438
+ * Controls for how a thread will be truncated prior to the run. Use this to
1439
+ * control the intial context window of the run.
1440
+ */
1393
1441
export interface TruncationStrategy {
1394
1442
/**
1395
1443
* The truncation strategy to use for the thread. The default is `auto`. If set to
0 commit comments