From c8161dc95a3ee46dbee607d58239ff018a7d42c5 Mon Sep 17 00:00:00 2001 From: CLowbrow <647504+CLowbrow@users.noreply.github.com> Date: Mon, 31 Aug 2026 17:57:59 +0000 Subject: [PATCH] Update openai provider types --- .../lingua/src/providers/openai/generated.rs | 6 + specs/openai/openapi.yml | 138 +++++++----------- 2 files changed, 60 insertions(+), 84 deletions(-) diff --git a/crates/lingua/src/providers/openai/generated.rs b/crates/lingua/src/providers/openai/generated.rs index 610b98a7..2ac3f1f7 100644 --- a/crates/lingua/src/providers/openai/generated.rs +++ b/crates/lingua/src/providers/openai/generated.rs @@ -6017,6 +6017,9 @@ pub struct OutputItem { /// The name of the function to run. /// /// + /// The name of the tool that produced the output. + /// + /// /// The name of the tool that was run. /// /// @@ -6029,6 +6032,9 @@ pub struct OutputItem { /// The namespace of the function to run. /// /// + /// The namespace of the tool that produced the output. + /// + /// /// The namespace of the custom tool being called. #[serde(skip_serializing_if = "Option::is_none")] pub namespace: Option, diff --git a/specs/openai/openapi.yml b/specs/openai/openapi.yml index bab5f144..ba202bd7 100644 --- a/specs/openai/openapi.yml +++ b/specs/openai/openapi.yml @@ -39973,86 +39973,8 @@ paths: $ref: '#/components/schemas/ProvenanceResource' x-oaiMeta: name: Create content provenance check - examples: - response: '' - request: - node.js: >- - import fs from 'fs'; - - import OpenAI from 'openai'; - - - const client = new OpenAI({ - apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted - }); - - - const contentProvenanceCheck = await - client.contentProvenanceChecks.create({ - file: fs.createReadStream('path/to/file'), - }); - - - console.log(contentProvenanceCheck.created_at); - python: >- - import os - - from openai import OpenAI - - - client = OpenAI( - api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted - ) - - content_provenance_check = - client.content_provenance_checks.create( - file=b"Example data", - ) - - print(content_provenance_check.created_at) - go: "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"github.com/openai/openai-go\"\n\t\"github.com/openai/openai-go/option\"\n)\n\nfunc main() {\n\tclient := openai.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tcontentProvenanceCheck, err := client.ContentProvenanceChecks.New(context.TODO(), openai.ContentProvenanceCheckNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte(\"Example data\"))),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", contentProvenanceCheck.CreatedAt)\n}\n" - java: >- - package com.openai.example; - - - import com.openai.client.OpenAIClient; - - import com.openai.client.okhttp.OpenAIOkHttpClient; - - import - com.openai.models.contentprovenancechecks.ContentProvenanceCheck; - - import - com.openai.models.contentprovenancechecks.ContentProvenanceCheckCreateParams; - - import java.io.ByteArrayInputStream; - - - public final class Main { - private Main() {} - - public static void main(String[] args) { - OpenAIClient client = OpenAIOkHttpClient.fromEnv(); - - ContentProvenanceCheckCreateParams params = ContentProvenanceCheckCreateParams.builder() - .file(new ByteArrayInputStream("Example data".getBytes())) - .build(); - ContentProvenanceCheck contentProvenanceCheck = client.contentProvenanceChecks().create(params); - } - } - ruby: >- - require "openai" - - - openai = OpenAI::Client.new(api_key: "My API Key") - - - content_provenance_check = - openai.content_provenance_checks.create(file: - StringIO.new("Example data")) - - - puts(content_provenance_check) + group: content_provenance_checks + examples: [] /videos: post: tags: @@ -58346,6 +58268,14 @@ components: type: string description: | The unique ID of the function tool call generated by the model. + name: + type: string + description: | + The name of the tool that produced the output. + namespace: + type: string + description: | + The namespace of the tool that produced the output. caller: anyOf: - $ref: '#/components/schemas/ToolCallCallerParam' @@ -62089,6 +62019,7 @@ components: - gpt-5.6-sol - gpt-5.6-terra - gpt-5.6-luna + - gpt-5.5 - gpt-5.4 - gpt-5.4-mini - gpt-5.4-nano @@ -75223,7 +75154,7 @@ components: conversation: anyOf: - default: null - $ref: '#/components/schemas/Conversation-2' + $ref: '#/components/schemas/ResponseConversation' - type: 'null' max_output_tokens: anyOf: @@ -87067,6 +86998,21 @@ components: An array of content outputs (text, image, file) for the function tool call. description: Text, image, or file output of the function tool call. + name: + anyOf: + - type: string + maxLength: 128 + minLength: 1 + description: The name of the tool that produced the output. + - type: 'null' + namespace: + anyOf: + - type: string + maxLength: 64 + minLength: 1 + pattern: ^[a-zA-Z0-9_-]+$ + description: The namespace of the tool that produced the output. + - type: 'null' caller: anyOf: - $ref: '#/components/schemas/ToolCallCallerParam' @@ -88033,7 +87979,7 @@ components: - output title: Moderation description: Moderation results or errors for the response input and output. - Conversation-2: + ResponseConversation: properties: id: type: string @@ -94783,6 +94729,21 @@ components: An array of content outputs (text, image, file) for the function tool call. description: Text, image, or file output of the function tool call. + name: + anyOf: + - type: string + maxLength: 128 + minLength: 1 + description: The name of the tool that produced the output. + - type: 'null' + namespace: + anyOf: + - type: string + maxLength: 64 + minLength: 1 + pattern: ^[a-zA-Z0-9_-]+$ + description: The namespace of the tool that produced the output. + - type: 'null' caller: anyOf: - $ref: '#/components/schemas/BetaToolCallCallerParam' @@ -96211,6 +96172,7 @@ components: - gpt-5.6-sol - gpt-5.6-terra - gpt-5.6-luna + - gpt-5.5 - gpt-5.4 - gpt-5.4-mini - gpt-5.4-nano @@ -97381,6 +97343,14 @@ components: type: string description: | The unique ID of the function tool call generated by the model. + name: + type: string + description: | + The name of the tool that produced the output. + namespace: + type: string + description: | + The namespace of the tool that produced the output. caller: anyOf: - $ref: '#/components/schemas/BetaToolCallCallerParam' @@ -98040,7 +98010,7 @@ components: conversation: anyOf: - default: null - $ref: '#/components/schemas/BetaConversation-2' + $ref: '#/components/schemas/BetaResponseConversation' - type: 'null' max_output_tokens: anyOf: @@ -98116,7 +98086,7 @@ components: total_tokens: 380 user: null metadata: {} - BetaConversation-2: + BetaResponseConversation: properties: id: type: string