Skip to content

Commit

Permalink
fix(js): add sourceRunId prop in createExample
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd committed Sep 9, 2024
1 parent 3e741d7 commit f01f602
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ export type CreateExampleOptions = {

metadata?: KVMap;
split?: string | string[];
sourceRunId?: string;
};

type AutoBatchQueueItem = {
Expand Down Expand Up @@ -2287,6 +2288,7 @@ export class Client {
createdAt,
exampleId,
metadata,
sourceRunId,
split,
}: CreateExampleOptions
): Promise<Example> {
Expand All @@ -2309,6 +2311,7 @@ export class Client {
id: exampleId,
metadata,
split,
source_run_id: sourceRunId,
};

const response = await this.caller.call(fetch, `${this.apiUrl}/examples`, {
Expand Down
1 change: 1 addition & 0 deletions js/src/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export interface ExampleCreate extends BaseExample {
id?: string;
created_at?: string;
split?: string | string[];
source_run_id?: string;
}

export interface Example extends BaseExample {
Expand Down

0 comments on commit f01f602

Please sign in to comment.