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
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CitationType } from "./CitationType";

export type RequestLocationCitation = { cited_text: string, document_index: bigint | null, document_title: string | null, end_char_index: bigint | null, start_char_index: bigint | null, type: CitationType, end_page_number: bigint | null, start_page_number: bigint | null, end_block_index: bigint | null, start_block_index: bigint | null, encrypted_index: string | null, title: string | null, url: string | null, search_result_index: bigint | null, source: string | null, };
export type RequestLocationCitation = {
/**
* The full text of the cited block range, concatenated.
*
* Always equals the contents of `content[start_block_index:end_block_index]` joined
* together. The text block is the minimal citable unit; this field is never a substring of
* a single block. Not counted toward output tokens, and not counted toward input tokens
* when sent back in subsequent turns.
*/
cited_text: string, document_index: bigint | null, document_title: string | null, end_char_index: bigint | null, start_char_index: bigint | null, type: CitationType, end_page_number: bigint | null, start_page_number: bigint | null,
/**
* Exclusive 0-based end index of the cited block range in the source's `content` array.
*
* Always greater than `start_block_index`; a single-block citation has `end_block_index =
* start_block_index + 1`.
*/
end_block_index: bigint | null,
/**
* 0-based index of the first cited block in the source's `content` array.
*/
start_block_index: bigint | null, encrypted_index: string | null, title: string | null, url: string | null,
/**
* 0-based index of the cited search result among all `search_result` content blocks in the
* request, in the order they appear across messages and tool results.
*
* Counted separately from `document_index`; server-side web search results are not included
* in this count.
*/
search_result_index: bigint | null, source: string | null, };
5 changes: 4 additions & 1 deletion bindings/typescript/src/generated/google/FunctionResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ parts: Array<FunctionResponsePart> | null,
* Required. The function response in JSON object format. Callers can use any keys of their
* choice that fit the function's syntax to return the function output, e.g. "output",
* "result", etc. In particular, if the function call failed to execute, the response can
* have an "error" key to return error details to the model.
* have an "error" key to return error details to the model. Multimedia can be included by
* using a subobject containing a single "$ref" key whose value is the
* `inline_data.display_name` of a `FunctionResponsePart` holding the multimedia. See
* https://ai.google.dev/gemini-api/docs/function-calling#multimodal.
*/
response: unknown,
/**
Expand Down
3 changes: 3 additions & 0 deletions bindings/typescript/src/generated/openai/ActionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
* The action type.
*
*
* The action type. Always `open_page`.
*
*
* The type of the local shell action. Always `exec`.
*/
export type ActionType = "click" | "double_click" | "drag" | "exec" | "find_in_page" | "keypress" | "move" | "open_page" | "screenshot" | "scroll" | "search" | "type" | "wait";
5 changes: 5 additions & 0 deletions bindings/typescript/src/generated/openai/InputItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ import type { ToolSearchExecutionType } from "./ToolSearchExecutionType";
* A call to a custom tool created by the model.
*
*
* Compacts the current context. Must be the final input item.
*
* An internal identifier for an item to reference.
*/
export type InputItem = {
Expand Down Expand Up @@ -208,6 +210,9 @@ role: InputItemRole | null,
*
*
* The type of the custom tool call. Always `custom_tool_call`.
*
*
* The type of the item. Always `compaction_trigger`.
*/
type: InputItemType | null,
/**
Expand Down
3 changes: 3 additions & 0 deletions bindings/typescript/src/generated/openai/InputItemAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ keys: Array<string> | null,
* The action type.
*
*
* The action type. Always `open_page`.
*
*
* The type of the local shell action. Always `exec`.
*/
type: ActionType | null,
Expand Down
14 changes: 10 additions & 4 deletions bindings/typescript/src/generated/openai/InputItemTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import type { Quality } from "./Quality";
import type { RankingOptions } from "./RankingOptions";
import type { RequireApproval } from "./RequireApproval";
import type { SearchContentType } from "./SearchContentType";
import type { Size } from "./Size";
import type { ToolFormat } from "./ToolFormat";
import type { ToolSearchExecutionType } from "./ToolSearchExecutionType";
import type { ToolType } from "./ToolType";
Expand Down Expand Up @@ -254,10 +253,17 @@ partial_images: bigint | null,
*/
quality: Quality | null,
/**
* The size of the generated image. One of `1024x1024`, `1024x1536`,
* `1536x1024`, or `auto`. Default: `auto`.
* The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`,
* arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
* Width and height must both be divisible by 16 and the requested aspect ratio must be
* between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum
* supported resolution is `3840x2160`. The requested size must also satisfy the model's
* current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and
* `1024x1536` are supported by the GPT image models; `auto` is supported for models that
* allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`.
* For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.
*/
size: Size | null,
size: string | null,
/**
* The input format for the custom tool. Default is unconstrained text.
*/
Expand Down
4 changes: 3 additions & 1 deletion bindings/typescript/src/generated/openai/InputItemType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
* The type of the custom tool call. Always `custom_tool_call`.
*
*
* The type of the item. Always `compaction_trigger`.
*
* The type of item to reference. Always `item_reference`.
*/
export type InputItemType = "apply_patch_call" | "apply_patch_call_output" | "code_interpreter_call" | "compaction" | "computer_call" | "computer_call_output" | "custom_tool_call" | "custom_tool_call_output" | "file_search_call" | "function_call" | "function_call_output" | "image_generation_call" | "item_reference" | "local_shell_call" | "local_shell_call_output" | "mcp_approval_request" | "mcp_approval_response" | "mcp_call" | "mcp_list_tools" | "message" | "reasoning" | "shell_call" | "shell_call_output" | "tool_search_call" | "tool_search_output" | "web_search_call";
export type InputItemType = "apply_patch_call" | "apply_patch_call_output" | "code_interpreter_call" | "compaction" | "compaction_trigger" | "computer_call" | "computer_call_output" | "custom_tool_call" | "custom_tool_call_output" | "file_search_call" | "function_call" | "function_call_output" | "image_generation_call" | "item_reference" | "local_shell_call" | "local_shell_call_output" | "mcp_approval_request" | "mcp_approval_response" | "mcp_call" | "mcp_list_tools" | "message" | "reasoning" | "shell_call" | "shell_call_output" | "tool_search_call" | "tool_search_output" | "web_search_call";
32 changes: 32 additions & 0 deletions crates/lingua/src/providers/anthropic/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ pub enum Citations {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
#[ts(export_to = "anthropic/")]
pub struct RequestLocationCitation {
/// The full text of the cited block range, concatenated.
///
/// Always equals the contents of `content[start_block_index:end_block_index]` joined
/// together. The text block is the minimal citable unit; this field is never a substring of
/// a single block. Not counted toward output tokens, and not counted toward input tokens
/// when sent back in subsequent turns.
pub cited_text: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub document_index: Option<i64>,
Expand All @@ -434,8 +440,13 @@ pub struct RequestLocationCitation {
pub end_page_number: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub start_page_number: Option<i64>,
/// Exclusive 0-based end index of the cited block range in the source's `content` array.
///
/// Always greater than `start_block_index`; a single-block citation has `end_block_index =
/// start_block_index + 1`.
#[serde(skip_serializing_if = "Option::is_none")]
pub end_block_index: Option<i64>,
/// 0-based index of the first cited block in the source's `content` array.
#[serde(skip_serializing_if = "Option::is_none")]
pub start_block_index: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -444,6 +455,11 @@ pub struct RequestLocationCitation {
pub title: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// 0-based index of the cited search result among all `search_result` content blocks in the
/// request, in the order they appear across messages and tool results.
///
/// Counted separately from `document_index`; server-side web search results are not included
/// in this count.
#[serde(skip_serializing_if = "Option::is_none")]
pub search_result_index: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -1809,6 +1825,12 @@ pub struct ContentBlock {
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]
#[ts(export_to = "anthropic/")]
pub struct ResponseLocationCitation {
/// The full text of the cited block range, concatenated.
///
/// Always equals the contents of `content[start_block_index:end_block_index]` joined
/// together. The text block is the minimal citable unit; this field is never a substring of
/// a single block. Not counted toward output tokens, and not counted toward input tokens
/// when sent back in subsequent turns.
pub cited_text: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub document_index: Option<i64>,
Expand All @@ -1826,8 +1848,13 @@ pub struct ResponseLocationCitation {
pub end_page_number: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub start_page_number: Option<i64>,
/// Exclusive 0-based end index of the cited block range in the source's `content` array.
///
/// Always greater than `start_block_index`; a single-block citation has `end_block_index =
/// start_block_index + 1`.
#[serde(skip_serializing_if = "Option::is_none")]
pub end_block_index: Option<i64>,
/// 0-based index of the first cited block in the source's `content` array.
#[serde(skip_serializing_if = "Option::is_none")]
pub start_block_index: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand All @@ -1836,6 +1863,11 @@ pub struct ResponseLocationCitation {
pub title: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// 0-based index of the cited search result among all `search_result` content blocks in the
/// request, in the order they appear across messages and tool results.
///
/// Counted separately from `document_index`; server-side web search results are not included
/// in this count.
#[serde(skip_serializing_if = "Option::is_none")]
pub search_result_index: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
Loading
Loading