Skip to content
Open
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
52 changes: 31 additions & 21 deletions src/interactions/resources/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export class BaseInteractions extends APIResource {
}

/**
* Cancels an interaction by id. This only applies to background interactions that are still running.
* Cancels an interaction by id. This only applies to background interactions that
* are still running.
*
* @example
* ```ts
Expand All @@ -99,7 +100,8 @@ export class BaseInteractions extends APIResource {
}

/**
* Retrieves the full details of a single interaction based on its `Interaction.id`.
* Retrieves the full details of a single interaction based on its
* `Interaction.id`.
*
* @example
* ```ts
Expand Down Expand Up @@ -161,8 +163,8 @@ export interface Annotation {
end_index?: number;

/**
* Source attributed for a portion of the text. Could be a URL, title, or
* other identifier.
* Source attributed for a portion of the text. Could be a URL, title, or other
* identifier.
*/
source?: string;

Expand Down Expand Up @@ -1118,7 +1120,8 @@ export namespace MCPServerToolResultContent {
}

/**
* The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
* The model that will complete your prompt.\n\nSee
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
*/
export type Model =
| 'gemini-2.5-pro'
Expand Down Expand Up @@ -1262,8 +1265,7 @@ export namespace Tool {
name?: string;

/**
* The full URL for the MCPServer endpoint.
* Example: "https://api.example.com/mcp"
* The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
*/
url?: string;
}
Expand Down Expand Up @@ -1312,8 +1314,7 @@ export interface Turn {
content?: string | Array<Content>;

/**
* The originator of this turn. Must be user for input or model for
* model output.
* The originator of this turn. Must be user for input or model for model output.
*/
role?: string;
}
Expand Down Expand Up @@ -1601,13 +1602,14 @@ export interface BaseCreateModelInteractionParams {
previous_interaction_id?: string;

/**
* Body param: Enforces that the generated response is a JSON object that complies with
* the JSON schema specified in this field.
* Body param: Enforces that the generated response is a JSON object that complies
* with the JSON schema specified in this field.
*/
response_format?: unknown;

/**
* Body param: The mime type of the response. This is required if response_format is set.
* Body param: The mime type of the response. This is required if response_format
* is set.
*/
response_mime_type?: string;

Expand All @@ -1617,7 +1619,8 @@ export interface BaseCreateModelInteractionParams {
response_modalities?: Array<'text' | 'image' | 'audio'>;

/**
* Body param: Input only. Whether to store the response and request for later retrieval.
* Body param: Input only. Whether to store the response and request for later
* retrieval.
*/
store?: boolean;

Expand Down Expand Up @@ -1689,13 +1692,14 @@ export interface BaseCreateAgentInteractionParams {
previous_interaction_id?: string;

/**
* Body param: Enforces that the generated response is a JSON object that complies with
* the JSON schema specified in this field.
* Body param: Enforces that the generated response is a JSON object that complies
* with the JSON schema specified in this field.
*/
response_format?: unknown;

/**
* Body param: The mime type of the response. This is required if response_format is set.
* Body param: The mime type of the response. This is required if response_format
* is set.
*/
response_mime_type?: string;

Expand All @@ -1705,7 +1709,8 @@ export interface BaseCreateAgentInteractionParams {
response_modalities?: Array<'text' | 'image' | 'audio'>;

/**
* Body param: Input only. Whether to store the response and request for later retrieval.
* Body param: Input only. Whether to store the response and request for later
* retrieval.
*/
store?: boolean;

Expand Down Expand Up @@ -1776,12 +1781,15 @@ export interface InteractionGetParamsBase {
api_version?: string;

/**
* Query param: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
* Query param: Optional. If set, resumes the interaction stream from the next
* chunk after the event marked by the event id. Can only be used if `stream` is
* true.
*/
last_event_id?: string;

/**
* Query param: If set to true, the generated content will be streamed incrementally.
* Query param: If set to true, the generated content will be streamed
* incrementally.
*/
stream?: boolean;
}
Expand All @@ -1793,14 +1801,16 @@ export namespace InteractionGetParams {

export interface InteractionGetParamsNonStreaming extends InteractionGetParamsBase {
/**
* Query param: If set to true, the generated content will be streamed incrementally.
* Query param: If set to true, the generated content will be streamed
* incrementally.
*/
stream?: false;
}

export interface InteractionGetParamsStreaming extends InteractionGetParamsBase {
/**
* Query param: If set to true, the generated content will be streamed incrementally.
* Query param: If set to true, the generated content will be streamed
* incrementally.
*/
stream: true;
}
Expand Down
Loading