Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jul 15, 2024
1 parent 95172a0 commit 2aa24b5
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1256
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9f6e9da01b27f4f387991ca14ecafe0c42a356cc3c47b269e5f8b4f6cd0ed700.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cb76af21f6fcf485b7e41586c3076cd45d25d6d04971c77ec814523b894dcb97.yml
139 changes: 133 additions & 6 deletions src/resources/workers/ai/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ export type AIRunParams =
| AIRunParams.AutomaticSpeechRecognition
| AIRunParams.ImageClassification
| AIRunParams.ObjectDetection
| AIRunParams.TextGeneration
| AIRunParams.Variant7
| AIRunParams.Variant8
| AIRunParams.Translation
| AIRunParams.Summarization
| AIRunParams.ImageToText;
Expand Down Expand Up @@ -288,12 +289,22 @@ export namespace AIRunParams {
image?: Array<number>;
}

export interface TextGeneration {
export interface Variant7 {
/**
* Path param:
*/
account_id: string;

/**
* Body param:
*/
prompt: string;

/**
* Body param:
*/
frequency_penalty?: number;

/**
* Body param:
*/
Expand All @@ -307,30 +318,146 @@ export namespace AIRunParams {
/**
* Body param:
*/
messages?: Array<AIRunParams.TextGeneration.Message>;
presence_penalty?: number;

/**
* Body param:
*/
prompt?: string;
raw?: boolean;

/**
* Body param:
*/
raw?: boolean;
repetition_penalty?: number;

/**
* Body param:
*/
seed?: number;

/**
* Body param:
*/
stream?: boolean;

/**
* Body param:
*/
temperature?: number;

/**
* Body param:
*/
top_k?: number;

/**
* Body param:
*/
top_p?: number;
}

export interface Variant8 {
/**
* Path param:
*/
account_id: string;

/**
* Body param:
*/
messages: Array<AIRunParams.Variant8.Message>;

/**
* Body param:
*/
frequency_penalty?: number;

/**
* Body param:
*/
max_tokens?: number;

/**
* Body param:
*/
presence_penalty?: number;

/**
* Body param:
*/
repetition_penalty?: number;

/**
* Body param:
*/
seed?: number;

/**
* Body param:
*/
stream?: boolean;

/**
* Body param:
*/
temperature?: number;

/**
* Body param:
*/
tools?: Array<AIRunParams.Variant8.Tool>;

/**
* Body param:
*/
top_k?: number;

/**
* Body param:
*/
top_p?: number;
}

export namespace TextGeneration {
export namespace Variant8 {
export interface Message {
content: string;

role: string;
}

export interface Tool {
function?: Tool.Function;

type?: string;
}

export namespace Tool {
export interface Function {
description?: string;

name?: string;

parameters?: Function.Parameters;
}

export namespace Function {
export interface Parameters {
properties?: Record<string, Parameters.Properties>;

required?: Array<string>;

type?: string;
}

export namespace Parameters {
export interface Properties {
description?: string;

type?: string;
}
}
}
}
}

export interface Translation {
Expand Down

0 comments on commit 2aa24b5

Please sign in to comment.