@@ -529,6 +529,11 @@ export interface RunCreateParamsBase {
529
529
*/
530
530
additional_instructions ?: string | null ;
531
531
532
+ /**
533
+ * Adds additional messages to the thread before creating the run.
534
+ */
535
+ additional_messages ?: Array < RunCreateParams . AdditionalMessage > | null ;
536
+
532
537
/**
533
538
* Overrides the
534
539
* [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
@@ -574,6 +579,39 @@ export interface RunCreateParamsBase {
574
579
}
575
580
576
581
export namespace RunCreateParams {
582
+ export interface AdditionalMessage {
583
+ /**
584
+ * The content of the message.
585
+ */
586
+ content : string ;
587
+
588
+ /**
589
+ * The role of the entity that is creating the message. Allowed values include:
590
+ *
591
+ * - `user`: Indicates the message is sent by an actual user and should be used in
592
+ * most cases to represent user-generated messages.
593
+ * - `assistant`: Indicates the message is generated by the assistant. Use this
594
+ * value to insert messages from the assistant into the conversation.
595
+ */
596
+ role : 'user' | 'assistant' ;
597
+
598
+ /**
599
+ * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
600
+ * the message should use. There can be a maximum of 10 files attached to a
601
+ * message. Useful for tools like `retrieval` and `code_interpreter` that can
602
+ * access and use files.
603
+ */
604
+ file_ids ?: Array < string > ;
605
+
606
+ /**
607
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
608
+ * for storing additional information about the object in a structured format. Keys
609
+ * can be a maximum of 64 characters long and values can be a maxium of 512
610
+ * characters long.
611
+ */
612
+ metadata ?: unknown | null ;
613
+ }
614
+
577
615
export type RunCreateParamsNonStreaming = RunsAPI . RunCreateParamsNonStreaming ;
578
616
export type RunCreateParamsStreaming = RunsAPI . RunCreateParamsStreaming ;
579
617
}
@@ -637,6 +675,11 @@ export interface RunCreateAndPollParams {
637
675
*/
638
676
additional_instructions ?: string | null ;
639
677
678
+ /**
679
+ * Adds additional messages to the thread before creating the run.
680
+ */
681
+ additional_messages ?: Array < RunCreateAndPollParams . AdditionalMessage > | null ;
682
+
640
683
/**
641
684
* Overrides the
642
685
* [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
@@ -674,6 +717,41 @@ export interface RunCreateAndPollParams {
674
717
tools ?: Array < AssistantsAPI . AssistantTool > | null ;
675
718
}
676
719
720
+ export namespace RunCreateAndPollParams {
721
+ export interface AdditionalMessage {
722
+ /**
723
+ * The content of the message.
724
+ */
725
+ content : string ;
726
+
727
+ /**
728
+ * The role of the entity that is creating the message. Allowed values include:
729
+ *
730
+ * - `user`: Indicates the message is sent by an actual user and should be used in
731
+ * most cases to represent user-generated messages.
732
+ * - `assistant`: Indicates the message is generated by the assistant. Use this
733
+ * value to insert messages from the assistant into the conversation.
734
+ */
735
+ role : 'user' | 'assistant' ;
736
+
737
+ /**
738
+ * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
739
+ * the message should use. There can be a maximum of 10 files attached to a
740
+ * message. Useful for tools like `retrieval` and `code_interpreter` that can
741
+ * access and use files.
742
+ */
743
+ file_ids ?: Array < string > ;
744
+
745
+ /**
746
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
747
+ * for storing additional information about the object in a structured format. Keys
748
+ * can be a maximum of 64 characters long and values can be a maxium of 512
749
+ * characters long.
750
+ */
751
+ metadata ?: unknown | null ;
752
+ }
753
+ }
754
+
677
755
export interface RunCreateAndStreamParams {
678
756
/**
679
757
* The ID of the
@@ -689,6 +767,11 @@ export interface RunCreateAndStreamParams {
689
767
*/
690
768
additional_instructions ?: string | null ;
691
769
770
+ /**
771
+ * Adds additional messages to the thread before creating the run.
772
+ */
773
+ additional_messages ?: Array < RunCreateAndStreamParams . AdditionalMessage > | null ;
774
+
692
775
/**
693
776
* Overrides the
694
777
* [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
@@ -726,6 +809,41 @@ export interface RunCreateAndStreamParams {
726
809
tools ?: Array < AssistantsAPI . AssistantTool > | null ;
727
810
}
728
811
812
+ export namespace RunCreateAndStreamParams {
813
+ export interface AdditionalMessage {
814
+ /**
815
+ * The content of the message.
816
+ */
817
+ content : string ;
818
+
819
+ /**
820
+ * The role of the entity that is creating the message. Allowed values include:
821
+ *
822
+ * - `user`: Indicates the message is sent by an actual user and should be used in
823
+ * most cases to represent user-generated messages.
824
+ * - `assistant`: Indicates the message is generated by the assistant. Use this
825
+ * value to insert messages from the assistant into the conversation.
826
+ */
827
+ role : 'user' | 'assistant' ;
828
+
829
+ /**
830
+ * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
831
+ * the message should use. There can be a maximum of 10 files attached to a
832
+ * message. Useful for tools like `retrieval` and `code_interpreter` that can
833
+ * access and use files.
834
+ */
835
+ file_ids ?: Array < string > ;
836
+
837
+ /**
838
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
839
+ * for storing additional information about the object in a structured format. Keys
840
+ * can be a maximum of 64 characters long and values can be a maxium of 512
841
+ * characters long.
842
+ */
843
+ metadata ?: unknown | null ;
844
+ }
845
+ }
846
+
729
847
export interface RunStreamParams {
730
848
/**
731
849
* The ID of the
@@ -741,6 +859,11 @@ export interface RunStreamParams {
741
859
*/
742
860
additional_instructions ?: string | null ;
743
861
862
+ /**
863
+ * Adds additional messages to the thread before creating the run.
864
+ */
865
+ additional_messages ?: Array < RunStreamParams . AdditionalMessage > | null ;
866
+
744
867
/**
745
868
* Overrides the
746
869
* [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
@@ -778,6 +901,41 @@ export interface RunStreamParams {
778
901
tools ?: Array < AssistantsAPI . AssistantTool > | null ;
779
902
}
780
903
904
+ export namespace RunStreamParams {
905
+ export interface AdditionalMessage {
906
+ /**
907
+ * The content of the message.
908
+ */
909
+ content : string ;
910
+
911
+ /**
912
+ * The role of the entity that is creating the message. Allowed values include:
913
+ *
914
+ * - `user`: Indicates the message is sent by an actual user and should be used in
915
+ * most cases to represent user-generated messages.
916
+ * - `assistant`: Indicates the message is generated by the assistant. Use this
917
+ * value to insert messages from the assistant into the conversation.
918
+ */
919
+ role : 'user' | 'assistant' ;
920
+
921
+ /**
922
+ * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that
923
+ * the message should use. There can be a maximum of 10 files attached to a
924
+ * message. Useful for tools like `retrieval` and `code_interpreter` that can
925
+ * access and use files.
926
+ */
927
+ file_ids ?: Array < string > ;
928
+
929
+ /**
930
+ * Set of 16 key-value pairs that can be attached to an object. This can be useful
931
+ * for storing additional information about the object in a structured format. Keys
932
+ * can be a maximum of 64 characters long and values can be a maxium of 512
933
+ * characters long.
934
+ */
935
+ metadata ?: unknown | null ;
936
+ }
937
+ }
938
+
781
939
export type RunSubmitToolOutputsParams =
782
940
| RunSubmitToolOutputsParamsNonStreaming
783
941
| RunSubmitToolOutputsParamsStreaming ;
0 commit comments