Skip to content

Commit cd78b7e

Browse files
whoseoysterstainless-app[bot]
authored andcommitted
ci: linting errors
1 parent 17acfcd commit cd78b7e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/openai-dev-mode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ export class MyModel {
2020
private openlayerInferencePipelineId: string;
2121

2222
constructor() {
23-
this.openaiApiKey = process.env.OPENAI_API_KEY || '';
24-
this.openlayerApiKey = process.env.OPENLAYER_API_KEY || '';
23+
this.openaiApiKey = process.env['OPENAI_API_KEY'] || '';
24+
this.openlayerApiKey = process.env['OPENLAYER_API_KEY'] || '';
2525
// (Optional) if set will enable monitoring requests
26-
this.openlayerInferencePipelineId = process.env.OPENLAYER_INFERENCE_PIPELINE_ID || '';
26+
this.openlayerInferencePipelineId = process.env['OPENLAYER_INFERENCE_PIPELINE_ID'] || '';
2727

2828
const openlayerClient = new Openlayer({ apiKey: this.openlayerApiKey });
2929

@@ -49,7 +49,7 @@ export class MyModel {
4949
},
5050
undefined,
5151
);
52-
const result = (response as ChatCompletion).choices[0].message.content;
52+
const result = (response as ChatCompletion).choices[0]?.message.content;
5353
return { otherFields: { model }, output: result };
5454
}
5555
}

tests/api-resources/projects/commits.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const openlayer = new Openlayer({
1010

1111
describe('resource commits', () => {
1212
test('create: only required params', async () => {
13-
const responsePromise = client.projects.commits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
13+
const responsePromise = openlayer.projects.commits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
1414
commit: { message: 'Updated the prompt.' },
1515
storageUri: 's3://...',
1616
});
@@ -24,7 +24,7 @@ describe('resource commits', () => {
2424
});
2525

2626
test('create: required and optional params', async () => {
27-
const response = await client.projects.commits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
27+
const response = await openlayer.projects.commits.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
2828
commit: { message: 'Updated the prompt.' },
2929
storageUri: 's3://...',
3030
archived: false,

0 commit comments

Comments
 (0)