Skip to content

Commit

Permalink
chore: extra runWithSdk
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Dec 16, 2024
1 parent 43f3d4f commit a686c55
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions clients/ai-assistants-v1/sdk/runSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@ export type ListenRunProps = TypeFromProtoc<ListenRunRequest, 'runId'>;

type RunClientType = Client<typeof RunServiceService, ClientCallArgs>;

export const runWithSdk = <T extends Pick<Run, 'id'>>(
session: SessionArg,
run: T,
{
runSdk = initRunSdk(session),
}: {
runSdk?: RunSdk;
},
) => {
const listen = (params: Omit<ListenRunProps, 'runId'>, args?: ClientCallArgs & CallOptions) => {
return runSdk.listen({ ...params, runId: run.id }, args);
};

return Object.assign(run, { listen });
};

export class RunWithSdk {
private runSdk: RunSdk;
private run: Run;
Expand Down

0 comments on commit a686c55

Please sign in to comment.