Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Oct 30, 2023
1 parent c34e769 commit 6a54481
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/wrapper/HumeBatchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Job } from "./Job";

export class HumeBatchClient extends FernClient {
public async submitJob(request: Hume.BaseRequest = {}): Promise<Job> {
const { jobId } = await super.submitJob(request);
const { job_id } = await super.submitJob(request);
return new Job(jobId, this);

Check failure on line 8 in src/wrapper/HumeBatchClient.ts

View workflow job for this annotation

GitHub Actions / compile

Cannot find name 'jobId'. Did you mean 'job_id'?
}
}
17 changes: 17 additions & 0 deletions src/wrapper/HumeStreamClient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as Hume from "../api";
import * as core from "../core";

export declare namespace HumeStreamClient {
interface Options {
apiKey: core.Supplier<string>;
}

interface RequestOptions {
timeoutInSeconds?: number;
maxRetries?: number;
}
}

export class HumeStreamClient {
constructor(protected readonly _options: HumeStreamClient.Options) {}
}
7 changes: 2 additions & 5 deletions src/wrapper/Job.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import { createWriteStream } from "fs";
import { writeFile } from "fs/promises";
import { pipeline } from "stream/promises";
import * as Hume from "../api";
import * as errors from "../errors";
import { HumeBatchClient } from "./HumeBatchClient";

export class Job implements Hume.JobId {
constructor(public readonly jobId: string, private readonly client: HumeBatchClient) {}
constructor(public readonly job_id: string, private readonly client: HumeBatchClient) {}

public async awaitCompletion(timeoutInSeconds = 300): Promise<void> {
return new Promise((resolve, reject) => {
const poller = new JobCompletionPoller(this.jobId, this.client);
const poller = new JobCompletionPoller(this.job_id, this.client);
poller.start(resolve);
setTimeout(() => {
poller.stop();
Expand Down

0 comments on commit 6a54481

Please sign in to comment.