Skip to content
Draft
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
6 changes: 6 additions & 0 deletions crates/lingua/src/providers/openai/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
///
Expand All @@ -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<String>,
Expand Down
138 changes: 54 additions & 84 deletions specs/openai/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -75223,7 +75154,7 @@ components:
conversation:
anyOf:
- default: null
$ref: '#/components/schemas/Conversation-2'
$ref: '#/components/schemas/ResponseConversation'
- type: 'null'
max_output_tokens:
anyOf:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -98040,7 +98010,7 @@ components:
conversation:
anyOf:
- default: null
$ref: '#/components/schemas/BetaConversation-2'
$ref: '#/components/schemas/BetaResponseConversation'
- type: 'null'
max_output_tokens:
anyOf:
Expand Down Expand Up @@ -98116,7 +98086,7 @@ components:
total_tokens: 380
user: null
metadata: {}
BetaConversation-2:
BetaResponseConversation:
properties:
id:
type: string
Expand Down