Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .castiron.stats.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
schema_version: 1
generation_id: d1408dd9-9fc1-448f-8241-6aef0534e244
openapi_spec_hash: 134c119262ce50017727a300b0106882
openapi_transformed_spec_hash: b5602cf76f35aea5b689f2439368863b
generation_id: 374b2605-c0fb-47ec-8751-b55b29e1dab4
openapi_spec_hash: fd66f1b55a7b5e3f8e7331bb0bd0febb
openapi_transformed_spec_hash: 79a17820b39aac110d9207c90d19966c
config_hash: adfe6b936328bd198d9442c21c42383b
codegen_sha: a3c6c909393aec81c33f5001d5afbd157596a838
codegen_hash: d3486c711958cf5d4f9fbed196ae4718ad568c00ec74ef3f9f8f5e6cdda376c9
public_codegen_sha: c29cf7f6b2c6fb1452bfb4c1ef1c106b4570a155
codegen_sha: 6f0f42de4317505ef496cc9032dddbfe5bdf993d
codegen_hash: 1119dd81bb211845bebb460287cac844467a00519dd09e9dead3693bd0c95fd9
public_codegen_sha: 561382381cc7fa8b74939c4d3fa85393f9edc96e
19 changes: 12 additions & 7 deletions api_reference/openapi.transformed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30102,7 +30102,7 @@ paths:
description: |-
Use this endpoint to ask classification or scoring questions about the same input. You’ll get the answers back in the order you asked the questions.

For text, you can pass a string. You can also send user messages containing `input_text` and `input_image` parts, with up to 128 images per request. Images must be data URLs; external URLs and file IDs aren’t accepted. Other message roles, function calls, files, audio, and item references aren’t supported.
For text, you can pass a string. You can also send user messages containing `input_text` and `input_image` parts, with up to 128 images per request. Images can be base64 data URLs or publicly accessible HTTP(S) URLs. File IDs aren’t accepted. Other message roles, function calls, files, audio, and item references aren’t supported.

Sometimes a question returns a refusal instead of an answer. The result has type `refusal` and includes the question’s name, or `null` if you didn’t give it one.
tags:
Expand Down Expand Up @@ -78416,6 +78416,11 @@ components:
- type: string
description: A customer-safe description derived from error_type, or null for zero data retention requests.
- type: 'null'
detailed_explanation:
anyOf:
- type: string
description: A generated explanation, temporarily available for eligible zero data retention alerts. Omitted when unavailable.
- type: 'null'
type: object
required:
- id
Expand Down Expand Up @@ -80903,8 +80908,8 @@ components:
type: string
minLength: 0
maxLength: 1073741824
pattern: '^data:'
description: A base64-encoded image in a data URL.
pattern: ^(data:|https?://)
description: A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
detail:
anyOf:
- $ref: '#/components/schemas/ImageDetailParam'
Expand All @@ -80921,7 +80926,7 @@ components:
- image_url
- type
additionalProperties: false
description: An inline image. External URLs and file IDs are not supported.
description: An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
DecisionInputContentParts:
type: array
items:
Expand All @@ -80939,7 +80944,7 @@ components:
minItems: 0
maxItems: 16384
DecisionInputContent:
description: Text evidence or an ordered list of text and inline image parts.
description: Text evidence or an ordered list of text and image parts.
anyOf:
- type: string
minLength: 0
Expand Down Expand Up @@ -80967,9 +80972,9 @@ components:
- role
- content
additionalProperties: false
description: A user message containing text or inline images.
description: A user message containing text or images.
DecisionInput:
description: The text or images to evaluate for every question. Provide a text string or user messages containing text and inline images. Images must be inline data URLs; at most 128 images are allowed across all messages in one request. External URLs, files, audio, tools, and item references are not supported.
description: The text or images to evaluate for every question. Provide a text string or user messages containing text and images. Images can be base64 data URLs or publicly accessible HTTP(S) URLs; at most 128 images are allowed across all messages in one request. Files, audio, tools, and item references are not supported.
anyOf:
- type: string
minLength: 0
Expand Down
23 changes: 13 additions & 10 deletions src/resources/decisions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export class Decisions extends APIResource {
*
* For text, you can pass a string. You can also send user messages containing
* `input_text` and `input_image` parts, with up to 128 images per request. Images
* must be data URLs; external URLs and file IDs aren’t accepted. Other message
* roles, function calls, files, audio, and item references aren’t supported.
* can be base64 data URLs or publicly accessible HTTP(S) URLs. File IDs aren’t
* accepted. Other message roles, function calls, files, audio, and item references
* aren’t supported.
*
* Sometimes a question returns a refusal instead of an answer. The result has type
* `refusal` and includes the question’s name, or `null` if you didn’t give it one.
Expand Down Expand Up @@ -154,11 +155,12 @@ export namespace Decision {
}

/**
* An inline image. External URLs and file IDs are not supported.
* An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
* File IDs are not supported.
*/
export interface DecisionInputImage {
/**
* A base64-encoded image in a data URL.
* A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.
*/
image_url: string;

Expand All @@ -172,11 +174,11 @@ export interface DecisionInputImage {
}

/**
* A user message containing text or inline images.
* A user message containing text or images.
*/
export interface DecisionInputMessage {
/**
* Text evidence or an ordered list of text and inline image parts.
* Text evidence or an ordered list of text and image parts.
*/
content: string | Array<DecisionInputPart>;

Expand All @@ -186,7 +188,8 @@ export interface DecisionInputMessage {
}

/**
* An inline image. External URLs and file IDs are not supported.
* An image provided as a base64 data URL or a publicly accessible HTTP(S) URL.
* File IDs are not supported.
*/
export type DecisionInputPart = DecisionInputText | DecisionInputImage;

Expand All @@ -199,9 +202,9 @@ export interface DecisionInputText {
export interface DecisionCreateParams {
/**
* The text or images to evaluate for every question. Provide a text string or user
* messages containing text and inline images. Images must be inline data URLs; at
* most 128 images are allowed across all messages in one request. External URLs,
* files, audio, tools, and item references are not supported.
* messages containing text and images. Images can be base64 data URLs or publicly
* accessible HTTP(S) URLs; at most 128 images are allowed across all messages in
* one request. Files, audio, tools, and item references are not supported.
*/
input: string | Array<DecisionInputMessage>;

Expand Down
6 changes: 6 additions & 0 deletions src/resources/safety/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export interface SafetyAlert {
request_paused: boolean;

response_id: string;

/**
* A generated explanation, temporarily available for eligible zero data retention
* alerts. Omitted when unavailable.
*/
detailed_explanation?: string | null;
}

export declare namespace Alerts {
Expand Down
Loading