Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillatrev committed Jan 3, 2024
1 parent 9fe4291 commit 66d3855
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-shadow */
/** Supported model types for summarization. */
export enum NlpModel {
export enum SummarizationModel {
STANDARD = 'standard',
PREMIUM = 'premium'
}
4 changes: 2 additions & 2 deletions src/models/async/SummarizationOptions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NlpModel } from './NlpModel';
import { SummarizationModel } from './SummarizationModel';
import { SummarizationFormattingOptions } from './SummarizationFormattingOptions';

export interface SummarizationOptions {
prompt?: string;
model?: NlpModel;
model?: SummarizationModel;
type?: SummarizationFormattingOptions;
}
10 changes: 5 additions & 5 deletions test/integration/test/async-translation-summarization.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { SummarizationJobStatus } = require('../../../dist/src/models/async/Summa
const { SummarizationFormattingOptions } = require('../../../dist/src/models/async/SummarizationFormattingOptions');
const { TranslationJobStatus } = require('../../../dist/src/models/async/TranslationJobStatus');
const { JobStatus } = require('../../../dist/src/models/JobStatus');
const { NlpModel } = require('../../../dist/src/models/async/NlpModel');
const { SummarizationModel } = require('../../../dist/src/models/async/SummarizationModel');
const { TranslationModel } = require('../../../dist/src/models/async/TranslationModel');

test('async translation/summarization submit local file', async () => {
Expand All @@ -16,7 +16,7 @@ test('async translation/summarization submit local file', async () => {

options.summarization_config = {
type:SummarizationFormattingOptions.Bullets,
model:NlpModel.PREMIUM,
model:SummarizationModel.PREMIUM,
prompt:'Try to summarize this transcript as good as you possibly can'
};

Expand All @@ -37,7 +37,7 @@ test('async translation/summarization submit local file', async () => {
expect(job.id).not.toBeNull();

expect(job.summarization).not.toBeNull();
expect(job.summarization.model).toBe(NlpModel.PREMIUM);
expect(job.summarization.model).toBe(SummarizationModel.PREMIUM);
expect(job.summarization.type).toBe(SummarizationFormattingOptions.Bullets);
expect(job.summarization.prompt).toBe('Try to summarize this transcript as good as you possibly can');

Expand Down Expand Up @@ -102,7 +102,7 @@ test('async translation/summarization submit url', async () => {

options.summarization_config = {
type:SummarizationFormattingOptions.Bullets,
model:NlpModel.PREMIUM,
model:SummarizationModel.PREMIUM,
prompt: 'Try to summarize this transcript as good as you possibly can'
};

Expand All @@ -123,7 +123,7 @@ test('async translation/summarization submit url', async () => {
expect(job.id).not.toBeNull();

expect(job.summarization).not.toBeNull();
expect(job.summarization.model).toBe(NlpModel.PREMIUM);
expect(job.summarization.model).toBe(SummarizationModel.PREMIUM);
expect(job.summarization.type).toBe(SummarizationFormattingOptions.Bullets);
expect(job.summarization.prompt).toBe('Try to summarize this transcript as good as you possibly can');

Expand Down

0 comments on commit 66d3855

Please sign in to comment.