From 0b0cb138107945607fc3abef23e1ef2e355d748a Mon Sep 17 00:00:00 2001
From: Stainless Bot
Date: Tue, 27 Aug 2024 16:04:26 +0000
Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#112)
---
.devcontainer/Dockerfile | 0
.devcontainer/devcontainer.json | 0
.eslintrc.js | 0
.github/workflows/ci.yml | 0
.github/workflows/publish-npm.yml | 0
.github/workflows/release-doctor.yml | 0
.gitignore | 0
.prettierignore | 0
.prettierrc.json | 0
.release-please-manifest.json | 0
.stats.yml | 2 +-
Brewfile | 0
CHANGELOG.md | 0
CODEOWNERS | 0
CONTRIBUTING.md | 0
LICENSE | 0
README.md | 0
SECURITY.md | 0
api.md | 0
bin/check-release-environment | 0
bin/publish-npm | 0
examples/.keep | 0
examples/chat_completion.js | 0
examples/chat_completion_stop.js | 0
examples/chat_completion_streaming.js | 0
jest.config.ts | 0
package.json | 0
release-please-config.json | 0
scripts/utils/check-version.cjs | 0
scripts/utils/fix-index-exports.cjs | 0
scripts/utils/make-dist-package-json.cjs | 0
scripts/utils/postprocess-files.cjs | 0
src/_shims/MultipartBody.ts | 0
src/_shims/README.md | 0
src/_shims/auto/runtime-bun.ts | 0
src/_shims/auto/runtime-deno.ts | 0
src/_shims/auto/runtime-node.ts | 0
src/_shims/auto/runtime.ts | 0
src/_shims/auto/types-deno.ts | 0
src/_shims/auto/types-node.ts | 0
src/_shims/auto/types.d.ts | 0
src/_shims/auto/types.js | 0
src/_shims/auto/types.mjs | 0
src/_shims/bun-runtime.ts | 0
src/_shims/index-deno.ts | 0
src/_shims/index.d.ts | 0
src/_shims/index.js | 0
src/_shims/index.mjs | 0
src/_shims/manual-types.d.ts | 0
src/_shims/manual-types.js | 0
src/_shims/manual-types.mjs | 0
src/_shims/node-runtime.ts | 0
src/_shims/node-types.d.ts | 0
src/_shims/node-types.js | 0
src/_shims/node-types.mjs | 0
src/_shims/registry.ts | 0
src/_shims/web-runtime.ts | 0
src/_shims/web-types.d.ts | 0
src/_shims/web-types.js | 0
src/_shims/web-types.mjs | 0
src/core.ts | 0
src/error.ts | 0
src/index.ts | 0
src/lib/.keep | 0
src/lib/streaming.ts | 0
src/resource.ts | 0
src/resources/audio/audio.ts | 0
src/resources/audio/index.ts | 0
src/resources/audio/transcriptions.ts | 1 -
src/resources/audio/translations.ts | 0
src/resources/chat/chat.ts | 0
src/resources/chat/completions.ts | 40 -------------------
src/resources/chat/index.ts | 0
src/resources/completions.ts | 0
src/resources/embeddings.ts | 0
src/resources/index.ts | 0
src/resources/models.ts | 0
src/resources/shared.ts | 0
src/shims/node.ts | 0
src/shims/web.ts | 0
src/uploads.ts | 0
src/version.ts | 0
.../audio/transcriptions.test.ts | 0
.../api-resources/audio/translations.test.ts | 0
tests/api-resources/chat/completions.test.ts | 3 +-
tests/api-resources/embeddings.test.ts | 0
tests/api-resources/models.test.ts | 0
tests/form.test.ts | 0
tests/index.test.ts | 0
tests/responses.test.ts | 0
tests/stringifyQuery.test.ts | 0
tests/uploads.test.ts | 0
tsc-multi.json | 0
tsconfig.build.json | 0
tsconfig.deno.json | 0
tsconfig.dist-src.json | 0
tsconfig.json | 0
yarn.lock | 0
98 files changed, 2 insertions(+), 44 deletions(-)
mode change 100644 => 100755 .devcontainer/Dockerfile
mode change 100644 => 100755 .devcontainer/devcontainer.json
mode change 100644 => 100755 .eslintrc.js
mode change 100644 => 100755 .github/workflows/ci.yml
mode change 100644 => 100755 .github/workflows/publish-npm.yml
mode change 100644 => 100755 .github/workflows/release-doctor.yml
mode change 100644 => 100755 .gitignore
mode change 100644 => 100755 .prettierignore
mode change 100644 => 100755 .prettierrc.json
mode change 100644 => 100755 .release-please-manifest.json
mode change 100644 => 100755 .stats.yml
mode change 100644 => 100755 Brewfile
mode change 100644 => 100755 CHANGELOG.md
mode change 100644 => 100755 CODEOWNERS
mode change 100644 => 100755 CONTRIBUTING.md
mode change 100644 => 100755 LICENSE
mode change 100644 => 100755 README.md
mode change 100644 => 100755 SECURITY.md
mode change 100644 => 100755 api.md
mode change 100644 => 100755 bin/check-release-environment
mode change 100644 => 100755 bin/publish-npm
mode change 100644 => 100755 examples/.keep
mode change 100644 => 100755 examples/chat_completion.js
mode change 100644 => 100755 examples/chat_completion_stop.js
mode change 100644 => 100755 examples/chat_completion_streaming.js
mode change 100644 => 100755 jest.config.ts
mode change 100644 => 100755 package.json
mode change 100644 => 100755 release-please-config.json
mode change 100644 => 100755 scripts/utils/check-version.cjs
mode change 100644 => 100755 scripts/utils/fix-index-exports.cjs
mode change 100644 => 100755 scripts/utils/make-dist-package-json.cjs
mode change 100644 => 100755 scripts/utils/postprocess-files.cjs
mode change 100644 => 100755 src/_shims/MultipartBody.ts
mode change 100644 => 100755 src/_shims/README.md
mode change 100644 => 100755 src/_shims/auto/runtime-bun.ts
mode change 100644 => 100755 src/_shims/auto/runtime-deno.ts
mode change 100644 => 100755 src/_shims/auto/runtime-node.ts
mode change 100644 => 100755 src/_shims/auto/runtime.ts
mode change 100644 => 100755 src/_shims/auto/types-deno.ts
mode change 100644 => 100755 src/_shims/auto/types-node.ts
mode change 100644 => 100755 src/_shims/auto/types.d.ts
mode change 100644 => 100755 src/_shims/auto/types.js
mode change 100644 => 100755 src/_shims/auto/types.mjs
mode change 100644 => 100755 src/_shims/bun-runtime.ts
mode change 100644 => 100755 src/_shims/index-deno.ts
mode change 100644 => 100755 src/_shims/index.d.ts
mode change 100644 => 100755 src/_shims/index.js
mode change 100644 => 100755 src/_shims/index.mjs
mode change 100644 => 100755 src/_shims/manual-types.d.ts
mode change 100644 => 100755 src/_shims/manual-types.js
mode change 100644 => 100755 src/_shims/manual-types.mjs
mode change 100644 => 100755 src/_shims/node-runtime.ts
mode change 100644 => 100755 src/_shims/node-types.d.ts
mode change 100644 => 100755 src/_shims/node-types.js
mode change 100644 => 100755 src/_shims/node-types.mjs
mode change 100644 => 100755 src/_shims/registry.ts
mode change 100644 => 100755 src/_shims/web-runtime.ts
mode change 100644 => 100755 src/_shims/web-types.d.ts
mode change 100644 => 100755 src/_shims/web-types.js
mode change 100644 => 100755 src/_shims/web-types.mjs
mode change 100644 => 100755 src/core.ts
mode change 100644 => 100755 src/error.ts
mode change 100644 => 100755 src/index.ts
mode change 100644 => 100755 src/lib/.keep
mode change 100644 => 100755 src/lib/streaming.ts
mode change 100644 => 100755 src/resource.ts
mode change 100644 => 100755 src/resources/audio/audio.ts
mode change 100644 => 100755 src/resources/audio/index.ts
mode change 100644 => 100755 src/resources/audio/transcriptions.ts
mode change 100644 => 100755 src/resources/audio/translations.ts
mode change 100644 => 100755 src/resources/chat/chat.ts
mode change 100644 => 100755 src/resources/chat/completions.ts
mode change 100644 => 100755 src/resources/chat/index.ts
mode change 100644 => 100755 src/resources/completions.ts
mode change 100644 => 100755 src/resources/embeddings.ts
mode change 100644 => 100755 src/resources/index.ts
mode change 100644 => 100755 src/resources/models.ts
mode change 100644 => 100755 src/resources/shared.ts
mode change 100644 => 100755 src/shims/node.ts
mode change 100644 => 100755 src/shims/web.ts
mode change 100644 => 100755 src/uploads.ts
mode change 100644 => 100755 src/version.ts
mode change 100644 => 100755 tests/api-resources/audio/transcriptions.test.ts
mode change 100644 => 100755 tests/api-resources/audio/translations.test.ts
mode change 100644 => 100755 tests/api-resources/chat/completions.test.ts
mode change 100644 => 100755 tests/api-resources/embeddings.test.ts
mode change 100644 => 100755 tests/api-resources/models.test.ts
mode change 100644 => 100755 tests/form.test.ts
mode change 100644 => 100755 tests/index.test.ts
mode change 100644 => 100755 tests/responses.test.ts
mode change 100644 => 100755 tests/stringifyQuery.test.ts
mode change 100644 => 100755 tests/uploads.test.ts
mode change 100644 => 100755 tsc-multi.json
mode change 100644 => 100755 tsconfig.build.json
mode change 100644 => 100755 tsconfig.deno.json
mode change 100644 => 100755 tsconfig.dist-src.json
mode change 100644 => 100755 tsconfig.json
mode change 100644 => 100755 yarn.lock
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
old mode 100644
new mode 100755
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
old mode 100644
new mode 100755
diff --git a/.eslintrc.js b/.eslintrc.js
old mode 100644
new mode 100755
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
old mode 100644
new mode 100755
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
old mode 100644
new mode 100755
diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml
old mode 100644
new mode 100755
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.prettierignore b/.prettierignore
old mode 100644
new mode 100755
diff --git a/.prettierrc.json b/.prettierrc.json
old mode 100644
new mode 100755
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
old mode 100644
new mode 100755
diff --git a/.stats.yml b/.stats.yml
old mode 100644
new mode 100755
index 98dbe58..2740b98
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 7
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-a10a2e26af1859694bf25612d54e7909296f7aaf82822c6a1681632bf28ec669.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-1f0d266ba97b03672f10d33a6dc6e324af9a95646f978ffbff6a31f3907bbfe7.yml
diff --git a/Brewfile b/Brewfile
old mode 100644
new mode 100755
diff --git a/CHANGELOG.md b/CHANGELOG.md
old mode 100644
new mode 100755
diff --git a/CODEOWNERS b/CODEOWNERS
old mode 100644
new mode 100755
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/SECURITY.md b/SECURITY.md
old mode 100644
new mode 100755
diff --git a/api.md b/api.md
old mode 100644
new mode 100755
diff --git a/bin/check-release-environment b/bin/check-release-environment
old mode 100644
new mode 100755
diff --git a/bin/publish-npm b/bin/publish-npm
old mode 100644
new mode 100755
diff --git a/examples/.keep b/examples/.keep
old mode 100644
new mode 100755
diff --git a/examples/chat_completion.js b/examples/chat_completion.js
old mode 100644
new mode 100755
diff --git a/examples/chat_completion_stop.js b/examples/chat_completion_stop.js
old mode 100644
new mode 100755
diff --git a/examples/chat_completion_streaming.js b/examples/chat_completion_streaming.js
old mode 100644
new mode 100755
diff --git a/jest.config.ts b/jest.config.ts
old mode 100644
new mode 100755
diff --git a/package.json b/package.json
old mode 100644
new mode 100755
diff --git a/release-please-config.json b/release-please-config.json
old mode 100644
new mode 100755
diff --git a/scripts/utils/check-version.cjs b/scripts/utils/check-version.cjs
old mode 100644
new mode 100755
diff --git a/scripts/utils/fix-index-exports.cjs b/scripts/utils/fix-index-exports.cjs
old mode 100644
new mode 100755
diff --git a/scripts/utils/make-dist-package-json.cjs b/scripts/utils/make-dist-package-json.cjs
old mode 100644
new mode 100755
diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs
old mode 100644
new mode 100755
diff --git a/src/_shims/MultipartBody.ts b/src/_shims/MultipartBody.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/README.md b/src/_shims/README.md
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/runtime-bun.ts b/src/_shims/auto/runtime-bun.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/runtime-deno.ts b/src/_shims/auto/runtime-deno.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/runtime-node.ts b/src/_shims/auto/runtime-node.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/runtime.ts b/src/_shims/auto/runtime.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/types-deno.ts b/src/_shims/auto/types-deno.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/types-node.ts b/src/_shims/auto/types-node.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/types.d.ts b/src/_shims/auto/types.d.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/types.js b/src/_shims/auto/types.js
old mode 100644
new mode 100755
diff --git a/src/_shims/auto/types.mjs b/src/_shims/auto/types.mjs
old mode 100644
new mode 100755
diff --git a/src/_shims/bun-runtime.ts b/src/_shims/bun-runtime.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/index-deno.ts b/src/_shims/index-deno.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/index.d.ts b/src/_shims/index.d.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/index.js b/src/_shims/index.js
old mode 100644
new mode 100755
diff --git a/src/_shims/index.mjs b/src/_shims/index.mjs
old mode 100644
new mode 100755
diff --git a/src/_shims/manual-types.d.ts b/src/_shims/manual-types.d.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/manual-types.js b/src/_shims/manual-types.js
old mode 100644
new mode 100755
diff --git a/src/_shims/manual-types.mjs b/src/_shims/manual-types.mjs
old mode 100644
new mode 100755
diff --git a/src/_shims/node-runtime.ts b/src/_shims/node-runtime.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/node-types.d.ts b/src/_shims/node-types.d.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/node-types.js b/src/_shims/node-types.js
old mode 100644
new mode 100755
diff --git a/src/_shims/node-types.mjs b/src/_shims/node-types.mjs
old mode 100644
new mode 100755
diff --git a/src/_shims/registry.ts b/src/_shims/registry.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/web-runtime.ts b/src/_shims/web-runtime.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/web-types.d.ts b/src/_shims/web-types.d.ts
old mode 100644
new mode 100755
diff --git a/src/_shims/web-types.js b/src/_shims/web-types.js
old mode 100644
new mode 100755
diff --git a/src/_shims/web-types.mjs b/src/_shims/web-types.mjs
old mode 100644
new mode 100755
diff --git a/src/core.ts b/src/core.ts
old mode 100644
new mode 100755
diff --git a/src/error.ts b/src/error.ts
old mode 100644
new mode 100755
diff --git a/src/index.ts b/src/index.ts
old mode 100644
new mode 100755
diff --git a/src/lib/.keep b/src/lib/.keep
old mode 100644
new mode 100755
diff --git a/src/lib/streaming.ts b/src/lib/streaming.ts
old mode 100644
new mode 100755
diff --git a/src/resource.ts b/src/resource.ts
old mode 100644
new mode 100755
diff --git a/src/resources/audio/audio.ts b/src/resources/audio/audio.ts
old mode 100644
new mode 100755
diff --git a/src/resources/audio/index.ts b/src/resources/audio/index.ts
old mode 100644
new mode 100755
diff --git a/src/resources/audio/transcriptions.ts b/src/resources/audio/transcriptions.ts
old mode 100644
new mode 100755
index 6705f3b..b39677c
--- a/src/resources/audio/transcriptions.ts
+++ b/src/resources/audio/transcriptions.ts
@@ -75,7 +75,6 @@ export interface TranscriptionCreateParams {
| 'da'
| 'hu'
| 'ta'
- | 'no'
| 'th'
| 'ur'
| 'hr'
diff --git a/src/resources/audio/translations.ts b/src/resources/audio/translations.ts
old mode 100644
new mode 100755
diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts
old mode 100644
new mode 100755
diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts
old mode 100644
new mode 100755
index 26e6012..f6e7642
--- a/src/resources/chat/completions.ts
+++ b/src/resources/chat/completions.ts
@@ -143,11 +143,6 @@ export interface ChatCompletionAssistantMessageParam {
*/
name?: string;
- /**
- * DO NOT USE. This field is present because OpenAI allows it and userssend it.
- */
- tool_call_id?: string | null;
-
/**
* The tool calls generated by the model, such as function calls.
*/
@@ -417,11 +412,6 @@ export interface ChatCompletionFunctionMessageParam {
* The role of the messages author, in this case `function`.
*/
role: 'function';
-
- /**
- * DO NOT USE. This field is present because OpenAI allows it and users send it.
- */
- tool_call_id?: string | null;
}
/**
@@ -558,11 +548,6 @@ export interface ChatCompletionSystemMessageParam {
* differentiate between participants of the same role.
*/
name?: string;
-
- /**
- * DO NOT USE. This field is present because OpenAI allows it and userssend it.
- */
- tool_call_id?: string | null;
}
export interface ChatCompletionTokenLogprob {
@@ -655,11 +640,6 @@ export interface ChatCompletionToolMessageParam {
* Tool call that this message is responding to.
*/
tool_call_id: string;
-
- /**
- * DO NOT USE. This field is present because OpenAI allows it and userssend it.
- */
- name?: string;
}
export interface ChatCompletionUserMessageParam {
@@ -678,11 +658,6 @@ export interface ChatCompletionUserMessageParam {
* differentiate between participants of the same role.
*/
name?: string;
-
- /**
- * DO NOT USE. This field is present because OpenAI allows it and userssend it.
- */
- tool_call_id?: string | null;
}
export type ChatCompletionCreateParams =
@@ -801,11 +776,6 @@ export interface ChatCompletionCreateParamsBase {
*/
stream?: boolean | null;
- /**
- * Options for streaming response. Only set this when you set `stream: true`.
- */
- stream_options?: CompletionCreateParams.StreamOptions | null;
-
/**
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
* make the output more random, while lower values like 0.2 will make it more
@@ -900,16 +870,6 @@ export namespace CompletionCreateParams {
*/
type?: 'text' | 'json_object';
}
-
- /**
- * Options for streaming response. Only set this when you set `stream: true`.
- */
- export interface StreamOptions {
- /**
- * This field is unused
- */
- include_usage?: boolean;
- }
}
export interface ChatCompletionCreateParamsNonStreaming extends ChatCompletionCreateParamsBase {
diff --git a/src/resources/chat/index.ts b/src/resources/chat/index.ts
old mode 100644
new mode 100755
diff --git a/src/resources/completions.ts b/src/resources/completions.ts
old mode 100644
new mode 100755
diff --git a/src/resources/embeddings.ts b/src/resources/embeddings.ts
old mode 100644
new mode 100755
diff --git a/src/resources/index.ts b/src/resources/index.ts
old mode 100644
new mode 100755
diff --git a/src/resources/models.ts b/src/resources/models.ts
old mode 100644
new mode 100755
diff --git a/src/resources/shared.ts b/src/resources/shared.ts
old mode 100644
new mode 100755
diff --git a/src/shims/node.ts b/src/shims/node.ts
old mode 100644
new mode 100755
diff --git a/src/shims/web.ts b/src/shims/web.ts
old mode 100644
new mode 100755
diff --git a/src/uploads.ts b/src/uploads.ts
old mode 100644
new mode 100755
diff --git a/src/version.ts b/src/version.ts
old mode 100644
new mode 100755
diff --git a/tests/api-resources/audio/transcriptions.test.ts b/tests/api-resources/audio/transcriptions.test.ts
old mode 100644
new mode 100755
diff --git a/tests/api-resources/audio/translations.test.ts b/tests/api-resources/audio/translations.test.ts
old mode 100644
new mode 100755
diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts
old mode 100644
new mode 100755
index eae9614..c561668
--- a/tests/api-resources/chat/completions.test.ts
+++ b/tests/api-resources/chat/completions.test.ts
@@ -25,7 +25,7 @@ describe('resource completions', () => {
test('create: required and optional params', async () => {
const response = await client.chat.completions.create({
- messages: [{ content: 'content', role: 'system', name: 'name', tool_call_id: 'tool_call_id' }],
+ messages: [{ content: 'content', role: 'system', name: 'name' }],
model: 'string',
frequency_penalty: -2,
function_call: 'none',
@@ -44,7 +44,6 @@ describe('resource completions', () => {
seed: 0,
stop: '\n',
stream: true,
- stream_options: { include_usage: true },
temperature: 1,
tool_choice: 'none',
tools: [
diff --git a/tests/api-resources/embeddings.test.ts b/tests/api-resources/embeddings.test.ts
old mode 100644
new mode 100755
diff --git a/tests/api-resources/models.test.ts b/tests/api-resources/models.test.ts
old mode 100644
new mode 100755
diff --git a/tests/form.test.ts b/tests/form.test.ts
old mode 100644
new mode 100755
diff --git a/tests/index.test.ts b/tests/index.test.ts
old mode 100644
new mode 100755
diff --git a/tests/responses.test.ts b/tests/responses.test.ts
old mode 100644
new mode 100755
diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts
old mode 100644
new mode 100755
diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts
old mode 100644
new mode 100755
diff --git a/tsc-multi.json b/tsc-multi.json
old mode 100644
new mode 100755
diff --git a/tsconfig.build.json b/tsconfig.build.json
old mode 100644
new mode 100755
diff --git a/tsconfig.deno.json b/tsconfig.deno.json
old mode 100644
new mode 100755
diff --git a/tsconfig.dist-src.json b/tsconfig.dist-src.json
old mode 100644
new mode 100755
diff --git a/tsconfig.json b/tsconfig.json
old mode 100644
new mode 100755
diff --git a/yarn.lock b/yarn.lock
old mode 100644
new mode 100755