mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
900 lines
25 KiB
Go
900 lines
25 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the AiResponsesResource type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiResponsesResource{}
|
|
|
|
// AiResponsesResource struct for AiResponsesResource
|
|
type AiResponsesResource struct {
|
|
CreatedAt *int32 `json:"created_at,omitempty"`
|
|
Error interface{} `json:"error,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
IncompleteDetails interface{} `json:"incomplete_details,omitempty"`
|
|
Instructions *string `json:"instructions,omitempty"`
|
|
MaxOutputTokens *int32 `json:"max_output_tokens,omitempty"`
|
|
Metadata map[string]string `json:"metadata,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
Object *string `json:"object,omitempty"`
|
|
Output []interface{} `json:"output,omitempty"`
|
|
ParallelToolCalls *bool `json:"parallel_tool_calls,omitempty"`
|
|
PreviousResponseId interface{} `json:"previous_response_id,omitempty"`
|
|
Reasoning interface{} `json:"reasoning,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
Store *bool `json:"store,omitempty"`
|
|
Temperature *float32 `json:"temperature,omitempty"`
|
|
Text interface{} `json:"text,omitempty"`
|
|
ToolChoice interface{} `json:"tool_choice,omitempty"`
|
|
Tools []AiResponsesTool `json:"tools,omitempty"`
|
|
TopP *float32 `json:"top_p,omitempty"`
|
|
Usage *AiResponsesUsage `json:"usage,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiResponsesResource AiResponsesResource
|
|
|
|
// NewAiResponsesResource instantiates a new AiResponsesResource object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewAiResponsesResource() *AiResponsesResource {
|
|
this := AiResponsesResource{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiResponsesResourceWithDefaults instantiates a new AiResponsesResource object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewAiResponsesResourceWithDefaults() *AiResponsesResource {
|
|
this := AiResponsesResource{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetCreatedAt() int32 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetCreatedAtOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int32 and assigns it to the CreatedAt field.
|
|
func (o *AiResponsesResource) SetCreatedAt(v int32) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetError() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetErrorOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return &o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given interface{} and assigns it to the Error field.
|
|
func (o *AiResponsesResource) SetError(v interface{}) {
|
|
o.Error = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *AiResponsesResource) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetIncompleteDetails returns the IncompleteDetails field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetIncompleteDetails() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.IncompleteDetails
|
|
}
|
|
|
|
// GetIncompleteDetailsOk returns a tuple with the IncompleteDetails field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetIncompleteDetailsOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.IncompleteDetails) {
|
|
return nil, false
|
|
}
|
|
return &o.IncompleteDetails, true
|
|
}
|
|
|
|
// HasIncompleteDetails returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasIncompleteDetails() bool {
|
|
if o != nil && !IsNil(o.IncompleteDetails) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIncompleteDetails gets a reference to the given interface{} and assigns it to the IncompleteDetails field.
|
|
func (o *AiResponsesResource) SetIncompleteDetails(v interface{}) {
|
|
o.IncompleteDetails = v
|
|
}
|
|
|
|
// GetInstructions returns the Instructions field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetInstructions() string {
|
|
if o == nil || IsNil(o.Instructions) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Instructions
|
|
}
|
|
|
|
// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetInstructionsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Instructions) {
|
|
return nil, false
|
|
}
|
|
return o.Instructions, true
|
|
}
|
|
|
|
// HasInstructions returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasInstructions() bool {
|
|
if o != nil && !IsNil(o.Instructions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInstructions gets a reference to the given string and assigns it to the Instructions field.
|
|
func (o *AiResponsesResource) SetInstructions(v string) {
|
|
o.Instructions = &v
|
|
}
|
|
|
|
// GetMaxOutputTokens returns the MaxOutputTokens field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetMaxOutputTokens() int32 {
|
|
if o == nil || IsNil(o.MaxOutputTokens) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.MaxOutputTokens
|
|
}
|
|
|
|
// GetMaxOutputTokensOk returns a tuple with the MaxOutputTokens field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetMaxOutputTokensOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.MaxOutputTokens) {
|
|
return nil, false
|
|
}
|
|
return o.MaxOutputTokens, true
|
|
}
|
|
|
|
// HasMaxOutputTokens returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasMaxOutputTokens() bool {
|
|
if o != nil && !IsNil(o.MaxOutputTokens) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxOutputTokens gets a reference to the given int32 and assigns it to the MaxOutputTokens field.
|
|
func (o *AiResponsesResource) SetMaxOutputTokens(v int32) {
|
|
o.MaxOutputTokens = &v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetMetadata() map[string]string {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetMetadataOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Metadata, true
|
|
}
|
|
|
|
// HasMetadata returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasMetadata() bool {
|
|
if o != nil && !IsNil(o.Metadata) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
|
|
func (o *AiResponsesResource) SetMetadata(v map[string]string) {
|
|
o.Metadata = v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *AiResponsesResource) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetObject returns the Object field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetObject() string {
|
|
if o == nil || IsNil(o.Object) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Object
|
|
}
|
|
|
|
// GetObjectOk returns a tuple with the Object field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetObjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Object) {
|
|
return nil, false
|
|
}
|
|
return o.Object, true
|
|
}
|
|
|
|
// HasObject returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasObject() bool {
|
|
if o != nil && !IsNil(o.Object) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetObject gets a reference to the given string and assigns it to the Object field.
|
|
func (o *AiResponsesResource) SetObject(v string) {
|
|
o.Object = &v
|
|
}
|
|
|
|
// GetOutput returns the Output field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetOutput() []interface{} {
|
|
if o == nil || IsNil(o.Output) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Output
|
|
}
|
|
|
|
// GetOutputOk returns a tuple with the Output field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetOutputOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Output) {
|
|
return nil, false
|
|
}
|
|
return o.Output, true
|
|
}
|
|
|
|
// HasOutput returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasOutput() bool {
|
|
if o != nil && !IsNil(o.Output) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOutput gets a reference to the given []interface{} and assigns it to the Output field.
|
|
func (o *AiResponsesResource) SetOutput(v []interface{}) {
|
|
o.Output = v
|
|
}
|
|
|
|
// GetParallelToolCalls returns the ParallelToolCalls field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetParallelToolCalls() bool {
|
|
if o == nil || IsNil(o.ParallelToolCalls) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.ParallelToolCalls
|
|
}
|
|
|
|
// GetParallelToolCallsOk returns a tuple with the ParallelToolCalls field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetParallelToolCallsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.ParallelToolCalls) {
|
|
return nil, false
|
|
}
|
|
return o.ParallelToolCalls, true
|
|
}
|
|
|
|
// HasParallelToolCalls returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasParallelToolCalls() bool {
|
|
if o != nil && !IsNil(o.ParallelToolCalls) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParallelToolCalls gets a reference to the given bool and assigns it to the ParallelToolCalls field.
|
|
func (o *AiResponsesResource) SetParallelToolCalls(v bool) {
|
|
o.ParallelToolCalls = &v
|
|
}
|
|
|
|
// GetPreviousResponseId returns the PreviousResponseId field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetPreviousResponseId() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.PreviousResponseId
|
|
}
|
|
|
|
// GetPreviousResponseIdOk returns a tuple with the PreviousResponseId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetPreviousResponseIdOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.PreviousResponseId) {
|
|
return nil, false
|
|
}
|
|
return &o.PreviousResponseId, true
|
|
}
|
|
|
|
// HasPreviousResponseId returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasPreviousResponseId() bool {
|
|
if o != nil && !IsNil(o.PreviousResponseId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPreviousResponseId gets a reference to the given interface{} and assigns it to the PreviousResponseId field.
|
|
func (o *AiResponsesResource) SetPreviousResponseId(v interface{}) {
|
|
o.PreviousResponseId = v
|
|
}
|
|
|
|
// GetReasoning returns the Reasoning field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetReasoning() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Reasoning
|
|
}
|
|
|
|
// GetReasoningOk returns a tuple with the Reasoning field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetReasoningOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Reasoning) {
|
|
return nil, false
|
|
}
|
|
return &o.Reasoning, true
|
|
}
|
|
|
|
// HasReasoning returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasReasoning() bool {
|
|
if o != nil && !IsNil(o.Reasoning) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReasoning gets a reference to the given interface{} and assigns it to the Reasoning field.
|
|
func (o *AiResponsesResource) SetReasoning(v interface{}) {
|
|
o.Reasoning = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *AiResponsesResource) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetStore returns the Store field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetStore() bool {
|
|
if o == nil || IsNil(o.Store) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Store
|
|
}
|
|
|
|
// GetStoreOk returns a tuple with the Store field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetStoreOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Store) {
|
|
return nil, false
|
|
}
|
|
return o.Store, true
|
|
}
|
|
|
|
// HasStore returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasStore() bool {
|
|
if o != nil && !IsNil(o.Store) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStore gets a reference to the given bool and assigns it to the Store field.
|
|
func (o *AiResponsesResource) SetStore(v bool) {
|
|
o.Store = &v
|
|
}
|
|
|
|
// GetTemperature returns the Temperature field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetTemperature() float32 {
|
|
if o == nil || IsNil(o.Temperature) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.Temperature
|
|
}
|
|
|
|
// GetTemperatureOk returns a tuple with the Temperature field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetTemperatureOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.Temperature) {
|
|
return nil, false
|
|
}
|
|
return o.Temperature, true
|
|
}
|
|
|
|
// HasTemperature returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasTemperature() bool {
|
|
if o != nil && !IsNil(o.Temperature) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTemperature gets a reference to the given float32 and assigns it to the Temperature field.
|
|
func (o *AiResponsesResource) SetTemperature(v float32) {
|
|
o.Temperature = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetText() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetTextOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return &o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given interface{} and assigns it to the Text field.
|
|
func (o *AiResponsesResource) SetText(v interface{}) {
|
|
o.Text = v
|
|
}
|
|
|
|
// GetToolChoice returns the ToolChoice field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiResponsesResource) GetToolChoice() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.ToolChoice
|
|
}
|
|
|
|
// GetToolChoiceOk returns a tuple with the ToolChoice field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiResponsesResource) GetToolChoiceOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.ToolChoice) {
|
|
return nil, false
|
|
}
|
|
return &o.ToolChoice, true
|
|
}
|
|
|
|
// HasToolChoice returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasToolChoice() bool {
|
|
if o != nil && !IsNil(o.ToolChoice) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetToolChoice gets a reference to the given interface{} and assigns it to the ToolChoice field.
|
|
func (o *AiResponsesResource) SetToolChoice(v interface{}) {
|
|
o.ToolChoice = v
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetTools() []AiResponsesTool {
|
|
if o == nil || IsNil(o.Tools) {
|
|
var ret []AiResponsesTool
|
|
return ret
|
|
}
|
|
return o.Tools
|
|
}
|
|
|
|
// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetToolsOk() ([]AiResponsesTool, bool) {
|
|
if o == nil || IsNil(o.Tools) {
|
|
return nil, false
|
|
}
|
|
return o.Tools, true
|
|
}
|
|
|
|
// HasTools returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasTools() bool {
|
|
if o != nil && !IsNil(o.Tools) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTools gets a reference to the given []AiResponsesTool and assigns it to the Tools field.
|
|
func (o *AiResponsesResource) SetTools(v []AiResponsesTool) {
|
|
o.Tools = v
|
|
}
|
|
|
|
// GetTopP returns the TopP field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetTopP() float32 {
|
|
if o == nil || IsNil(o.TopP) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.TopP
|
|
}
|
|
|
|
// GetTopPOk returns a tuple with the TopP field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetTopPOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.TopP) {
|
|
return nil, false
|
|
}
|
|
return o.TopP, true
|
|
}
|
|
|
|
// HasTopP returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasTopP() bool {
|
|
if o != nil && !IsNil(o.TopP) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTopP gets a reference to the given float32 and assigns it to the TopP field.
|
|
func (o *AiResponsesResource) SetTopP(v float32) {
|
|
o.TopP = &v
|
|
}
|
|
|
|
// GetUsage returns the Usage field value if set, zero value otherwise.
|
|
func (o *AiResponsesResource) GetUsage() AiResponsesUsage {
|
|
if o == nil || IsNil(o.Usage) {
|
|
var ret AiResponsesUsage
|
|
return ret
|
|
}
|
|
return *o.Usage
|
|
}
|
|
|
|
// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiResponsesResource) GetUsageOk() (*AiResponsesUsage, bool) {
|
|
if o == nil || IsNil(o.Usage) {
|
|
return nil, false
|
|
}
|
|
return o.Usage, true
|
|
}
|
|
|
|
// HasUsage returns a boolean if a field has been set.
|
|
func (o *AiResponsesResource) HasUsage() bool {
|
|
if o != nil && !IsNil(o.Usage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUsage gets a reference to the given AiResponsesUsage and assigns it to the Usage field.
|
|
func (o *AiResponsesResource) SetUsage(v AiResponsesUsage) {
|
|
o.Usage = &v
|
|
}
|
|
|
|
func (o AiResponsesResource) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiResponsesResource) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["created_at"] = o.CreatedAt
|
|
}
|
|
if o.Error != nil {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if o.IncompleteDetails != nil {
|
|
toSerialize["incomplete_details"] = o.IncompleteDetails
|
|
}
|
|
if !IsNil(o.Instructions) {
|
|
toSerialize["instructions"] = o.Instructions
|
|
}
|
|
if !IsNil(o.MaxOutputTokens) {
|
|
toSerialize["max_output_tokens"] = o.MaxOutputTokens
|
|
}
|
|
if !IsNil(o.Metadata) {
|
|
toSerialize["metadata"] = o.Metadata
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Object) {
|
|
toSerialize["object"] = o.Object
|
|
}
|
|
if !IsNil(o.Output) {
|
|
toSerialize["output"] = o.Output
|
|
}
|
|
if !IsNil(o.ParallelToolCalls) {
|
|
toSerialize["parallel_tool_calls"] = o.ParallelToolCalls
|
|
}
|
|
if o.PreviousResponseId != nil {
|
|
toSerialize["previous_response_id"] = o.PreviousResponseId
|
|
}
|
|
if o.Reasoning != nil {
|
|
toSerialize["reasoning"] = o.Reasoning
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Store) {
|
|
toSerialize["store"] = o.Store
|
|
}
|
|
if !IsNil(o.Temperature) {
|
|
toSerialize["temperature"] = o.Temperature
|
|
}
|
|
if o.Text != nil {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
if o.ToolChoice != nil {
|
|
toSerialize["tool_choice"] = o.ToolChoice
|
|
}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
if !IsNil(o.TopP) {
|
|
toSerialize["top_p"] = o.TopP
|
|
}
|
|
if !IsNil(o.Usage) {
|
|
toSerialize["usage"] = o.Usage
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiResponsesResource) UnmarshalJSON(data []byte) (err error) {
|
|
varAiResponsesResource := _AiResponsesResource{}
|
|
|
|
err = json.Unmarshal(data, &varAiResponsesResource)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiResponsesResource(varAiResponsesResource)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "created_at")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "incomplete_details")
|
|
delete(additionalProperties, "instructions")
|
|
delete(additionalProperties, "max_output_tokens")
|
|
delete(additionalProperties, "metadata")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "object")
|
|
delete(additionalProperties, "output")
|
|
delete(additionalProperties, "parallel_tool_calls")
|
|
delete(additionalProperties, "previous_response_id")
|
|
delete(additionalProperties, "reasoning")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "store")
|
|
delete(additionalProperties, "temperature")
|
|
delete(additionalProperties, "text")
|
|
delete(additionalProperties, "tool_choice")
|
|
delete(additionalProperties, "tools")
|
|
delete(additionalProperties, "top_p")
|
|
delete(additionalProperties, "usage")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiResponsesResource struct {
|
|
value *AiResponsesResource
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiResponsesResource) Get() *AiResponsesResource {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiResponsesResource) Set(val *AiResponsesResource) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiResponsesResource) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiResponsesResource) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiResponsesResource(val *AiResponsesResource) *NullableAiResponsesResource {
|
|
return &NullableAiResponsesResource{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiResponsesResource) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiResponsesResource) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|