diff --git a/betaassistant.go b/betaassistant.go index 402a9e6..3016f3b 100644 --- a/betaassistant.go +++ b/betaassistant.go @@ -1551,11 +1551,16 @@ func (r CodeInterpreterTool) ToParam() CodeInterpreterToolParam { return param.OverrideObj[CodeInterpreterToolParam](r.RawJSON()) } -// The property Type is required. +func NewCodeInterpreterToolParam() CodeInterpreterToolParam { + return CodeInterpreterToolParam{ + Type: "code_interpreter", + } +} + +// This struct has a constant value, construct it with +// [NewCodeInterpreterToolParam]. type CodeInterpreterToolParam struct { // The type of tool being defined: `code_interpreter` - // - // This field can be elided, and will marshal its zero value as "code_interpreter". Type constant.CodeInterpreter `json:"type,required"` paramObj } @@ -2027,14 +2032,19 @@ func init() { ) } +func NewBetaAssistantNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto() BetaAssistantNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto { + return BetaAssistantNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto{ + Type: "auto", + } +} + // The default strategy. This strategy currently uses a `max_chunk_size_tokens` of // `800` and `chunk_overlap_tokens` of `400`. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewBetaAssistantNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto]. type BetaAssistantNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto struct { // Always `auto`. - // - // This field can be elided, and will marshal its zero value as "auto". Type constant.Auto `json:"type,required"` paramObj } diff --git a/betathread.go b/betathread.go index 73f9a79..815b46c 100644 --- a/betathread.go +++ b/betathread.go @@ -730,11 +730,16 @@ func init() { ) } -// The property Type is required. +func NewBetaThreadNewParamsMessageAttachmentToolFileSearch() BetaThreadNewParamsMessageAttachmentToolFileSearch { + return BetaThreadNewParamsMessageAttachmentToolFileSearch{ + Type: "file_search", + } +} + +// This struct has a constant value, construct it with +// [NewBetaThreadNewParamsMessageAttachmentToolFileSearch]. type BetaThreadNewParamsMessageAttachmentToolFileSearch struct { // The type of tool being defined: `file_search` - // - // This field can be elided, and will marshal its zero value as "file_search". Type constant.FileSearch `json:"type,required"` paramObj } @@ -898,14 +903,19 @@ func init() { ) } +func NewBetaThreadNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto() BetaThreadNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto { + return BetaThreadNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto{ + Type: "auto", + } +} + // The default strategy. This strategy currently uses a `max_chunk_size_tokens` of // `800` and `chunk_overlap_tokens` of `400`. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewBetaThreadNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto]. type BetaThreadNewParamsToolResourcesFileSearchVectorStoreChunkingStrategyAuto struct { // Always `auto`. - // - // This field can be elided, and will marshal its zero value as "auto". Type constant.Auto `json:"type,required"` paramObj } @@ -1313,11 +1323,16 @@ func init() { ) } -// The property Type is required. +func NewBetaThreadNewAndRunParamsThreadMessageAttachmentToolFileSearch() BetaThreadNewAndRunParamsThreadMessageAttachmentToolFileSearch { + return BetaThreadNewAndRunParamsThreadMessageAttachmentToolFileSearch{ + Type: "file_search", + } +} + +// This struct has a constant value, construct it with +// [NewBetaThreadNewAndRunParamsThreadMessageAttachmentToolFileSearch]. type BetaThreadNewAndRunParamsThreadMessageAttachmentToolFileSearch struct { // The type of tool being defined: `file_search` - // - // This field can be elided, and will marshal its zero value as "file_search". Type constant.FileSearch `json:"type,required"` paramObj } @@ -1483,14 +1498,19 @@ func init() { ) } +func NewBetaThreadNewAndRunParamsThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto() BetaThreadNewAndRunParamsThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto { + return BetaThreadNewAndRunParamsThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto{ + Type: "auto", + } +} + // The default strategy. This strategy currently uses a `max_chunk_size_tokens` of // `800` and `chunk_overlap_tokens` of `400`. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewBetaThreadNewAndRunParamsThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto]. type BetaThreadNewAndRunParamsThreadToolResourcesFileSearchVectorStoreChunkingStrategyAuto struct { // Always `auto`. - // - // This field can be elided, and will marshal its zero value as "auto". Type constant.Auto `json:"type,required"` paramObj } diff --git a/betathreadmessage.go b/betathreadmessage.go index 797a567..b7eec7d 100644 --- a/betathreadmessage.go +++ b/betathreadmessage.go @@ -1672,11 +1672,16 @@ func init() { ) } -// The property Type is required. +func NewBetaThreadMessageNewParamsAttachmentToolFileSearch() BetaThreadMessageNewParamsAttachmentToolFileSearch { + return BetaThreadMessageNewParamsAttachmentToolFileSearch{ + Type: "file_search", + } +} + +// This struct has a constant value, construct it with +// [NewBetaThreadMessageNewParamsAttachmentToolFileSearch]. type BetaThreadMessageNewParamsAttachmentToolFileSearch struct { // The type of tool being defined: `file_search` - // - // This field can be elided, and will marshal its zero value as "file_search". Type constant.FileSearch `json:"type,required"` paramObj } diff --git a/betathreadrun.go b/betathreadrun.go index 9e2984a..eb36994 100644 --- a/betathreadrun.go +++ b/betathreadrun.go @@ -822,11 +822,16 @@ func init() { ) } -// The property Type is required. +func NewBetaThreadRunNewParamsAdditionalMessageAttachmentToolFileSearch() BetaThreadRunNewParamsAdditionalMessageAttachmentToolFileSearch { + return BetaThreadRunNewParamsAdditionalMessageAttachmentToolFileSearch{ + Type: "file_search", + } +} + +// This struct has a constant value, construct it with +// [NewBetaThreadRunNewParamsAdditionalMessageAttachmentToolFileSearch]. type BetaThreadRunNewParamsAdditionalMessageAttachmentToolFileSearch struct { // The type of tool being defined: `file_search` - // - // This field can be elided, and will marshal its zero value as "file_search". Type constant.FileSearch `json:"type,required"` paramObj } diff --git a/responses/response.go b/responses/response.go index e3a587b..e7d0668 100644 --- a/responses/response.go +++ b/responses/response.go @@ -2158,14 +2158,19 @@ func (r ResponseComputerToolCallActionMoveParam) MarshalJSON() (data []byte, err return param.MarshalObject(r, (*shadow)(&r)) } +func NewResponseComputerToolCallActionScreenshotParam() ResponseComputerToolCallActionScreenshotParam { + return ResponseComputerToolCallActionScreenshotParam{ + Type: "screenshot", + } +} + // A screenshot action. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewResponseComputerToolCallActionScreenshotParam]. type ResponseComputerToolCallActionScreenshotParam struct { // Specifies the event type. For a screenshot action, this property is always set // to `screenshot`. - // - // This field can be elided, and will marshal its zero value as "screenshot". Type constant.Screenshot `json:"type,required"` paramObj } @@ -2234,14 +2239,19 @@ func (r ResponseComputerToolCallActionTypeParam) MarshalJSON() (data []byte, err return param.MarshalObject(r, (*shadow)(&r)) } +func NewResponseComputerToolCallActionWaitParam() ResponseComputerToolCallActionWaitParam { + return ResponseComputerToolCallActionWaitParam{ + Type: "wait", + } +} + // A wait action. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewResponseComputerToolCallActionWaitParam]. type ResponseComputerToolCallActionWaitParam struct { // Specifies the event type. For a wait action, this property is always set to // `wait`. - // - // This field can be elided, and will marshal its zero value as "wait". Type constant.Wait `json:"type,required"` paramObj } diff --git a/shared/shared.go b/shared/shared.go index 7574a17..26d2f50 100644 --- a/shared/shared.go +++ b/shared/shared.go @@ -583,15 +583,20 @@ func (r ResponseFormatJSONObject) ToParam() ResponseFormatJSONObjectParam { return param.OverrideObj[ResponseFormatJSONObjectParam](r.RawJSON()) } +func NewResponseFormatJSONObjectParam() ResponseFormatJSONObjectParam { + return ResponseFormatJSONObjectParam{ + Type: "json_object", + } +} + // JSON object response format. An older method of generating JSON responses. Using // `json_schema` is recommended for models that support it. Note that the model // will not generate JSON without a system or user message instructing it to do so. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewResponseFormatJSONObjectParam]. type ResponseFormatJSONObjectParam struct { // The type of response format being defined. Always `json_object`. - // - // This field can be elided, and will marshal its zero value as "json_object". Type constant.JSONObject `json:"type,required"` paramObj } @@ -758,13 +763,18 @@ func (r ResponseFormatText) ToParam() ResponseFormatTextParam { return param.OverrideObj[ResponseFormatTextParam](r.RawJSON()) } +func NewResponseFormatTextParam() ResponseFormatTextParam { + return ResponseFormatTextParam{ + Type: "text", + } +} + // Default response format. Used to generate text responses. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewResponseFormatTextParam]. type ResponseFormatTextParam struct { // The type of response format being defined. Always `text`. - // - // This field can be elided, and will marshal its zero value as "text". Type constant.Text `json:"type,required"` paramObj } diff --git a/vectorstore.go b/vectorstore.go index 50fc476..ede9651 100644 --- a/vectorstore.go +++ b/vectorstore.go @@ -146,14 +146,19 @@ func (r *VectorStoreService) SearchAutoPaging(ctx context.Context, vectorStoreID return pagination.NewPageAutoPager(r.Search(ctx, vectorStoreID, body, opts...)) } +func NewAutoFileChunkingStrategyParam() AutoFileChunkingStrategyParam { + return AutoFileChunkingStrategyParam{ + Type: "auto", + } +} + // The default strategy. This strategy currently uses a `max_chunk_size_tokens` of // `800` and `chunk_overlap_tokens` of `400`. // -// The property Type is required. +// This struct has a constant value, construct it with +// [NewAutoFileChunkingStrategyParam]. type AutoFileChunkingStrategyParam struct { // Always `auto`. - // - // This field can be elided, and will marshal its zero value as "auto". Type constant.Auto `json:"type,required"` paramObj }