| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| package models |
|
|
| import "encoding/json" |
|
|
| |
| type ResponseRequest struct { |
| Model string `json:"model" binding:"required"` |
| Input json.RawMessage `json:"input,omitempty"` |
| Instructions json.RawMessage `json:"instructions,omitempty"` |
| Stream bool `json:"stream,omitempty"` |
| Tools []map[string]interface{} `json:"tools,omitempty"` |
| ToolChoice json.RawMessage `json:"tool_choice,omitempty"` |
| Temperature *float64 `json:"temperature,omitempty"` |
| TopP *float64 `json:"top_p,omitempty"` |
| MaxOutputTokens *int `json:"max_output_tokens,omitempty"` |
| User *string `json:"user,omitempty"` |
| PreviousResponseID *string `json:"previous_response_id,omitempty"` |
| Store *bool `json:"store,omitempty"` |
| Metadata map[string]string `json:"metadata,omitempty"` |
| ParallelToolCalls *bool `json:"parallel_tool_calls,omitempty"` |
| Text json.RawMessage `json:"text,omitempty"` |
| Reasoning json.RawMessage `json:"reasoning,omitempty"` |
| MaxToolCalls *int `json:"max_tool_calls,omitempty"` |
| Background *bool `json:"background,omitempty"` |
| Conversation json.RawMessage `json:"conversation,omitempty"` |
| Truncation string `json:"truncation,omitempty"` |
| } |
|
|
| |
| type Response struct { |
| ID string `json:"id"` |
| Object string `json:"object"` |
| CreatedAt int64 `json:"created_at"` |
| Status string `json:"status"` |
| CompletedAt *int64 `json:"completed_at,omitempty"` |
| Background *bool `json:"background,omitempty"` |
| Error *ResponseError `json:"error,omitempty"` |
| IncompleteDetails *ResponseIncompleteInfo `json:"incomplete_details,omitempty"` |
| Instructions interface{} `json:"instructions,omitempty"` |
| MaxOutputTokens *int `json:"max_output_tokens,omitempty"` |
| MaxToolCalls *int `json:"max_tool_calls,omitempty"` |
| Model string `json:"model"` |
| Output []interface{} `json:"output"` |
| OutputText string `json:"output_text,omitempty"` |
| ParallelToolCalls bool `json:"parallel_tool_calls,omitempty"` |
| PreviousResponseID *string `json:"previous_response_id,omitempty"` |
| Reasoning *ResponseReasoning `json:"reasoning,omitempty"` |
| Store *bool `json:"store,omitempty"` |
| Temperature *float64 `json:"temperature,omitempty"` |
| Text interface{} `json:"text,omitempty"` |
| ToolChoice interface{} `json:"tool_choice,omitempty"` |
| Tools []map[string]interface{} `json:"tools,omitempty"` |
| TopP *float64 `json:"top_p,omitempty"` |
| Truncation string `json:"truncation,omitempty"` |
| Usage *ResponseUsage `json:"usage,omitempty"` |
| User *string `json:"user,omitempty"` |
| Metadata map[string]string `json:"metadata,omitempty"` |
| } |
|
|
| |
| type ResponseError struct { |
| Message string `json:"message"` |
| Type string `json:"type,omitempty"` |
| Code string `json:"code,omitempty"` |
| } |
|
|
| |
| type ResponseIncompleteInfo struct { |
| Reason string `json:"reason,omitempty"` |
| } |
|
|
| |
| type ResponseReasoning struct { |
| Effort *string `json:"effort,omitempty"` |
| Summary interface{} `json:"summary,omitempty"` |
| } |
|
|
| |
| type ResponseUsage struct { |
| InputTokens int `json:"input_tokens"` |
| OutputTokens int `json:"output_tokens"` |
| TotalTokens int `json:"total_tokens"` |
| OutputTokensDetails *ResponseOutputTokensDetails `json:"output_tokens_details,omitempty"` |
| } |
|
|
| |
| type ResponseOutputTokensDetails struct { |
| ReasoningTokens int `json:"reasoning_tokens,omitempty"` |
| } |
|
|
| |
| type ResponseOutputTextContent struct { |
| Type string `json:"type"` |
| Text string `json:"text"` |
| Annotations []interface{} `json:"annotations,omitempty"` |
| Logprobs []interface{} `json:"logprobs,omitempty"` |
| } |
|
|
| |
| type ResponseOutputMessage struct { |
| ID string `json:"id"` |
| Type string `json:"type"` |
| Status string `json:"status,omitempty"` |
| Role string `json:"role"` |
| Content []ResponseOutputTextContent `json:"content"` |
| } |
|
|
| |
| type ResponseFunctionCall struct { |
| ID string `json:"id"` |
| Type string `json:"type"` |
| Status string `json:"status,omitempty"` |
| CallID string `json:"call_id"` |
| Name string `json:"name"` |
| Arguments string `json:"arguments"` |
| } |
|
|
| |
| type ResponseApplyPatchCall struct { |
| ID string `json:"id"` |
| Type string `json:"type"` |
| Status string `json:"status,omitempty"` |
| CallID string `json:"call_id"` |
| Operation map[string]interface{} `json:"operation"` |
| } |
|
|
| |
| type ResponseShellCall struct { |
| ID string `json:"id"` |
| Type string `json:"type"` |
| Status string `json:"status,omitempty"` |
| CallID string `json:"call_id"` |
| Action map[string]interface{} `json:"action"` |
| Environment interface{} `json:"environment,omitempty"` |
| } |
|
|
| |
| type ResponseLocalShellCall struct { |
| ID string `json:"id"` |
| Type string `json:"type"` |
| Status string `json:"status,omitempty"` |
| CallID string `json:"call_id"` |
| Action map[string]interface{} `json:"action"` |
| } |
|
|