Comparing version
@@ -18,4 +18,5 @@ import { type Agent, type RequestInit } from "./_shims/index.js"; | ||
import { Chat } from "./resources/chat/chat.js"; | ||
import { EvalCreateParams, EvalCreateResponse, EvalCustomDataSourceConfig, EvalDeleteResponse, EvalLabelModelGrader, EvalListParams, EvalListResponse, EvalListResponsesPage, EvalRetrieveResponse, EvalStoredCompletionsDataSourceConfig, EvalStringCheckGrader, EvalTextSimilarityGrader, EvalUpdateParams, EvalUpdateResponse, Evals } from "./resources/evals/evals.js"; | ||
import { EvalCreateParams, EvalCreateResponse, EvalCustomDataSourceConfig, EvalDeleteResponse, EvalListParams, EvalListResponse, EvalListResponsesPage, EvalRetrieveResponse, EvalStoredCompletionsDataSourceConfig, EvalUpdateParams, EvalUpdateResponse, Evals } from "./resources/evals/evals.js"; | ||
import { FineTuning } from "./resources/fine-tuning/fine-tuning.js"; | ||
import { Graders } from "./resources/graders/graders.js"; | ||
import { Responses } from "./resources/responses/responses.js"; | ||
@@ -126,2 +127,3 @@ import { Upload, UploadCompleteParams, UploadCreateParams, Uploads as UploadsAPIUploads } from "./resources/uploads/uploads.js"; | ||
fineTuning: API.FineTuning; | ||
graders: API.Graders; | ||
vectorStores: API.VectorStores; | ||
@@ -170,2 +172,3 @@ beta: API.Beta; | ||
export { FineTuning as FineTuning }; | ||
export { Graders as Graders }; | ||
export { VectorStores as VectorStores, type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam, type FileChunkingStrategy as FileChunkingStrategy, type FileChunkingStrategyParam as FileChunkingStrategyParam, type OtherFileChunkingStrategyObject as OtherFileChunkingStrategyObject, type StaticFileChunkingStrategy as StaticFileChunkingStrategy, type StaticFileChunkingStrategyObject as StaticFileChunkingStrategyObject, type StaticFileChunkingStrategyObjectParam as StaticFileChunkingStrategyObjectParam, type VectorStore as VectorStore, type VectorStoreDeleted as VectorStoreDeleted, type VectorStoreSearchResponse as VectorStoreSearchResponse, VectorStoresPage as VectorStoresPage, VectorStoreSearchResponsesPage as VectorStoreSearchResponsesPage, type VectorStoreCreateParams as VectorStoreCreateParams, type VectorStoreUpdateParams as VectorStoreUpdateParams, type VectorStoreListParams as VectorStoreListParams, type VectorStoreSearchParams as VectorStoreSearchParams, }; | ||
@@ -176,3 +179,3 @@ export { Beta as Beta }; | ||
export { Responses as Responses }; | ||
export { Evals as Evals, type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, type EvalLabelModelGrader as EvalLabelModelGrader, type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, type EvalStringCheckGrader as EvalStringCheckGrader, type EvalTextSimilarityGrader as EvalTextSimilarityGrader, type EvalCreateResponse as EvalCreateResponse, type EvalRetrieveResponse as EvalRetrieveResponse, type EvalUpdateResponse as EvalUpdateResponse, type EvalListResponse as EvalListResponse, type EvalDeleteResponse as EvalDeleteResponse, EvalListResponsesPage as EvalListResponsesPage, type EvalCreateParams as EvalCreateParams, type EvalUpdateParams as EvalUpdateParams, type EvalListParams as EvalListParams, }; | ||
export { Evals as Evals, type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse as EvalCreateResponse, type EvalRetrieveResponse as EvalRetrieveResponse, type EvalUpdateResponse as EvalUpdateResponse, type EvalListResponse as EvalListResponse, type EvalDeleteResponse as EvalDeleteResponse, EvalListResponsesPage as EvalListResponsesPage, type EvalCreateParams as EvalCreateParams, type EvalUpdateParams as EvalUpdateParams, type EvalListParams as EvalListParams, }; | ||
export type AllModels = API.AllModels; | ||
@@ -179,0 +182,0 @@ export type ChatModel = API.ChatModel; |
@@ -47,2 +47,3 @@ "use strict"; | ||
const fine_tuning_1 = require("./resources/fine-tuning/fine-tuning.js"); | ||
const graders_1 = require("./resources/graders/graders.js"); | ||
const responses_1 = require("./resources/responses/responses.js"); | ||
@@ -101,2 +102,3 @@ const uploads_1 = require("./resources/uploads/uploads.js"); | ||
this.fineTuning = new API.FineTuning(this); | ||
this.graders = new API.Graders(this); | ||
this.vectorStores = new API.VectorStores(this); | ||
@@ -162,2 +164,3 @@ this.beta = new API.Beta(this); | ||
OpenAI.FineTuning = fine_tuning_1.FineTuning; | ||
OpenAI.Graders = graders_1.Graders; | ||
OpenAI.VectorStores = vector_stores_1.VectorStores; | ||
@@ -164,0 +167,0 @@ OpenAI.VectorStoresPage = vector_stores_1.VectorStoresPage; |
{ | ||
"name": "openai", | ||
"version": "4.97.0", | ||
"version": "4.98.0", | ||
"description": "The official TypeScript library for the OpenAI API", | ||
@@ -5,0 +5,0 @@ "author": "OpenAI <support@openai.com>", |
@@ -7,2 +7,14 @@ import { APIResource } from "../../resource.js"; | ||
* Generates audio from the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const speech = await client.audio.speech.create({ | ||
* input: 'input', | ||
* model: 'string', | ||
* voice: 'ash', | ||
* }); | ||
* | ||
* const content = await speech.blob(); | ||
* console.log(content); | ||
* ``` | ||
*/ | ||
@@ -9,0 +21,0 @@ create(body: SpeechCreateParams, options?: Core.RequestOptions): Core.APIPromise<Response>; |
@@ -9,2 +9,14 @@ "use strict"; | ||
* Generates audio from the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const speech = await client.audio.speech.create({ | ||
* input: 'input', | ||
* model: 'string', | ||
* voice: 'ash', | ||
* }); | ||
* | ||
* const content = await speech.blob(); | ||
* console.log(content); | ||
* ``` | ||
*/ | ||
@@ -11,0 +23,0 @@ create(body, options) { |
@@ -9,2 +9,11 @@ import { APIResource } from "../../resource.js"; | ||
* Transcribes audio into the input language. | ||
* | ||
* @example | ||
* ```ts | ||
* const transcription = | ||
* await client.audio.transcriptions.create({ | ||
* file: fs.createReadStream('speech.mp3'), | ||
* model: 'gpt-4o-transcribe', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -11,0 +20,0 @@ create(body: TranscriptionCreateParamsNonStreaming<'json' | undefined>, options?: Core.RequestOptions): Core.APIPromise<Transcription>; |
@@ -8,2 +8,10 @@ import { APIResource } from "../../resource.js"; | ||
* Translates audio into English. | ||
* | ||
* @example | ||
* ```ts | ||
* const translation = await client.audio.translations.create({ | ||
* file: fs.createReadStream('speech.mp3'), | ||
* model: 'whisper-1', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -10,0 +18,0 @@ create(body: TranslationCreateParams<'json' | undefined>, options?: Core.RequestOptions): Core.APIPromise<Translation>; |
@@ -13,2 +13,9 @@ import { APIResource } from "../../resource.js"; | ||
* Create an assistant with a model and instructions. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.create({ | ||
* model: 'gpt-4o', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -18,2 +25,9 @@ create(body: AssistantCreateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>; | ||
* Retrieves an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.retrieve( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -23,2 +37,9 @@ retrieve(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<Assistant>; | ||
* Modifies an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.update( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -28,2 +49,10 @@ update(assistantId: string, body: AssistantUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant>; | ||
* Returns a list of assistants. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const assistant of client.beta.assistants.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -34,2 +63,9 @@ list(query?: AssistantListParams, options?: Core.RequestOptions): Core.PagePromise<AssistantsPage, Assistant>; | ||
* Delete an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistantDeleted = await client.beta.assistants.del( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -36,0 +72,0 @@ del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<AssistantDeleted>; |
@@ -12,2 +12,9 @@ "use strict"; | ||
* Create an assistant with a model and instructions. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.create({ | ||
* model: 'gpt-4o', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -23,2 +30,9 @@ create(body, options) { | ||
* Retrieves an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.retrieve( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -33,2 +47,9 @@ retrieve(assistantId, options) { | ||
* Modifies an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.update( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -54,2 +75,9 @@ update(assistantId, body, options) { | ||
* Delete an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistantDeleted = await client.beta.assistants.del( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -56,0 +84,0 @@ del(assistantId, options) { |
@@ -12,2 +12,8 @@ import { APIResource } from "../../../resource.js"; | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const session = | ||
* await client.beta.realtime.sessions.create(); | ||
* ``` | ||
*/ | ||
@@ -14,0 +20,0 @@ create(body: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse>; |
@@ -15,2 +15,8 @@ "use strict"; | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const session = | ||
* await client.beta.realtime.sessions.create(); | ||
* ``` | ||
*/ | ||
@@ -17,0 +23,0 @@ create(body, options) { |
@@ -12,2 +12,8 @@ import { APIResource } from "../../../resource.js"; | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const transcriptionSession = | ||
* await client.beta.realtime.transcriptionSessions.create(); | ||
* ``` | ||
*/ | ||
@@ -14,0 +20,0 @@ create(body: TranscriptionSessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<TranscriptionSession>; |
@@ -15,2 +15,8 @@ "use strict"; | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const transcriptionSession = | ||
* await client.beta.realtime.transcriptionSessions.create(); | ||
* ``` | ||
*/ | ||
@@ -17,0 +23,0 @@ create(body, options) { |
@@ -9,2 +9,10 @@ import { APIResource } from "../../../resource.js"; | ||
* Create a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.create( | ||
* 'thread_id', | ||
* { content: 'string', role: 'user' }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -14,2 +22,10 @@ create(threadId: string, body: MessageCreateParams, options?: Core.RequestOptions): Core.APIPromise<Message>; | ||
* Retrieve a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.retrieve( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -19,2 +35,10 @@ retrieve(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<Message>; | ||
* Modifies a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.update( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -24,2 +48,12 @@ update(threadId: string, messageId: string, body: MessageUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Message>; | ||
* Returns a list of messages for a given thread. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const message of client.beta.threads.messages.list( | ||
* 'thread_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -30,2 +64,11 @@ list(threadId: string, query?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise<MessagesPage, Message>; | ||
* Deletes a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const messageDeleted = | ||
* await client.beta.threads.messages.del( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -32,0 +75,0 @@ del(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<MessageDeleted>; |
@@ -11,2 +11,10 @@ "use strict"; | ||
* Create a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.create( | ||
* 'thread_id', | ||
* { content: 'string', role: 'user' }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -22,2 +30,10 @@ create(threadId, body, options) { | ||
* Retrieve a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.retrieve( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -32,2 +48,10 @@ retrieve(threadId, messageId, options) { | ||
* Modifies a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.update( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -53,2 +77,11 @@ update(threadId, messageId, body, options) { | ||
* Deletes a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const messageDeleted = | ||
* await client.beta.threads.messages.del( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -55,0 +88,0 @@ del(threadId, messageId, options) { |
@@ -19,2 +19,10 @@ import { APIResource } from "../../../../resource.js"; | ||
* Create a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.create( | ||
* 'thread_id', | ||
* { assistant_id: 'assistant_id' }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -26,2 +34,10 @@ create(threadId: string, params: RunCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Run>; | ||
* Retrieves a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.retrieve( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -31,2 +47,10 @@ retrieve(threadId: string, runId: string, options?: Core.RequestOptions): Core.APIPromise<Run>; | ||
* Modifies a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.update( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -36,2 +60,12 @@ update(threadId: string, runId: string, body: RunUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Run>; | ||
* Returns a list of runs belonging to a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const run of client.beta.threads.runs.list( | ||
* 'thread_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -42,2 +76,10 @@ list(threadId: string, query?: RunListParams, options?: Core.RequestOptions): Core.PagePromise<RunsPage, Run>; | ||
* Cancels a run that is `in_progress`. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.cancel( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -76,2 +118,12 @@ cancel(threadId: string, runId: string, options?: Core.RequestOptions): Core.APIPromise<Run>; | ||
* request. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = | ||
* await client.beta.threads.runs.submitToolOutputs( | ||
* 'thread_id', | ||
* 'run_id', | ||
* { tool_outputs: [{}] }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -78,0 +130,0 @@ submitToolOutputs(threadId: string, runId: string, body: RunSubmitToolOutputsParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Run>; |
@@ -52,2 +52,10 @@ "use strict"; | ||
* Retrieves a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.retrieve( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -62,2 +70,10 @@ retrieve(threadId, runId, options) { | ||
* Modifies a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.update( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -83,2 +99,10 @@ update(threadId, runId, body, options) { | ||
* Cancels a run that is `in_progress`. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.cancel( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -85,0 +109,0 @@ cancel(threadId, runId, options) { |
@@ -9,2 +9,12 @@ import { APIResource } from "../../../../resource.js"; | ||
* Retrieves a run step. | ||
* | ||
* @example | ||
* ```ts | ||
* const runStep = | ||
* await client.beta.threads.runs.steps.retrieve( | ||
* 'thread_id', | ||
* 'run_id', | ||
* 'step_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -15,2 +25,13 @@ retrieve(threadId: string, runId: string, stepId: string, query?: StepRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<RunStep>; | ||
* Returns a list of run steps belonging to a run. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const runStep of client.beta.threads.runs.steps.list( | ||
* 'thread_id', | ||
* 'run_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -17,0 +38,0 @@ list(threadId: string, runId: string, query?: StepListParams, options?: Core.RequestOptions): Core.PagePromise<RunStepsPage, RunStep>; |
@@ -53,2 +53,9 @@ "use strict"; | ||
* Retrieves a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const thread = await client.beta.threads.retrieve( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -63,2 +70,9 @@ retrieve(threadId, options) { | ||
* Modifies a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const thread = await client.beta.threads.update( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -74,2 +88,9 @@ update(threadId, body, options) { | ||
* Delete a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const threadDeleted = await client.beta.threads.del( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -76,0 +97,0 @@ del(threadId, options) { |
@@ -31,2 +31,12 @@ import { APIResource } from "../../../resource.js"; | ||
* [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = await client.chat.completions.create( | ||
* { | ||
* messages: [{ content: 'string', role: 'developer' }], | ||
* model: 'gpt-4o', | ||
* }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -39,2 +49,8 @@ create(body: ChatCompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<ChatCompletion>; | ||
* the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = | ||
* await client.chat.completions.retrieve('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -46,2 +62,10 @@ retrieve(completionId: string, options?: Core.RequestOptions): Core.APIPromise<ChatCompletion>; | ||
* supported modification is to update the `metadata` field. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = await client.chat.completions.update( | ||
* 'completion_id', | ||
* { metadata: { foo: 'string' } }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -52,2 +76,10 @@ update(completionId: string, body: ChatCompletionUpdateParams, options?: Core.RequestOptions): Core.APIPromise<ChatCompletion>; | ||
* the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const chatCompletion of client.chat.completions.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -59,2 +91,8 @@ list(query?: ChatCompletionListParams, options?: Core.RequestOptions): Core.PagePromise<ChatCompletionsPage, ChatCompletion>; | ||
* with the `store` parameter set to `true` can be deleted. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletionDeleted = | ||
* await client.chat.completions.del('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -61,0 +99,0 @@ del(completionId: string, options?: Core.RequestOptions): Core.APIPromise<ChatCompletionDeleted>; |
@@ -44,2 +44,8 @@ "use strict"; | ||
* the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = | ||
* await client.chat.completions.retrieve('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -53,2 +59,10 @@ retrieve(completionId, options) { | ||
* supported modification is to update the `metadata` field. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = await client.chat.completions.update( | ||
* 'completion_id', | ||
* { metadata: { foo: 'string' } }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -67,2 +81,8 @@ update(completionId, body, options) { | ||
* with the `store` parameter set to `true` can be deleted. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletionDeleted = | ||
* await client.chat.completions.del('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -69,0 +89,0 @@ del(completionId, options) { |
@@ -10,2 +10,12 @@ import { APIResource } from "../../../resource.js"; | ||
* been created with the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const chatCompletionStoreMessage of client.chat.completions.messages.list( | ||
* 'completion_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -12,0 +22,0 @@ list(completionId: string, query?: MessageListParams, options?: Core.RequestOptions): Core.PagePromise<ChatCompletionStoreMessagesPage, CompletionsAPI.ChatCompletionStoreMessage>; |
@@ -10,2 +10,10 @@ import { APIResource } from "../resource.js"; | ||
* Creates a completion for the provided prompt and parameters. | ||
* | ||
* @example | ||
* ```ts | ||
* const completion = await client.completions.create({ | ||
* model: 'string', | ||
* prompt: 'This is a test.', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -12,0 +20,0 @@ create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>; |
@@ -6,2 +6,11 @@ import { APIResource } from "../resource.js"; | ||
* Creates an embedding vector representing the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const createEmbeddingResponse = | ||
* await client.embeddings.create({ | ||
* input: 'The quick brown fox jumped over the lazy dog', | ||
* model: 'text-embedding-3-small', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -8,0 +17,0 @@ create(body: EmbeddingCreateParams, options?: Core.RequestOptions<EmbeddingCreateParams>): Core.APIPromise<CreateEmbeddingResponse>; |
@@ -33,2 +33,11 @@ "use strict"; | ||
* Creates an embedding vector representing the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const createEmbeddingResponse = | ||
* await client.embeddings.create({ | ||
* input: 'The quick brown fox jumped over the lazy dog', | ||
* model: 'text-embedding-3-small', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -35,0 +44,0 @@ create(body, options) { |
import { APIResource } from "../../resource.js"; | ||
import * as Core from "../../core.js"; | ||
import * as Shared from "../shared.js"; | ||
import * as GraderModelsAPI from "../graders/grader-models.js"; | ||
import * as ResponsesAPI from "../responses/responses.js"; | ||
@@ -58,68 +59,2 @@ import * as RunsAPI from "./runs/runs.js"; | ||
/** | ||
* A LabelModelGrader object which uses a model to assign labels to each item in | ||
* the evaluation. | ||
*/ | ||
export interface EvalLabelModelGrader { | ||
input: Array<EvalLabelModelGrader.Input>; | ||
/** | ||
* The labels to assign to each item in the evaluation. | ||
*/ | ||
labels: Array<string>; | ||
/** | ||
* The model to use for the evaluation. Must support structured outputs. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The labels that indicate a passing result. Must be a subset of labels. | ||
*/ | ||
passing_labels: Array<string>; | ||
/** | ||
* The object type, which is always `label_model`. | ||
*/ | ||
type: 'label_model'; | ||
} | ||
export declare namespace EvalLabelModelGrader { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
/** | ||
* A StoredCompletionsDataSourceConfig which specifies the metadata property of | ||
@@ -152,58 +87,2 @@ * your stored completions query. This is usually metadata like `usecase=chatbot` | ||
/** | ||
* A StringCheckGrader object that performs a string comparison between input and | ||
* reference using a specified operation. | ||
*/ | ||
export interface EvalStringCheckGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. | ||
*/ | ||
operation: 'eq' | 'ne' | 'like' | 'ilike'; | ||
/** | ||
* The reference text. This may include template strings. | ||
*/ | ||
reference: string; | ||
/** | ||
* The object type, which is always `string_check`. | ||
*/ | ||
type: 'string_check'; | ||
} | ||
/** | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface EvalTextSimilarityGrader { | ||
/** | ||
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`, | ||
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. | ||
*/ | ||
evaluation_metric: 'fuzzy_match' | 'bleu' | 'gleu' | 'meteor' | 'rouge_1' | 'rouge_2' | 'rouge_3' | 'rouge_4' | 'rouge_5' | 'rouge_l'; | ||
/** | ||
* The text being graded. | ||
*/ | ||
input: string; | ||
/** | ||
* A float score where a value greater than or equal indicates a passing grade. | ||
*/ | ||
pass_threshold: number; | ||
/** | ||
* The text being graded against. | ||
*/ | ||
reference: string; | ||
/** | ||
* The type of grader. | ||
*/ | ||
type: 'text_similarity'; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name?: string; | ||
} | ||
/** | ||
* An Eval object with a data source config and testing criteria. An Eval | ||
@@ -249,26 +128,19 @@ * represents a task to be done for your LLM integration. Like: | ||
*/ | ||
testing_criteria: Array<EvalLabelModelGrader | EvalStringCheckGrader | EvalTextSimilarityGrader | EvalCreateResponse.Python | EvalCreateResponse.ScoreModel>; | ||
testing_criteria: Array<GraderModelsAPI.LabelModelGrader | GraderModelsAPI.StringCheckGrader | EvalCreateResponse.EvalGraderTextSimilarity | EvalCreateResponse.EvalGraderPython | EvalCreateResponse.EvalGraderScoreModel>; | ||
} | ||
export declare namespace EvalCreateResponse { | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
interface Python { | ||
interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -281,71 +153,8 @@ */ | ||
*/ | ||
interface ScoreModel { | ||
interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -393,26 +202,19 @@ /** | ||
*/ | ||
testing_criteria: Array<EvalLabelModelGrader | EvalStringCheckGrader | EvalTextSimilarityGrader | EvalRetrieveResponse.Python | EvalRetrieveResponse.ScoreModel>; | ||
testing_criteria: Array<GraderModelsAPI.LabelModelGrader | GraderModelsAPI.StringCheckGrader | EvalRetrieveResponse.EvalGraderTextSimilarity | EvalRetrieveResponse.EvalGraderPython | EvalRetrieveResponse.EvalGraderScoreModel>; | ||
} | ||
export declare namespace EvalRetrieveResponse { | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
interface Python { | ||
interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -425,71 +227,8 @@ */ | ||
*/ | ||
interface ScoreModel { | ||
interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -537,26 +276,19 @@ /** | ||
*/ | ||
testing_criteria: Array<EvalLabelModelGrader | EvalStringCheckGrader | EvalTextSimilarityGrader | EvalUpdateResponse.Python | EvalUpdateResponse.ScoreModel>; | ||
testing_criteria: Array<GraderModelsAPI.LabelModelGrader | GraderModelsAPI.StringCheckGrader | EvalUpdateResponse.EvalGraderTextSimilarity | EvalUpdateResponse.EvalGraderPython | EvalUpdateResponse.EvalGraderScoreModel>; | ||
} | ||
export declare namespace EvalUpdateResponse { | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
interface Python { | ||
interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -569,71 +301,8 @@ */ | ||
*/ | ||
interface ScoreModel { | ||
interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -681,26 +350,19 @@ /** | ||
*/ | ||
testing_criteria: Array<EvalLabelModelGrader | EvalStringCheckGrader | EvalTextSimilarityGrader | EvalListResponse.Python | EvalListResponse.ScoreModel>; | ||
testing_criteria: Array<GraderModelsAPI.LabelModelGrader | GraderModelsAPI.StringCheckGrader | EvalListResponse.EvalGraderTextSimilarity | EvalListResponse.EvalGraderPython | EvalListResponse.EvalGraderScoreModel>; | ||
} | ||
export declare namespace EvalListResponse { | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
interface Python { | ||
interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -713,71 +375,8 @@ */ | ||
*/ | ||
interface ScoreModel { | ||
interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -793,7 +392,7 @@ export interface EvalDeleteResponse { | ||
*/ | ||
data_source_config: EvalCreateParams.Custom | EvalCreateParams.Logs; | ||
data_source_config: EvalCreateParams.Custom | EvalCreateParams.StoredCompletions; | ||
/** | ||
* A list of graders for all eval runs in this group. | ||
*/ | ||
testing_criteria: Array<EvalCreateParams.LabelModel | EvalStringCheckGrader | EvalTextSimilarityGrader | EvalCreateParams.Python | EvalCreateParams.ScoreModel>; | ||
testing_criteria: Array<EvalCreateParams.LabelModel | GraderModelsAPI.StringCheckGrader | EvalCreateParams.TextSimilarity | EvalCreateParams.Python | EvalCreateParams.ScoreModel>; | ||
/** | ||
@@ -842,9 +441,9 @@ * Set of 16 key-value pairs that can be attached to an object. This can be useful | ||
*/ | ||
interface Logs { | ||
interface StoredCompletions { | ||
/** | ||
* The type of data source. Always `logs`. | ||
* The type of data source. Always `stored_completions`. | ||
*/ | ||
type: 'logs'; | ||
type: 'stored_completions'; | ||
/** | ||
* Metadata filters for the logs data source. | ||
* Metadata filters for the stored completions data source. | ||
*/ | ||
@@ -934,22 +533,15 @@ metadata?: Record<string, unknown>; | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
interface Python { | ||
interface TextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
interface Python extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -962,71 +554,8 @@ */ | ||
*/ | ||
interface ScoreModel { | ||
interface ScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1061,5 +590,5 @@ export interface EvalUpdateParams { | ||
export declare namespace Evals { | ||
export { type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, type EvalLabelModelGrader as EvalLabelModelGrader, type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, type EvalStringCheckGrader as EvalStringCheckGrader, type EvalTextSimilarityGrader as EvalTextSimilarityGrader, type EvalCreateResponse as EvalCreateResponse, type EvalRetrieveResponse as EvalRetrieveResponse, type EvalUpdateResponse as EvalUpdateResponse, type EvalListResponse as EvalListResponse, type EvalDeleteResponse as EvalDeleteResponse, EvalListResponsesPage as EvalListResponsesPage, type EvalCreateParams as EvalCreateParams, type EvalUpdateParams as EvalUpdateParams, type EvalListParams as EvalListParams, }; | ||
export { type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse as EvalCreateResponse, type EvalRetrieveResponse as EvalRetrieveResponse, type EvalUpdateResponse as EvalUpdateResponse, type EvalListResponse as EvalListResponse, type EvalDeleteResponse as EvalDeleteResponse, EvalListResponsesPage as EvalListResponsesPage, type EvalCreateParams as EvalCreateParams, type EvalUpdateParams as EvalUpdateParams, type EvalListParams as EvalListParams, }; | ||
export { Runs as Runs, type CreateEvalCompletionsRunDataSource as CreateEvalCompletionsRunDataSource, type CreateEvalJSONLRunDataSource as CreateEvalJSONLRunDataSource, type EvalAPIError as EvalAPIError, type RunCreateResponse as RunCreateResponse, type RunRetrieveResponse as RunRetrieveResponse, type RunListResponse as RunListResponse, type RunDeleteResponse as RunDeleteResponse, type RunCancelResponse as RunCancelResponse, RunListResponsesPage as RunListResponsesPage, type RunCreateParams as RunCreateParams, type RunListParams as RunListParams, }; | ||
} | ||
//# sourceMappingURL=evals.d.ts.map |
@@ -1,3 +0,3 @@ | ||
export { EvalListResponsesPage, Evals, type EvalCustomDataSourceConfig, type EvalLabelModelGrader, type EvalStoredCompletionsDataSourceConfig, type EvalStringCheckGrader, type EvalTextSimilarityGrader, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, } from "./evals.js"; | ||
export { EvalListResponsesPage, Evals, type EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, } from "./evals.js"; | ||
export { RunListResponsesPage, Runs, type CreateEvalCompletionsRunDataSource, type CreateEvalJSONLRunDataSource, type EvalAPIError, type RunCreateResponse, type RunRetrieveResponse, type RunListResponse, type RunDeleteResponse, type RunCancelResponse, type RunCreateParams, type RunListParams, } from "./runs/index.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -10,2 +10,13 @@ import { APIResource } from "../../../resource.js"; | ||
* in their organization. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* { project_ids: ['string'] }, | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -18,2 +29,10 @@ create(fineTunedModelCheckpoint: string, body: PermissionCreateParams, options?: Core.RequestOptions): Core.PagePromise<PermissionCreateResponsesPage, PermissionCreateResponse>; | ||
* fine-tuned model checkpoint. | ||
* | ||
* @example | ||
* ```ts | ||
* const permission = | ||
* await client.fineTuning.checkpoints.permissions.retrieve( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -27,2 +46,11 @@ retrieve(fineTunedModelCheckpoint: string, query?: PermissionRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<PermissionRetrieveResponse>; | ||
* fine-tuned model checkpoint. | ||
* | ||
* @example | ||
* ```ts | ||
* const permission = | ||
* await client.fineTuning.checkpoints.permissions.del( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -29,0 +57,0 @@ del(fineTunedModelCheckpoint: string, permissionId: string, options?: Core.RequestOptions): Core.APIPromise<PermissionDeleteResponse>; |
@@ -14,2 +14,13 @@ "use strict"; | ||
* in their organization. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* { project_ids: ['string'] }, | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -33,2 +44,11 @@ create(fineTunedModelCheckpoint, body, options) { | ||
* fine-tuned model checkpoint. | ||
* | ||
* @example | ||
* ```ts | ||
* const permission = | ||
* await client.fineTuning.checkpoints.permissions.del( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -35,0 +55,0 @@ del(fineTunedModelCheckpoint, permissionId, options) { |
import { APIResource } from "../../resource.js"; | ||
import * as MethodsAPI from "./methods.js"; | ||
import { DpoHyperparameters, DpoMethod, Methods, ReinforcementHyperparameters, ReinforcementMethod, SupervisedHyperparameters, SupervisedMethod } from "./methods.js"; | ||
import * as AlphaAPI from "./alpha/alpha.js"; | ||
import { Alpha } from "./alpha/alpha.js"; | ||
import * as CheckpointsAPI from "./checkpoints/checkpoints.js"; | ||
@@ -7,9 +11,13 @@ import { Checkpoints } from "./checkpoints/checkpoints.js"; | ||
export declare class FineTuning extends APIResource { | ||
methods: MethodsAPI.Methods; | ||
jobs: JobsAPI.Jobs; | ||
checkpoints: CheckpointsAPI.Checkpoints; | ||
alpha: AlphaAPI.Alpha; | ||
} | ||
export declare namespace FineTuning { | ||
export { Methods as Methods, type DpoHyperparameters as DpoHyperparameters, type DpoMethod as DpoMethod, type ReinforcementHyperparameters as ReinforcementHyperparameters, type ReinforcementMethod as ReinforcementMethod, type SupervisedHyperparameters as SupervisedHyperparameters, type SupervisedMethod as SupervisedMethod, }; | ||
export { Jobs as Jobs, type FineTuningJob as FineTuningJob, type FineTuningJobEvent as FineTuningJobEvent, type FineTuningJobIntegration as FineTuningJobIntegration, type FineTuningJobWandbIntegration as FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject as FineTuningJobWandbIntegrationObject, FineTuningJobsPage as FineTuningJobsPage, FineTuningJobEventsPage as FineTuningJobEventsPage, type JobCreateParams as JobCreateParams, type JobListParams as JobListParams, type JobListEventsParams as JobListEventsParams, }; | ||
export { Checkpoints as Checkpoints }; | ||
export { Alpha as Alpha }; | ||
} | ||
//# sourceMappingURL=fine-tuning.d.ts.map |
@@ -29,2 +29,6 @@ "use strict"; | ||
const resource_1 = require("../../resource.js"); | ||
const MethodsAPI = __importStar(require("./methods.js")); | ||
const methods_1 = require("./methods.js"); | ||
const AlphaAPI = __importStar(require("./alpha/alpha.js")); | ||
const alpha_1 = require("./alpha/alpha.js"); | ||
const CheckpointsAPI = __importStar(require("./checkpoints/checkpoints.js")); | ||
@@ -37,7 +41,10 @@ const checkpoints_1 = require("./checkpoints/checkpoints.js"); | ||
super(...arguments); | ||
this.methods = new MethodsAPI.Methods(this._client); | ||
this.jobs = new JobsAPI.Jobs(this._client); | ||
this.checkpoints = new CheckpointsAPI.Checkpoints(this._client); | ||
this.alpha = new AlphaAPI.Alpha(this._client); | ||
} | ||
} | ||
exports.FineTuning = FineTuning; | ||
FineTuning.Methods = methods_1.Methods; | ||
FineTuning.Jobs = jobs_1.Jobs; | ||
@@ -47,2 +54,3 @@ FineTuning.FineTuningJobsPage = jobs_1.FineTuningJobsPage; | ||
FineTuning.Checkpoints = checkpoints_1.Checkpoints; | ||
FineTuning.Alpha = alpha_1.Alpha; | ||
//# sourceMappingURL=fine-tuning.js.map |
@@ -0,4 +1,6 @@ | ||
export { Alpha } from "./alpha/index.js"; | ||
export { Checkpoints } from "./checkpoints/index.js"; | ||
export { FineTuning } from "./fine-tuning.js"; | ||
export { FineTuningJobsPage, FineTuningJobEventsPage, Jobs, type FineTuningJob, type FineTuningJobEvent, type FineTuningJobIntegration, type FineTuningJobWandbIntegration, type FineTuningJobWandbIntegrationObject, type JobCreateParams, type JobListParams, type JobListEventsParams, } from "./jobs/index.js"; | ||
export { Methods, type DpoHyperparameters, type DpoMethod, type ReinforcementHyperparameters, type ReinforcementMethod, type SupervisedHyperparameters, type SupervisedMethod, } from "./methods.js"; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Jobs = exports.FineTuningJobEventsPage = exports.FineTuningJobsPage = exports.FineTuning = exports.Checkpoints = void 0; | ||
var index_1 = require("./checkpoints/index.js"); | ||
Object.defineProperty(exports, "Checkpoints", { enumerable: true, get: function () { return index_1.Checkpoints; } }); | ||
exports.Methods = exports.Jobs = exports.FineTuningJobEventsPage = exports.FineTuningJobsPage = exports.FineTuning = exports.Checkpoints = exports.Alpha = void 0; | ||
var index_1 = require("./alpha/index.js"); | ||
Object.defineProperty(exports, "Alpha", { enumerable: true, get: function () { return index_1.Alpha; } }); | ||
var index_2 = require("./checkpoints/index.js"); | ||
Object.defineProperty(exports, "Checkpoints", { enumerable: true, get: function () { return index_2.Checkpoints; } }); | ||
var fine_tuning_1 = require("./fine-tuning.js"); | ||
Object.defineProperty(exports, "FineTuning", { enumerable: true, get: function () { return fine_tuning_1.FineTuning; } }); | ||
var index_2 = require("./jobs/index.js"); | ||
Object.defineProperty(exports, "FineTuningJobsPage", { enumerable: true, get: function () { return index_2.FineTuningJobsPage; } }); | ||
Object.defineProperty(exports, "FineTuningJobEventsPage", { enumerable: true, get: function () { return index_2.FineTuningJobEventsPage; } }); | ||
Object.defineProperty(exports, "Jobs", { enumerable: true, get: function () { return index_2.Jobs; } }); | ||
var index_3 = require("./jobs/index.js"); | ||
Object.defineProperty(exports, "FineTuningJobsPage", { enumerable: true, get: function () { return index_3.FineTuningJobsPage; } }); | ||
Object.defineProperty(exports, "FineTuningJobEventsPage", { enumerable: true, get: function () { return index_3.FineTuningJobEventsPage; } }); | ||
Object.defineProperty(exports, "Jobs", { enumerable: true, get: function () { return index_3.Jobs; } }); | ||
var methods_1 = require("./methods.js"); | ||
Object.defineProperty(exports, "Methods", { enumerable: true, get: function () { return methods_1.Methods; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -7,2 +7,12 @@ import { APIResource } from "../../../resource.js"; | ||
* List checkpoints for a fine-tuning job. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -9,0 +19,0 @@ list(fineTuningJobId: string, query?: CheckpointListParams, options?: Core.RequestOptions): Core.PagePromise<FineTuningJobCheckpointsPage, FineTuningJobCheckpoint>; |
import { APIResource } from "../../../resource.js"; | ||
import * as Core from "../../../core.js"; | ||
import * as MethodsAPI from "../methods.js"; | ||
import * as CheckpointsAPI from "./checkpoints.js"; | ||
@@ -16,2 +17,10 @@ import { CheckpointListParams, Checkpoints, FineTuningJobCheckpoint, FineTuningJobCheckpointsPage } from "./checkpoints.js"; | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.create({ | ||
* model: 'gpt-4o-mini', | ||
* training_file: 'file-abc123', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -23,2 +32,9 @@ create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob>; | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.retrieve( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -28,2 +44,10 @@ retrieve(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob>; | ||
* List your organization's fine-tuning jobs | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJob of client.fineTuning.jobs.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -34,2 +58,9 @@ list(query?: JobListParams, options?: Core.RequestOptions): Core.PagePromise<FineTuningJobsPage, FineTuningJob>; | ||
* Immediately cancel a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.cancel( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -39,5 +70,37 @@ cancel(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob>; | ||
* Get status updates for a fine-tuning job. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJobEvent of client.fineTuning.jobs.listEvents( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
listEvents(fineTuningJobId: string, query?: JobListEventsParams, options?: Core.RequestOptions): Core.PagePromise<FineTuningJobEventsPage, FineTuningJobEvent>; | ||
listEvents(fineTuningJobId: string, options?: Core.RequestOptions): Core.PagePromise<FineTuningJobEventsPage, FineTuningJobEvent>; | ||
/** | ||
* Pause a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.pause( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
pause(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob>; | ||
/** | ||
* Resume a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.resume( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
resume(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob>; | ||
} | ||
@@ -184,82 +247,17 @@ export declare class FineTuningJobsPage extends CursorPage<FineTuningJob> { | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
* The type of method. Is either `supervised`, `dpo`, or `reinforcement`. | ||
*/ | ||
dpo?: Method.Dpo; | ||
type: 'supervised' | 'dpo' | 'reinforcement'; | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
supervised?: Method.Supervised; | ||
dpo?: MethodsAPI.DpoMethod; | ||
/** | ||
* The type of method. Is either `supervised` or `dpo`. | ||
* Configuration for the reinforcement fine-tuning method. | ||
*/ | ||
type?: 'supervised' | 'dpo'; | ||
} | ||
namespace Method { | ||
reinforcement?: MethodsAPI.ReinforcementMethod; | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
interface Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Dpo.Hyperparameters; | ||
} | ||
namespace Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* The beta value for the DPO method. A higher beta value will increase the weight | ||
* of the penalty between the policy and reference model. | ||
*/ | ||
beta?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
*/ | ||
interface Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Supervised.Hyperparameters; | ||
} | ||
namespace Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
supervised?: MethodsAPI.SupervisedMethod; | ||
} | ||
@@ -486,82 +484,17 @@ } | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
* The type of method. Is either `supervised`, `dpo`, or `reinforcement`. | ||
*/ | ||
dpo?: Method.Dpo; | ||
type: 'supervised' | 'dpo' | 'reinforcement'; | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
supervised?: Method.Supervised; | ||
dpo?: MethodsAPI.DpoMethod; | ||
/** | ||
* The type of method. Is either `supervised` or `dpo`. | ||
* Configuration for the reinforcement fine-tuning method. | ||
*/ | ||
type?: 'supervised' | 'dpo'; | ||
} | ||
namespace Method { | ||
reinforcement?: MethodsAPI.ReinforcementMethod; | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
interface Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Dpo.Hyperparameters; | ||
} | ||
namespace Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* The beta value for the DPO method. A higher beta value will increase the weight | ||
* of the penalty between the policy and reference model. | ||
*/ | ||
beta?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
*/ | ||
interface Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Supervised.Hyperparameters; | ||
} | ||
namespace Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
supervised?: MethodsAPI.SupervisedMethod; | ||
} | ||
@@ -568,0 +501,0 @@ } |
@@ -46,2 +46,10 @@ "use strict"; | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.create({ | ||
* model: 'gpt-4o-mini', | ||
* training_file: 'file-abc123', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -55,2 +63,9 @@ create(body, options) { | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.retrieve( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -68,2 +83,9 @@ retrieve(fineTuningJobId, options) { | ||
* Immediately cancel a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.cancel( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -82,2 +104,28 @@ cancel(fineTuningJobId, options) { | ||
} | ||
/** | ||
* Pause a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.pause( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
pause(fineTuningJobId, options) { | ||
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/pause`, options); | ||
} | ||
/** | ||
* Resume a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.resume( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
resume(fineTuningJobId, options) { | ||
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/resume`, options); | ||
} | ||
} | ||
@@ -84,0 +132,0 @@ exports.Jobs = Jobs; |
@@ -6,2 +6,9 @@ import { APIResource } from "../resource.js"; | ||
* Creates a variation of a given image. This endpoint only supports `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.createVariation({ | ||
* image: fs.createReadStream('otter.png'), | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -12,2 +19,10 @@ createVariation(body: ImageCreateVariationParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse>; | ||
* prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.edit({ | ||
* image: fs.createReadStream('path/to/file'), | ||
* prompt: 'A cute baby sea otter wearing a beret', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -18,2 +33,9 @@ edit(body: ImageEditParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse>; | ||
* [Learn more](https://platform.openai.com/docs/guides/images). | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.generate({ | ||
* prompt: 'A cute baby sea otter', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -20,0 +42,0 @@ generate(body: ImageGenerateParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse>; |
@@ -33,2 +33,9 @@ "use strict"; | ||
* Creates a variation of a given image. This endpoint only supports `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.createVariation({ | ||
* image: fs.createReadStream('otter.png'), | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -41,2 +48,10 @@ createVariation(body, options) { | ||
* prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.edit({ | ||
* image: fs.createReadStream('path/to/file'), | ||
* prompt: 'A cute baby sea otter wearing a beret', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -49,2 +64,9 @@ edit(body, options) { | ||
* [Learn more](https://platform.openai.com/docs/guides/images). | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.generate({ | ||
* prompt: 'A cute baby sea otter', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -51,0 +73,0 @@ generate(body, options) { |
@@ -8,5 +8,6 @@ export * from "./chat/index.js"; | ||
export { Embeddings, type CreateEmbeddingResponse, type Embedding, type EmbeddingModel, type EmbeddingCreateParams, } from "./embeddings.js"; | ||
export { EvalListResponsesPage, Evals, type EvalCustomDataSourceConfig, type EvalLabelModelGrader, type EvalStoredCompletionsDataSourceConfig, type EvalStringCheckGrader, type EvalTextSimilarityGrader, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, } from "./evals/evals.js"; | ||
export { EvalListResponsesPage, Evals, type EvalCustomDataSourceConfig, type EvalStoredCompletionsDataSourceConfig, type EvalCreateResponse, type EvalRetrieveResponse, type EvalUpdateResponse, type EvalListResponse, type EvalDeleteResponse, type EvalCreateParams, type EvalUpdateParams, type EvalListParams, } from "./evals/evals.js"; | ||
export { FileObjectsPage, Files, type FileContent, type FileDeleted, type FileObject, type FilePurpose, type FileCreateParams, type FileListParams, } from "./files.js"; | ||
export { FineTuning } from "./fine-tuning/fine-tuning.js"; | ||
export { Graders } from "./graders/graders.js"; | ||
export { Images, type Image, type ImageModel, type ImagesResponse, type ImageCreateVariationParams, type ImageEditParams, type ImageGenerateParams, } from "./images.js"; | ||
@@ -13,0 +14,0 @@ export { ModelsPage, Models, type Model, type ModelDeleted } from "./models.js"; |
@@ -18,3 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VectorStores = exports.VectorStoreSearchResponsesPage = exports.VectorStoresPage = exports.Uploads = exports.Responses = exports.Moderations = exports.Models = exports.ModelsPage = exports.Images = exports.FineTuning = exports.Files = exports.FileObjectsPage = exports.Evals = exports.EvalListResponsesPage = exports.Embeddings = exports.Completions = exports.Beta = exports.Batches = exports.BatchesPage = exports.Audio = void 0; | ||
exports.VectorStores = exports.VectorStoreSearchResponsesPage = exports.VectorStoresPage = exports.Uploads = exports.Responses = exports.Moderations = exports.Models = exports.ModelsPage = exports.Images = exports.Graders = exports.FineTuning = exports.Files = exports.FileObjectsPage = exports.Evals = exports.EvalListResponsesPage = exports.Embeddings = exports.Completions = exports.Beta = exports.Batches = exports.BatchesPage = exports.Audio = void 0; | ||
__exportStar(require("./chat/index.js"), exports); | ||
@@ -41,2 +41,4 @@ __exportStar(require("./shared.js"), exports); | ||
Object.defineProperty(exports, "FineTuning", { enumerable: true, get: function () { return fine_tuning_1.FineTuning; } }); | ||
var graders_1 = require("./graders/graders.js"); | ||
Object.defineProperty(exports, "Graders", { enumerable: true, get: function () { return graders_1.Graders; } }); | ||
var images_1 = require("./images.js"); | ||
@@ -43,0 +45,0 @@ Object.defineProperty(exports, "Images", { enumerable: true, get: function () { return images_1.Images; } }); |
@@ -9,2 +9,12 @@ import { APIResource } from "../../resource.js"; | ||
* Returns a list of input items for a given response. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const responseItem of client.responses.inputItems.list( | ||
* 'response_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -11,0 +21,0 @@ list(responseId: string, query?: InputItemListParams, options?: Core.RequestOptions): Core.PagePromise<ResponseItemsPage, ResponsesAPI.ResponseItem>; |
@@ -56,2 +56,9 @@ "use strict"; | ||
* Deletes a model response with the given ID. | ||
* | ||
* @example | ||
* ```ts | ||
* await client.responses.del( | ||
* 'resp_677efb5139a88190b512bc3fef8e535d', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -58,0 +65,0 @@ del(responseId, options) { |
@@ -74,3 +74,2 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
EvalDeleteResponse, | ||
EvalLabelModelGrader, | ||
EvalListParams, | ||
@@ -81,4 +80,2 @@ EvalListResponse, | ||
EvalStoredCompletionsDataSourceConfig, | ||
EvalStringCheckGrader, | ||
EvalTextSimilarityGrader, | ||
EvalUpdateParams, | ||
@@ -89,2 +86,3 @@ EvalUpdateResponse, | ||
import { FineTuning } from './resources/fine-tuning/fine-tuning'; | ||
import { Graders } from './resources/graders/graders'; | ||
import { Responses } from './resources/responses/responses'; | ||
@@ -311,2 +309,3 @@ import { | ||
fineTuning: API.FineTuning = new API.FineTuning(this); | ||
graders: API.Graders = new API.Graders(this); | ||
vectorStores: API.VectorStores = new API.VectorStores(this); | ||
@@ -373,2 +372,3 @@ beta: API.Beta = new API.Beta(this); | ||
OpenAI.FineTuning = FineTuning; | ||
OpenAI.Graders = Graders; | ||
OpenAI.VectorStores = VectorStores; | ||
@@ -495,2 +495,4 @@ OpenAI.VectorStoresPage = VectorStoresPage; | ||
export { Graders as Graders }; | ||
export { | ||
@@ -540,6 +542,3 @@ VectorStores as VectorStores, | ||
type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, | ||
type EvalLabelModelGrader as EvalLabelModelGrader, | ||
type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, | ||
type EvalStringCheckGrader as EvalStringCheckGrader, | ||
type EvalTextSimilarityGrader as EvalTextSimilarityGrader, | ||
type EvalCreateResponse as EvalCreateResponse, | ||
@@ -546,0 +545,0 @@ type EvalRetrieveResponse as EvalRetrieveResponse, |
@@ -10,2 +10,14 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Generates audio from the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const speech = await client.audio.speech.create({ | ||
* input: 'input', | ||
* model: 'string', | ||
* voice: 'ash', | ||
* }); | ||
* | ||
* const content = await speech.blob(); | ||
* console.log(content); | ||
* ``` | ||
*/ | ||
@@ -12,0 +24,0 @@ create(body: SpeechCreateParams, options?: Core.RequestOptions): Core.APIPromise<Response> { |
@@ -12,2 +12,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Transcribes audio into the input language. | ||
* | ||
* @example | ||
* ```ts | ||
* const transcription = | ||
* await client.audio.transcriptions.create({ | ||
* file: fs.createReadStream('speech.mp3'), | ||
* model: 'gpt-4o-transcribe', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -14,0 +23,0 @@ create( |
@@ -11,2 +11,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Translates audio into English. | ||
* | ||
* @example | ||
* ```ts | ||
* const translation = await client.audio.translations.create({ | ||
* file: fs.createReadStream('speech.mp3'), | ||
* model: 'whisper-1', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -13,0 +21,0 @@ create( |
@@ -17,2 +17,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Create an assistant with a model and instructions. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.create({ | ||
* model: 'gpt-4o', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -29,2 +36,9 @@ create(body: AssistantCreateParams, options?: Core.RequestOptions): Core.APIPromise<Assistant> { | ||
* Retrieves an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.retrieve( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -40,2 +54,9 @@ retrieve(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<Assistant> { | ||
* Modifies an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistant = await client.beta.assistants.update( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -56,2 +77,10 @@ update( | ||
* Returns a list of assistants. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const assistant of client.beta.assistants.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -79,2 +108,9 @@ list( | ||
* Delete an assistant. | ||
* | ||
* @example | ||
* ```ts | ||
* const assistantDeleted = await client.beta.assistants.del( | ||
* 'assistant_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -81,0 +117,0 @@ del(assistantId: string, options?: Core.RequestOptions): Core.APIPromise<AssistantDeleted> { |
@@ -15,2 +15,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const session = | ||
* await client.beta.realtime.sessions.create(); | ||
* ``` | ||
*/ | ||
@@ -17,0 +23,0 @@ create(body: SessionCreateParams, options?: Core.RequestOptions): Core.APIPromise<SessionCreateResponse> { |
@@ -15,2 +15,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* the Realtime API. | ||
* | ||
* @example | ||
* ```ts | ||
* const transcriptionSession = | ||
* await client.beta.realtime.transcriptionSessions.create(); | ||
* ``` | ||
*/ | ||
@@ -17,0 +23,0 @@ create( |
@@ -13,2 +13,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Create a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.create( | ||
* 'thread_id', | ||
* { content: 'string', role: 'user' }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -29,2 +37,10 @@ create( | ||
* Retrieve a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.retrieve( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -40,2 +56,10 @@ retrieve(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<Message> { | ||
* Modifies a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const message = await client.beta.threads.messages.update( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -57,2 +81,12 @@ update( | ||
* Returns a list of messages for a given thread. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const message of client.beta.threads.messages.list( | ||
* 'thread_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -82,2 +116,11 @@ list( | ||
* Deletes a message. | ||
* | ||
* @example | ||
* ```ts | ||
* const messageDeleted = | ||
* await client.beta.threads.messages.del( | ||
* 'thread_id', | ||
* 'message_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -84,0 +127,0 @@ del(threadId: string, messageId: string, options?: Core.RequestOptions): Core.APIPromise<MessageDeleted> { |
@@ -48,2 +48,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Create a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.create( | ||
* 'thread_id', | ||
* { assistant_id: 'assistant_id' }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -82,2 +90,10 @@ create( | ||
* Retrieves a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.retrieve( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -93,2 +109,10 @@ retrieve(threadId: string, runId: string, options?: Core.RequestOptions): Core.APIPromise<Run> { | ||
* Modifies a run. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.update( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -110,2 +134,12 @@ update( | ||
* Returns a list of runs belonging to a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const run of client.beta.threads.runs.list( | ||
* 'thread_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -135,2 +169,10 @@ list( | ||
* Cancels a run that is `in_progress`. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.runs.cancel( | ||
* 'thread_id', | ||
* 'run_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -237,2 +279,12 @@ cancel(threadId: string, runId: string, options?: Core.RequestOptions): Core.APIPromise<Run> { | ||
* request. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = | ||
* await client.beta.threads.runs.submitToolOutputs( | ||
* 'thread_id', | ||
* 'run_id', | ||
* { tool_outputs: [{}] }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -239,0 +291,0 @@ submitToolOutputs( |
@@ -13,2 +13,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Retrieves a run step. | ||
* | ||
* @example | ||
* ```ts | ||
* const runStep = | ||
* await client.beta.threads.runs.steps.retrieve( | ||
* 'thread_id', | ||
* 'run_id', | ||
* 'step_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -47,2 +57,13 @@ retrieve( | ||
* Returns a list of run steps belonging to a run. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const runStep of client.beta.threads.runs.steps.list( | ||
* 'thread_id', | ||
* 'run_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -49,0 +70,0 @@ list( |
@@ -76,2 +76,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Create a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const thread = await client.beta.threads.create(); | ||
* ``` | ||
*/ | ||
@@ -96,2 +101,9 @@ create(body?: ThreadCreateParams, options?: Core.RequestOptions): Core.APIPromise<Thread>; | ||
* Retrieves a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const thread = await client.beta.threads.retrieve( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -107,2 +119,9 @@ retrieve(threadId: string, options?: Core.RequestOptions): Core.APIPromise<Thread> { | ||
* Modifies a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const thread = await client.beta.threads.update( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -119,2 +138,9 @@ update(threadId: string, body: ThreadUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Thread> { | ||
* Delete a thread. | ||
* | ||
* @example | ||
* ```ts | ||
* const threadDeleted = await client.beta.threads.del( | ||
* 'thread_id', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -130,2 +156,9 @@ del(threadId: string, options?: Core.RequestOptions): Core.APIPromise<ThreadDeleted> { | ||
* Create a thread and run it in one request. | ||
* | ||
* @example | ||
* ```ts | ||
* const run = await client.beta.threads.createAndRun({ | ||
* assistant_id: 'assistant_id', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -132,0 +165,0 @@ createAndRun( |
@@ -36,2 +36,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* [refer to the reasoning guide](https://platform.openai.com/docs/guides/reasoning). | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = await client.chat.completions.create( | ||
* { | ||
* messages: [{ content: 'string', role: 'developer' }], | ||
* model: 'gpt-4o', | ||
* }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -62,2 +72,8 @@ create( | ||
* the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = | ||
* await client.chat.completions.retrieve('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -72,2 +88,10 @@ retrieve(completionId: string, options?: Core.RequestOptions): Core.APIPromise<ChatCompletion> { | ||
* supported modification is to update the `metadata` field. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletion = await client.chat.completions.update( | ||
* 'completion_id', | ||
* { metadata: { foo: 'string' } }, | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -85,2 +109,10 @@ update( | ||
* the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const chatCompletion of client.chat.completions.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -105,2 +137,8 @@ list( | ||
* with the `store` parameter set to `true` can be deleted. | ||
* | ||
* @example | ||
* ```ts | ||
* const chatCompletionDeleted = | ||
* await client.chat.completions.del('completion_id'); | ||
* ``` | ||
*/ | ||
@@ -107,0 +145,0 @@ del(completionId: string, options?: Core.RequestOptions): Core.APIPromise<ChatCompletionDeleted> { |
@@ -14,2 +14,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* been created with the `store` parameter set to `true` will be returned. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const chatCompletionStoreMessage of client.chat.completions.messages.list( | ||
* 'completion_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -16,0 +26,0 @@ list( |
@@ -13,2 +13,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Creates a completion for the provided prompt and parameters. | ||
* | ||
* @example | ||
* ```ts | ||
* const completion = await client.completions.create({ | ||
* model: 'string', | ||
* prompt: 'This is a test.', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -15,0 +23,0 @@ create(body: CompletionCreateParamsNonStreaming, options?: Core.RequestOptions): APIPromise<Completion>; |
@@ -9,2 +9,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Creates an embedding vector representing the input text. | ||
* | ||
* @example | ||
* ```ts | ||
* const createEmbeddingResponse = | ||
* await client.embeddings.create({ | ||
* input: 'The quick brown fox jumped over the lazy dog', | ||
* model: 'text-embedding-3-small', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -11,0 +20,0 @@ create( |
@@ -7,2 +7,3 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
import * as Shared from '../shared'; | ||
import * as GraderModelsAPI from '../graders/grader-models'; | ||
import * as ResponsesAPI from '../responses/responses'; | ||
@@ -108,79 +109,2 @@ import * as RunsAPI from './runs/runs'; | ||
/** | ||
* A LabelModelGrader object which uses a model to assign labels to each item in | ||
* the evaluation. | ||
*/ | ||
export interface EvalLabelModelGrader { | ||
input: Array<EvalLabelModelGrader.Input>; | ||
/** | ||
* The labels to assign to each item in the evaluation. | ||
*/ | ||
labels: Array<string>; | ||
/** | ||
* The model to use for the evaluation. Must support structured outputs. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The labels that indicate a passing result. Must be a subset of labels. | ||
*/ | ||
passing_labels: Array<string>; | ||
/** | ||
* The object type, which is always `label_model`. | ||
*/ | ||
type: 'label_model'; | ||
} | ||
export namespace EvalLabelModelGrader { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
/** | ||
* A StoredCompletionsDataSourceConfig which specifies the metadata property of | ||
@@ -216,79 +140,2 @@ * your stored completions query. This is usually metadata like `usecase=chatbot` | ||
/** | ||
* A StringCheckGrader object that performs a string comparison between input and | ||
* reference using a specified operation. | ||
*/ | ||
export interface EvalStringCheckGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The string check operation to perform. One of `eq`, `ne`, `like`, or `ilike`. | ||
*/ | ||
operation: 'eq' | 'ne' | 'like' | 'ilike'; | ||
/** | ||
* The reference text. This may include template strings. | ||
*/ | ||
reference: string; | ||
/** | ||
* The object type, which is always `string_check`. | ||
*/ | ||
type: 'string_check'; | ||
} | ||
/** | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface EvalTextSimilarityGrader { | ||
/** | ||
* The evaluation metric to use. One of `fuzzy_match`, `bleu`, `gleu`, `meteor`, | ||
* `rouge_1`, `rouge_2`, `rouge_3`, `rouge_4`, `rouge_5`, or `rouge_l`. | ||
*/ | ||
evaluation_metric: | ||
| 'fuzzy_match' | ||
| 'bleu' | ||
| 'gleu' | ||
| 'meteor' | ||
| 'rouge_1' | ||
| 'rouge_2' | ||
| 'rouge_3' | ||
| 'rouge_4' | ||
| 'rouge_5' | ||
| 'rouge_l'; | ||
/** | ||
* The text being graded. | ||
*/ | ||
input: string; | ||
/** | ||
* A float score where a value greater than or equal indicates a passing grade. | ||
*/ | ||
pass_threshold: number; | ||
/** | ||
* The text being graded against. | ||
*/ | ||
reference: string; | ||
/** | ||
* The type of grader. | ||
*/ | ||
type: 'text_similarity'; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name?: string; | ||
} | ||
/** | ||
* An Eval object with a data source config and testing criteria. An Eval | ||
@@ -341,7 +188,7 @@ * represents a task to be done for your LLM integration. Like: | ||
testing_criteria: Array< | ||
| EvalLabelModelGrader | ||
| EvalStringCheckGrader | ||
| EvalTextSimilarityGrader | ||
| EvalCreateResponse.Python | ||
| EvalCreateResponse.ScoreModel | ||
| GraderModelsAPI.LabelModelGrader | ||
| GraderModelsAPI.StringCheckGrader | ||
| EvalCreateResponse.EvalGraderTextSimilarity | ||
| EvalCreateResponse.EvalGraderPython | ||
| EvalCreateResponse.EvalGraderScoreModel | ||
>; | ||
@@ -352,26 +199,16 @@ } | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface Python { | ||
export interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
export interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -385,82 +222,8 @@ */ | ||
*/ | ||
export interface ScoreModel { | ||
export interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
export namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -516,7 +279,7 @@ | ||
testing_criteria: Array< | ||
| EvalLabelModelGrader | ||
| EvalStringCheckGrader | ||
| EvalTextSimilarityGrader | ||
| EvalRetrieveResponse.Python | ||
| EvalRetrieveResponse.ScoreModel | ||
| GraderModelsAPI.LabelModelGrader | ||
| GraderModelsAPI.StringCheckGrader | ||
| EvalRetrieveResponse.EvalGraderTextSimilarity | ||
| EvalRetrieveResponse.EvalGraderPython | ||
| EvalRetrieveResponse.EvalGraderScoreModel | ||
>; | ||
@@ -527,26 +290,16 @@ } | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface Python { | ||
export interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
export interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -560,82 +313,8 @@ */ | ||
*/ | ||
export interface ScoreModel { | ||
export interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
export namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -691,7 +370,7 @@ | ||
testing_criteria: Array< | ||
| EvalLabelModelGrader | ||
| EvalStringCheckGrader | ||
| EvalTextSimilarityGrader | ||
| EvalUpdateResponse.Python | ||
| EvalUpdateResponse.ScoreModel | ||
| GraderModelsAPI.LabelModelGrader | ||
| GraderModelsAPI.StringCheckGrader | ||
| EvalUpdateResponse.EvalGraderTextSimilarity | ||
| EvalUpdateResponse.EvalGraderPython | ||
| EvalUpdateResponse.EvalGraderScoreModel | ||
>; | ||
@@ -702,26 +381,16 @@ } | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface Python { | ||
export interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
export interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -735,82 +404,8 @@ */ | ||
*/ | ||
export interface ScoreModel { | ||
export interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
export namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -866,7 +461,7 @@ | ||
testing_criteria: Array< | ||
| EvalLabelModelGrader | ||
| EvalStringCheckGrader | ||
| EvalTextSimilarityGrader | ||
| EvalListResponse.Python | ||
| EvalListResponse.ScoreModel | ||
| GraderModelsAPI.LabelModelGrader | ||
| GraderModelsAPI.StringCheckGrader | ||
| EvalListResponse.EvalGraderTextSimilarity | ||
| EvalListResponse.EvalGraderPython | ||
| EvalListResponse.EvalGraderScoreModel | ||
>; | ||
@@ -877,26 +472,16 @@ } | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface Python { | ||
export interface EvalGraderTextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
export interface EvalGraderPython extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -910,82 +495,8 @@ */ | ||
*/ | ||
export interface ScoreModel { | ||
export interface EvalGraderScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
export namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1005,3 +516,3 @@ | ||
*/ | ||
data_source_config: EvalCreateParams.Custom | EvalCreateParams.Logs; | ||
data_source_config: EvalCreateParams.Custom | EvalCreateParams.StoredCompletions; | ||
@@ -1013,4 +524,4 @@ /** | ||
| EvalCreateParams.LabelModel | ||
| EvalStringCheckGrader | ||
| EvalTextSimilarityGrader | ||
| GraderModelsAPI.StringCheckGrader | ||
| EvalCreateParams.TextSimilarity | ||
| EvalCreateParams.Python | ||
@@ -1068,10 +579,10 @@ | EvalCreateParams.ScoreModel | ||
*/ | ||
export interface Logs { | ||
export interface StoredCompletions { | ||
/** | ||
* The type of data source. Always `logs`. | ||
* The type of data source. Always `stored_completions`. | ||
*/ | ||
type: 'logs'; | ||
type: 'stored_completions'; | ||
/** | ||
* Metadata filters for the logs data source. | ||
* Metadata filters for the stored completions data source. | ||
*/ | ||
@@ -1175,26 +686,16 @@ metadata?: Record<string, unknown>; | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
* A TextSimilarityGrader object which grades text based on similarity metrics. | ||
*/ | ||
export interface Python { | ||
export interface TextSimilarity extends GraderModelsAPI.TextSimilarityGrader { | ||
/** | ||
* The name of the grader. | ||
* The threshold for the score. | ||
*/ | ||
name: string; | ||
pass_threshold: number; | ||
} | ||
/** | ||
* A PythonGrader object that runs a python script on the input. | ||
*/ | ||
export interface Python extends GraderModelsAPI.PythonGrader { | ||
/** | ||
* The source code of the python script. | ||
*/ | ||
source: string; | ||
/** | ||
* The object type, which is always `python`. | ||
*/ | ||
type: 'python'; | ||
/** | ||
* The image tag to use for the python script. | ||
*/ | ||
image_tag?: string; | ||
/** | ||
* The threshold for the score. | ||
@@ -1208,82 +709,8 @@ */ | ||
*/ | ||
export interface ScoreModel { | ||
export interface ScoreModel extends GraderModelsAPI.ScoreModelGrader { | ||
/** | ||
* The input text. This may include template strings. | ||
*/ | ||
input: Array<ScoreModel.Input>; | ||
/** | ||
* The model to use for the evaluation. | ||
*/ | ||
model: string; | ||
/** | ||
* The name of the grader. | ||
*/ | ||
name: string; | ||
/** | ||
* The object type, which is always `score_model`. | ||
*/ | ||
type: 'score_model'; | ||
/** | ||
* The threshold for the score. | ||
*/ | ||
pass_threshold?: number; | ||
/** | ||
* The range of the score. Defaults to `[0, 1]`. | ||
*/ | ||
range?: Array<number>; | ||
/** | ||
* The sampling parameters for the model. | ||
*/ | ||
sampling_params?: unknown; | ||
} | ||
export namespace ScoreModel { | ||
/** | ||
* A message input to the model with a role indicating instruction following | ||
* hierarchy. Instructions given with the `developer` or `system` role take | ||
* precedence over instructions given with the `user` role. Messages with the | ||
* `assistant` role are presumed to have been generated by the model in previous | ||
* interactions. | ||
*/ | ||
export interface Input { | ||
/** | ||
* Text inputs to the model - can contain template strings. | ||
*/ | ||
content: string | ResponsesAPI.ResponseInputText | Input.OutputText; | ||
/** | ||
* The role of the message input. One of `user`, `assistant`, `system`, or | ||
* `developer`. | ||
*/ | ||
role: 'user' | 'assistant' | 'system' | 'developer'; | ||
/** | ||
* The type of the message input. Always `message`. | ||
*/ | ||
type?: 'message'; | ||
} | ||
export namespace Input { | ||
/** | ||
* A text output from the model. | ||
*/ | ||
export interface OutputText { | ||
/** | ||
* The text output from the model. | ||
*/ | ||
text: string; | ||
/** | ||
* The type of the output text. Always `output_text`. | ||
*/ | ||
type: 'output_text'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -1329,6 +756,3 @@ | ||
type EvalCustomDataSourceConfig as EvalCustomDataSourceConfig, | ||
type EvalLabelModelGrader as EvalLabelModelGrader, | ||
type EvalStoredCompletionsDataSourceConfig as EvalStoredCompletionsDataSourceConfig, | ||
type EvalStringCheckGrader as EvalStringCheckGrader, | ||
type EvalTextSimilarityGrader as EvalTextSimilarityGrader, | ||
type EvalCreateResponse as EvalCreateResponse, | ||
@@ -1335,0 +759,0 @@ type EvalRetrieveResponse as EvalRetrieveResponse, |
@@ -7,6 +7,3 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
type EvalCustomDataSourceConfig, | ||
type EvalLabelModelGrader, | ||
type EvalStoredCompletionsDataSourceConfig, | ||
type EvalStringCheckGrader, | ||
type EvalTextSimilarityGrader, | ||
type EvalCreateResponse, | ||
@@ -13,0 +10,0 @@ type EvalRetrieveResponse, |
@@ -14,2 +14,13 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* in their organization. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const permissionCreateResponse of client.fineTuning.checkpoints.permissions.create( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* { project_ids: ['string'] }, | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -33,2 +44,10 @@ create( | ||
* fine-tuned model checkpoint. | ||
* | ||
* @example | ||
* ```ts | ||
* const permission = | ||
* await client.fineTuning.checkpoints.permissions.retrieve( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -63,2 +82,11 @@ retrieve( | ||
* fine-tuned model checkpoint. | ||
* | ||
* @example | ||
* ```ts | ||
* const permission = | ||
* await client.fineTuning.checkpoints.permissions.del( | ||
* 'ft:gpt-4o-mini-2024-07-18:org:weather:B7R9VjQd', | ||
* 'cp_zc4Q7MP6XxulcVzj4MZdwsAB', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -65,0 +93,0 @@ del( |
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
import { APIResource } from '../../resource'; | ||
import * as MethodsAPI from './methods'; | ||
import { | ||
DpoHyperparameters, | ||
DpoMethod, | ||
Methods, | ||
ReinforcementHyperparameters, | ||
ReinforcementMethod, | ||
SupervisedHyperparameters, | ||
SupervisedMethod, | ||
} from './methods'; | ||
import * as AlphaAPI from './alpha/alpha'; | ||
import { Alpha } from './alpha/alpha'; | ||
import * as CheckpointsAPI from './checkpoints/checkpoints'; | ||
@@ -22,6 +34,9 @@ import { Checkpoints } from './checkpoints/checkpoints'; | ||
export class FineTuning extends APIResource { | ||
methods: MethodsAPI.Methods = new MethodsAPI.Methods(this._client); | ||
jobs: JobsAPI.Jobs = new JobsAPI.Jobs(this._client); | ||
checkpoints: CheckpointsAPI.Checkpoints = new CheckpointsAPI.Checkpoints(this._client); | ||
alpha: AlphaAPI.Alpha = new AlphaAPI.Alpha(this._client); | ||
} | ||
FineTuning.Methods = Methods; | ||
FineTuning.Jobs = Jobs; | ||
@@ -31,5 +46,16 @@ FineTuning.FineTuningJobsPage = FineTuningJobsPage; | ||
FineTuning.Checkpoints = Checkpoints; | ||
FineTuning.Alpha = Alpha; | ||
export declare namespace FineTuning { | ||
export { | ||
Methods as Methods, | ||
type DpoHyperparameters as DpoHyperparameters, | ||
type DpoMethod as DpoMethod, | ||
type ReinforcementHyperparameters as ReinforcementHyperparameters, | ||
type ReinforcementMethod as ReinforcementMethod, | ||
type SupervisedHyperparameters as SupervisedHyperparameters, | ||
type SupervisedMethod as SupervisedMethod, | ||
}; | ||
export { | ||
Jobs as Jobs, | ||
@@ -49,2 +75,4 @@ type FineTuningJob as FineTuningJob, | ||
export { Checkpoints as Checkpoints }; | ||
export { Alpha as Alpha }; | ||
} |
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
export { Alpha } from './alpha/index'; | ||
export { Checkpoints } from './checkpoints/index'; | ||
@@ -18,1 +19,10 @@ export { FineTuning } from './fine-tuning'; | ||
} from './jobs/index'; | ||
export { | ||
Methods, | ||
type DpoHyperparameters, | ||
type DpoMethod, | ||
type ReinforcementHyperparameters, | ||
type ReinforcementMethod, | ||
type SupervisedHyperparameters, | ||
type SupervisedMethod, | ||
} from './methods'; |
@@ -11,2 +11,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* List checkpoints for a fine-tuning job. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJobCheckpoint of client.fineTuning.jobs.checkpoints.list( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -13,0 +23,0 @@ list( |
@@ -6,2 +6,3 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
import * as Core from '../../../core'; | ||
import * as MethodsAPI from '../methods'; | ||
import * as CheckpointsAPI from './checkpoints'; | ||
@@ -27,2 +28,10 @@ import { | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.create({ | ||
* model: 'gpt-4o-mini', | ||
* training_file: 'file-abc123', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -37,2 +46,9 @@ create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> { | ||
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.retrieve( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -45,2 +61,10 @@ retrieve(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> { | ||
* List your organization's fine-tuning jobs | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJob of client.fineTuning.jobs.list()) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -64,2 +88,9 @@ list( | ||
* Immediately cancel a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.cancel( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
@@ -72,2 +103,12 @@ cancel(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> { | ||
* Get status updates for a fine-tuning job. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const fineTuningJobEvent of client.fineTuning.jobs.listEvents( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -96,2 +137,30 @@ listEvents( | ||
} | ||
/** | ||
* Pause a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.pause( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
pause(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> { | ||
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/pause`, options); | ||
} | ||
/** | ||
* Resume a fine-tune job. | ||
* | ||
* @example | ||
* ```ts | ||
* const fineTuningJob = await client.fineTuning.jobs.resume( | ||
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F', | ||
* ); | ||
* ``` | ||
*/ | ||
resume(fineTuningJobId: string, options?: Core.RequestOptions): Core.APIPromise<FineTuningJob> { | ||
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/resume`, options); | ||
} | ||
} | ||
@@ -263,93 +332,20 @@ | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
* The type of method. Is either `supervised`, `dpo`, or `reinforcement`. | ||
*/ | ||
dpo?: Method.Dpo; | ||
type: 'supervised' | 'dpo' | 'reinforcement'; | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
supervised?: Method.Supervised; | ||
dpo?: MethodsAPI.DpoMethod; | ||
/** | ||
* The type of method. Is either `supervised` or `dpo`. | ||
* Configuration for the reinforcement fine-tuning method. | ||
*/ | ||
type?: 'supervised' | 'dpo'; | ||
} | ||
reinforcement?: MethodsAPI.ReinforcementMethod; | ||
export namespace Method { | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
export interface Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Dpo.Hyperparameters; | ||
} | ||
export namespace Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
export interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* The beta value for the DPO method. A higher beta value will increase the weight | ||
* of the penalty between the policy and reference model. | ||
*/ | ||
beta?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
*/ | ||
export interface Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Supervised.Hyperparameters; | ||
} | ||
export namespace Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
export interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
supervised?: MethodsAPI.SupervisedMethod; | ||
} | ||
@@ -608,93 +604,20 @@ } | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
* The type of method. Is either `supervised`, `dpo`, or `reinforcement`. | ||
*/ | ||
dpo?: Method.Dpo; | ||
type: 'supervised' | 'dpo' | 'reinforcement'; | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
supervised?: Method.Supervised; | ||
dpo?: MethodsAPI.DpoMethod; | ||
/** | ||
* The type of method. Is either `supervised` or `dpo`. | ||
* Configuration for the reinforcement fine-tuning method. | ||
*/ | ||
type?: 'supervised' | 'dpo'; | ||
} | ||
reinforcement?: MethodsAPI.ReinforcementMethod; | ||
export namespace Method { | ||
/** | ||
* Configuration for the DPO fine-tuning method. | ||
*/ | ||
export interface Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Dpo.Hyperparameters; | ||
} | ||
export namespace Dpo { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
export interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* The beta value for the DPO method. A higher beta value will increase the weight | ||
* of the penalty between the policy and reference model. | ||
*/ | ||
beta?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
/** | ||
* Configuration for the supervised fine-tuning method. | ||
*/ | ||
export interface Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
hyperparameters?: Supervised.Hyperparameters; | ||
} | ||
export namespace Supervised { | ||
/** | ||
* The hyperparameters used for the fine-tuning job. | ||
*/ | ||
export interface Hyperparameters { | ||
/** | ||
* Number of examples in each batch. A larger batch size means that model | ||
* parameters are updated less frequently, but with lower variance. | ||
*/ | ||
batch_size?: 'auto' | number; | ||
/** | ||
* Scaling factor for the learning rate. A smaller learning rate may be useful to | ||
* avoid overfitting. | ||
*/ | ||
learning_rate_multiplier?: 'auto' | number; | ||
/** | ||
* The number of epochs to train the model for. An epoch refers to one full cycle | ||
* through the training dataset. | ||
*/ | ||
n_epochs?: 'auto' | number; | ||
} | ||
} | ||
supervised?: MethodsAPI.SupervisedMethod; | ||
} | ||
@@ -701,0 +624,0 @@ } |
@@ -9,2 +9,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Creates a variation of a given image. This endpoint only supports `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.createVariation({ | ||
* image: fs.createReadStream('otter.png'), | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -21,2 +28,10 @@ createVariation( | ||
* prompt. This endpoint only supports `gpt-image-1` and `dall-e-2`. | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.edit({ | ||
* image: fs.createReadStream('path/to/file'), | ||
* prompt: 'A cute baby sea otter wearing a beret', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -30,2 +45,9 @@ edit(body: ImageEditParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse> { | ||
* [Learn more](https://platform.openai.com/docs/guides/images). | ||
* | ||
* @example | ||
* ```ts | ||
* const imagesResponse = await client.images.generate({ | ||
* prompt: 'A cute baby sea otter', | ||
* }); | ||
* ``` | ||
*/ | ||
@@ -32,0 +54,0 @@ generate(body: ImageGenerateParams, options?: Core.RequestOptions): Core.APIPromise<ImagesResponse> { |
@@ -36,6 +36,3 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
type EvalCustomDataSourceConfig, | ||
type EvalLabelModelGrader, | ||
type EvalStoredCompletionsDataSourceConfig, | ||
type EvalStringCheckGrader, | ||
type EvalTextSimilarityGrader, | ||
type EvalCreateResponse, | ||
@@ -61,2 +58,3 @@ type EvalRetrieveResponse, | ||
export { FineTuning } from './fine-tuning/fine-tuning'; | ||
export { Graders } from './graders/graders'; | ||
export { | ||
@@ -63,0 +61,0 @@ Images, |
@@ -13,2 +13,12 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
* Returns a list of input items for a given response. | ||
* | ||
* @example | ||
* ```ts | ||
* // Automatically fetches more pages as needed. | ||
* for await (const responseItem of client.responses.inputItems.list( | ||
* 'response_id', | ||
* )) { | ||
* // ... | ||
* } | ||
* ``` | ||
*/ | ||
@@ -15,0 +25,0 @@ list( |
@@ -1,1 +0,1 @@ | ||
export const VERSION = '4.97.0'; // x-release-please-version | ||
export const VERSION = '4.98.0'; // x-release-please-version |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "4.97.0"; | ||
export declare const VERSION = "4.98.0"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.VERSION = void 0; | ||
exports.VERSION = '4.97.0'; // x-release-please-version | ||
exports.VERSION = '4.98.0'; // x-release-please-version | ||
//# sourceMappingURL=version.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
4034680
1.47%1145
5.82%75172
2.21%4
33.33%