OpenResponsesResult - Go SDK
OpenResponsesResult - Go SDK
OpenResponsesResult type definition
The Go SDK and docs are currently in beta. Report issues on GitHub.
Complete non-streaming response from the Responses API
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
Background | optionalnullable.OptionalNullable[bool] | ➖ | N/A | |
CompletedAt | *int64 | ✔️ | N/A | |
CreatedAt | int64 | ✔️ | N/A | |
Error | *components.ResponsesErrorField | ✔️ | Error information returned from the API | {"code": "rate_limit_exceeded","message": "Rate limit exceeded. Please try again later."} |
FrequencyPenalty | *float64 | ✔️ | N/A | |
ID | string | ✔️ | N/A | |
IncompleteDetails | *components.IncompleteDetails | ✔️ | N/A | {"reason": "max_output_tokens"} |
Instructions | *components.BaseInputsUnion | ✔️ | N/A | [{"content": "What is the weather today?","role": "user"}] |
MaxOutputTokens | optionalnullable.OptionalNullable[int64] | ➖ | N/A | |
MaxToolCalls | optionalnullable.OptionalNullable[int64] | ➖ | N/A | |
Metadata | map[string]string | ✔️ | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | {"session_id": "abc-def-ghi","user_id": "123"} |
Model | string | ✔️ | N/A | |
Object | components.OpenResponsesResultObject | ✔️ | N/A | |
Output | []components.OutputItems | ✔️ | N/A | |
OutputText | *string | ➖ | N/A | |
ParallelToolCalls | bool | ✔️ | N/A | |
PresencePenalty | *float64 | ✔️ | N/A | |
PreviousResponseID | optionalnullable.OptionalNullable[string] | ➖ | N/A | |
Prompt | optionalnullable.OptionalNullable[components.StoredPromptTemplate] | ➖ | N/A | {"id": "prompt-abc123","variables": {"name": "John"}} |
PromptCacheKey | optionalnullable.OptionalNullable[string] | ➖ | N/A | |
Reasoning | optionalnullable.OptionalNullable[components.BaseReasoningConfig] | ➖ | N/A | {"effort": "medium","summary": "auto"} |
SafetyIdentifier | optionalnullable.OptionalNullable[string] | ➖ | N/A | |
ServiceTier | optionalnullable.OptionalNullable[string] | ➖ | N/A | |
Status | components.OpenAIResponsesResponseStatus | ✔️ | N/A | completed |
Store | *bool | ➖ | N/A | |
Temperature | *float64 | ✔️ | N/A | |
Text | *components.TextExtendedConfig | ➖ | Text output configuration including format and verbosity | {"format": {"type": "text"}} |
ToolChoice | components.OpenAIResponsesToolChoiceUnion | ✔️ | N/A | auto |
Tools | []components.OpenResponsesResultToolUnion | ✔️ | N/A | |
TopLogprobs | *int64 | ➖ | N/A | |
TopP | *float64 | ✔️ | N/A | |
Truncation | optionalnullable.OptionalNullable[components.Truncation] | ➖ | N/A | auto |
Usage | optionalnullable.OptionalNullable[components.Usage] | ➖ | Token usage information for the response | {"cost": 0.0012,"cost_details": {"upstream_inference_cost": null,"upstream_inference_input_cost": 0.0008,"upstream_inference_output_cost": 0.0004},“input_tokens”: 10, “input_tokens_details”: {"cached_tokens": 0},“output_tokens”: 25, “output_tokens_details”: {"reasoning_tokens": 0},“total_tokens”: 35<br />} |
User | optionalnullable.OptionalNullable[string] | ➖ | N/A | |
OpenrouterMetadata | *components.OpenRouterMetadata | ➖ | N/A | {"attempt": 1,"endpoints": {"available": [{"model": "openai/gpt-4o","provider": "OpenAI","selected": true}], “total”: 1<br />},“is_byok”: false, “region”: “iad”, “requested”: “openai/gpt-4o”, “strategy”: “direct”, “summary”: “available=1, selected=OpenAI” } |