Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored May 21, 2024
1 parent 91e9dde commit 1368ec1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-f9e32d675c53d0c72f862e43ce3f7d1be32348120d4ae83abf87affe3f9730f6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-97f285924b8a293952e67185d5d8a0cef2b7ad6080b34c4c4b233f335d6fb4d2.yml
6 changes: 3 additions & 3 deletions src/resources/audio/transcriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ export interface TranscriptionCreateParams {
prompt?: string;

/**
* The format of the transcript output, in one of these options: `json`, `text`,
* `srt`, `verbose_json`, or `vtt`.
* The format of the transcript output, in one of these options: `json`, `text`, or
* `verbose_json`.
*/
response_format?: 'json' | 'text' | 'srt' | 'verbose_json' | 'vtt';
response_format?: 'json' | 'text' | 'verbose_json';

/**
* The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
Expand Down
4 changes: 2 additions & 2 deletions src/resources/audio/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ export interface TranslationCreateParams {

/**
* The format of the transcript output, in one of these options: `json`, `text`,
* `srt`, `verbose_json`, or `vtt`.
* `verbose_json`, or `vtt`.
*/
response_format?: string;
response_format?: 'json' | 'text' | 'verbose_json';

/**
* The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
Expand Down
14 changes: 7 additions & 7 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,31 +543,31 @@ export namespace CompletionCreateParams {
}

export interface ChatToolChoice {
function?: ChatToolChoice.Function;
function: ChatToolChoice.Function;

type?: string;
type: 'function';
}

export namespace ChatToolChoice {
export interface Function {
/**
* The name of the function to call.
*/
name?: string;
name: string;
}
}

export interface Tool {
function?: Tool.Function;
function: Tool.Function;

type?: string;
type: 'function';
}

export namespace Tool {
export interface Function {
description?: string;
name: string;

name?: string;
description?: string;

parameters?: Record<string, unknown>;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/api-resources/audio/translations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('resource translations', () => {
file: await toFile(Buffer.from('# my file contents'), 'README.md'),
model: 'whisper-1',
prompt: 'string',
response_format: 'string',
response_format: 'json',
temperature: 0,
});
});
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ describe('resource completions', () => {
temperature: 0,
tool_choice: 'none',
tools: [
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'string' },
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'string' },
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'string' },
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'function' },
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'function' },
{ function: { description: 'string', name: 'string', parameters: { foo: 'bar' } }, type: 'function' },
],
top_logprobs: 0,
top_p: 0,
Expand Down

0 comments on commit 1368ec1

Please sign in to comment.