From 175c4df13c39fa4d5392492266788d2d3a6ac473 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Thu, 8 Aug 2024 20:20:58 +0000 Subject: [PATCH] chore(internal): updates --- .stats.yml | 2 +- package.json | 2 +- scripts/format | 2 +- scripts/lint | 2 +- src/resources/chat/chat.ts | 2 +- src/resources/chat/completions.ts | 5 +++++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index ac652c927..cad2c64cd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 68 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-4097c2f86beb3f3bb021775cd1dfa240e960caf842aeefc2e08da4dc0851ea79.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-97797a9363b9960b5f2fbdc84426a2b91e75533ecd409fe99e37c231180a4339.yml diff --git a/package.json b/package.json index 5e8b7ea8f..b9b107b08 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build; fi", "tsn": "ts-node -r tsconfig-paths/register", "lint": "./scripts/lint", - "fix": "eslint --fix --ext ts,js ." + "fix": "./scripts/format" }, "dependencies": { "@types/node": "^18.11.18", diff --git a/scripts/format b/scripts/format index d297e762f..a6bb9d03a 100755 --- a/scripts/format +++ b/scripts/format @@ -5,4 +5,4 @@ set -e cd "$(dirname "$0")/.." echo "==> Running eslint --fix" -./node_modules/.bin/eslint --fix --ext ts,js . +ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --fix --ext ts,js . diff --git a/scripts/lint b/scripts/lint index 6b0e5dc3e..4af1de013 100755 --- a/scripts/lint +++ b/scripts/lint @@ -5,4 +5,4 @@ set -e cd "$(dirname "$0")/.." echo "==> Running eslint" -./node_modules/.bin/eslint --ext ts,js . +ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --ext ts,js . diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index 031b4059b..684b1307a 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -10,8 +10,8 @@ export class Chat extends APIResource { export type ChatModel = | 'gpt-4o' - | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' + | 'gpt-4o-2024-08-06' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 91d7da801..26e7490e0 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -829,6 +829,11 @@ export interface ChatCompletionCreateParamsBase { * [GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and * all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. * + * Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured + * Outputs which guarantees the model will match your supplied JSON schema. Learn + * more in the + * [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs). + * * Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the * message the model generates is valid JSON. *