Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #216

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 14 additions & 84 deletions src/resources/workers/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,13 @@ export type AIRunParams =
| AIRunParams.TextToImage
| AIRunParams.SentenceSimilarity
| AIRunParams.TextEmbeddings
| AIRunParams.Variant4
| AIRunParams.Variant5
| AIRunParams.Variant6
| AIRunParams.Variant7
| AIRunParams.Variant8
| AIRunParams.Variant9
| AIRunParams.Variant10
| AIRunParams.Variant11
| AIRunParams.SpeechRecognition
| AIRunParams.ImageClassification
| AIRunParams.ObjectDetection
| AIRunParams.TextGeneration
| AIRunParams.Translation
| AIRunParams.Summarization
| AIRunParams.Variant14
| AIRunParams.Variant15;
| AIRunParams.ImageToText;

export namespace AIRunParams {
export interface TextClassification {
Expand Down Expand Up @@ -215,19 +210,7 @@ export namespace AIRunParams {
text: string | Array<string>;
}

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

/**
* Body param:
*/
body: Uploadable;
}

export interface Variant5 {
export interface SpeechRecognition {
/**
* Path param:
*/
Expand All @@ -239,19 +222,7 @@ export namespace AIRunParams {
audio?: Array<number>;
}

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

/**
* Body param:
*/
body: Uploadable;
}

export interface Variant7 {
export interface ImageClassification {
/**
* Path param:
*/
Expand All @@ -263,19 +234,7 @@ export namespace AIRunParams {
image?: Array<number>;
}

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

/**
* Body param:
*/
body: Uploadable;
}

export interface Variant9 {
export interface ObjectDetection {
/**
* Path param:
*/
Expand All @@ -287,17 +246,12 @@ export namespace AIRunParams {
image?: Array<number>;
}

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

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

/**
* Body param:
*/
Expand All @@ -311,37 +265,25 @@ export namespace AIRunParams {
/**
* Body param:
*/
raw?: boolean;

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

export interface Variant11 {
/**
* Path param:
*/
account_id: string;
messages?: Array<AIRunParams.TextGeneration.Message>;

/**
* Body param:
*/
messages: Array<AIRunParams.Variant11.Message>;
prompt?: string;

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

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

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

Expand Down Expand Up @@ -388,19 +330,7 @@ export namespace AIRunParams {
max_length?: number;
}

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

/**
* Body param:
*/
body: Uploadable;
}

export interface Variant15 {
export interface ImageToText {
/**
* Path param:
*/
Expand Down