Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Sep 24, 2024
1 parent c2398e5 commit 539f9d3
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 3 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: 97
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/manugoyal%2Fbraintrust-sdk-a774951c03d7e2a49d4afa8e74454c0eef3a895ccb24d2187bdcd30b37923c66.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/manugoyal%2Fbraintrust-sdk-dd60fe261caab803c127a0f29cadcab5f1956be0a5a265100476b972b4b5b62e.yml
92 changes: 90 additions & 2 deletions src/resources/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,12 @@ export interface FunctionUpdateParams {
*/
description?: string | null;

function_data?: FunctionUpdateParams.FunctionData;
function_data?:
| FunctionUpdateParams.Prompt
| FunctionUpdateParams.Code
| FunctionUpdateParams.Global
| FunctionUpdateParams.NullableVariant
| null;

/**
* Name of the prompt
Expand All @@ -297,7 +302,90 @@ export interface FunctionUpdateParams {
}

export namespace FunctionUpdateParams {
export interface FunctionData {}
export interface Prompt {
type: 'prompt';
}

export interface Code {
data: Code.Bundle | Code.Inline;

type: 'code';
}

export namespace Code {
export interface Bundle {
bundle_id: string;

location: Bundle.Experiment | Bundle.Function;

runtime_context: Bundle.RuntimeContext;

type: 'bundle';

/**
* A preview of the code
*/
preview?: string | null;
}

export namespace Bundle {
export interface Experiment {
eval_name: string;

position: Experiment.Type | Experiment.Scorer;

type: 'experiment';
}

export namespace Experiment {
export interface Type {
type: 'task';
}

export interface Scorer {
index: number;

type: 'scorer';
}
}

export interface Function {
index: number;

type: 'function';
}

export interface RuntimeContext {
runtime: 'node' | 'python';

version: string;
}
}

export interface Inline {
code: string;

runtime_context: Inline.RuntimeContext;

type: 'inline';
}

export namespace Inline {
export interface RuntimeContext {
runtime: 'node' | 'python';

version: string;
}
}
}

export interface Global {
name: string;

type: 'global';
}

export interface NullableVariant {}
}

export interface FunctionListParams extends ListObjectsParams {
Expand Down

0 comments on commit 539f9d3

Please sign in to comment.