Skip to content

Commit 0faa765

Browse files
stainless-app[bot]Stainless Botdependabot[bot]
authored
release: 0.9.0 (#132)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Stainless Bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent fe33cf4 commit 0faa765

14 files changed

+63
-83
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.8.0"
2+
".": "0.9.0"
33
}

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 7
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-2e2427d7a1c97af4cb989c736fabccf1531532dd3487d330c851db96d6c5da1c.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-98874226a7dcad763f5fb96534de25a43f9187733a5293fa278b0b61bf71a9b3.yml

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## 0.9.0 (2024-12-03)
4+
5+
Full Changelog: [v0.8.0...v0.9.0](https://github.com/groq/groq-typescript/compare/v0.8.0...v0.9.0)
6+
7+
### Features
8+
9+
* **api:** api update ([#133](https://github.com/groq/groq-typescript/issues/133)) ([9a22d20](https://github.com/groq/groq-typescript/commit/9a22d20b157fa1670d24cc0efae40081e53bfbd0))
10+
* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 ([#138](https://github.com/groq/groq-typescript/issues/138)) ([ba61485](https://github.com/groq/groq-typescript/commit/ba61485623efcb4413b6019c48dbfaf9eec053cf))
11+
* **internal:** make git install file structure match npm ([#137](https://github.com/groq/groq-typescript/issues/137)) ([0ae2b87](https://github.com/groq/groq-typescript/commit/0ae2b87c484394211a8f1df81a0a86fdb2082521))
12+
13+
14+
### Chores
15+
16+
* **internal:** version bump ([#131](https://github.com/groq/groq-typescript/issues/131)) ([7ba4fdf](https://github.com/groq/groq-typescript/commit/7ba4fdf0782fd0525e14c1a3ac9df3379579ca55))
17+
* rebuild project due to codegen change ([#134](https://github.com/groq/groq-typescript/issues/134)) ([e2711d6](https://github.com/groq/groq-typescript/commit/e2711d609491d4ba1b72db5844449e8aec18f80c))
18+
* remove redundant word in comment ([#136](https://github.com/groq/groq-typescript/issues/136)) ([0b0cd01](https://github.com/groq/groq-typescript/commit/0b0cd01015cd2516c5d1b72f4ad495babacdb794))
19+
20+
21+
### Documentation
22+
23+
* remove suggestion to use `npm` call out ([#135](https://github.com/groq/groq-typescript/issues/135)) ([29cb7b1](https://github.com/groq/groq-typescript/commit/29cb7b1b26f02c5284873da6380bbfe3e4099d88))
24+
325
## 0.8.0 (2024-11-09)
426

527
Full Changelog: [v0.7.0...v0.8.0](https://github.com/groq/groq-typescript/compare/v0.7.0...v0.8.0)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ TypeScript >= 4.5 is supported.
323323
The following runtimes are supported:
324324

325325
- Node.js 18 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
326-
- Deno v1.28.0 or higher, using `import Groq from "npm:groq-sdk"`.
326+
- Deno v1.28.0 or higher.
327327
- Bun 1.0 or later.
328328
- Cloudflare Workers.
329329
- Vercel Edge Runtime.

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "groq-sdk",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"description": "The official TypeScript library for the Groq API",
55
"author": "Groq <[email protected]>",
66
"types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
1818
"build": "./scripts/build",
1919
"prepublishOnly": "echo 'to publish, run yarn build && (cd dist; yarn publish)' && exit 1",
2020
"format": "prettier --write --cache --cache-strategy metadata . !dist",
21-
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build; fi",
21+
"prepare": "if ./scripts/utils/check-is-in-git-install.sh; then ./scripts/build && ./scripts/utils/git-swap.sh; fi",
2222
"tsn": "ts-node -r tsconfig-paths/register",
2323
"lint": "./scripts/lint",
2424
"fix": "./scripts/format"
@@ -45,7 +45,6 @@
4545
"jest": "^29.4.0",
4646
"prettier": "^3.0.0",
4747
"ts-jest": "^29.1.0",
48-
"ts-morph": "^19.0.0",
4948
"ts-node": "^10.5.0",
5049
"tsc-multi": "^1.1.0",
5150
"tsconfig-paths": "^4.0.0",

scripts/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ npm exec tsc-multi
3232
# copy over handwritten .js/.mjs/.d.ts files
3333
cp src/_shims/*.{d.ts,js,mjs,md} dist/_shims
3434
cp src/_shims/auto/*.{d.ts,js,mjs} dist/_shims/auto
35-
# we need to add exports = module.exports = Groq Node to index.js;
35+
# we need to add exports = module.exports = Groq to index.js;
3636
# No way to get that from index.ts because it would cause compile errors
3737
# when building .mjs
3838
node scripts/utils/fix-index-exports.cjs

scripts/utils/check-is-in-git-install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# Check if you happen to call prepare for a repository that's already in node_modules.
33
[ "$(basename "$(dirname "$PWD")")" = 'node_modules' ] ||
44
# The name of the containing directory that 'npm` uses, which looks like

scripts/utils/git-swap.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -exuo pipefail
3+
# the package is published to NPM from ./dist
4+
# we want the final file structure for git installs to match the npm installs, so we
5+
6+
# delete everything except ./dist and ./node_modules
7+
find . -maxdepth 1 -mindepth 1 ! -name 'dist' ! -name 'node_modules' -exec rm -rf '{}' +
8+
9+
# move everything from ./dist to .
10+
mv dist/* .
11+
12+
# delete the now-empty ./dist
13+
rmdir dist

src/index.ts

+17-20
Original file line numberDiff line numberDiff line change
@@ -184,31 +184,11 @@ export class Groq extends Core.APIClient {
184184
static fileFromPath = Uploads.fileFromPath;
185185
}
186186

187-
export {
188-
GroqError,
189-
APIError,
190-
APIConnectionError,
191-
APIConnectionTimeoutError,
192-
APIUserAbortError,
193-
NotFoundError,
194-
ConflictError,
195-
RateLimitError,
196-
BadRequestError,
197-
AuthenticationError,
198-
InternalServerError,
199-
PermissionDeniedError,
200-
UnprocessableEntityError,
201-
} from './error';
202-
203-
export import toFile = Uploads.toFile;
204-
export import fileFromPath = Uploads.fileFromPath;
205-
206187
Groq.Completions = Completions;
207188
Groq.Chat = Chat;
208189
Groq.Embeddings = Embeddings;
209190
Groq.Audio = Audio;
210191
Groq.Models = Models;
211-
212192
export declare namespace Groq {
213193
export type RequestOptions = Core.RequestOptions;
214194

@@ -237,4 +217,21 @@ export declare namespace Groq {
237217
export type FunctionParameters = API.FunctionParameters;
238218
}
239219

220+
export { toFile, fileFromPath } from './uploads';
221+
export {
222+
GroqError,
223+
APIError,
224+
APIConnectionError,
225+
APIConnectionTimeoutError,
226+
APIUserAbortError,
227+
NotFoundError,
228+
ConflictError,
229+
RateLimitError,
230+
BadRequestError,
231+
AuthenticationError,
232+
InternalServerError,
233+
PermissionDeniedError,
234+
UnprocessableEntityError,
235+
} from './error';
236+
240237
export default Groq;

src/resources/audio/transcriptions.ts

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface TranscriptionCreateParams {
7474
| 'da'
7575
| 'hu'
7676
| 'ta'
77+
| 'no'
7778
| 'th'
7879
| 'ur'
7980
| 'hr'

src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '0.8.0'; // x-release-please-version
1+
export const VERSION = '0.9.0'; // x-release-please-version

tests/api-resources/audio/transcriptions.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('resource transcriptions', () => {
3131
prompt: 'prompt',
3232
response_format: 'json',
3333
temperature: 0,
34-
timestamp_granularities: ['word', 'segment'],
34+
timestamp_granularities: ['word'],
3535
});
3636
});
3737
});

tests/api-resources/chat/completions.test.ts

+1-13
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ describe('resource completions', () => {
2929
model: 'string',
3030
frequency_penalty: -2,
3131
function_call: 'none',
32-
functions: [
33-
{ name: 'name', description: 'description', parameters: { foo: 'bar' } },
34-
{ name: 'name', description: 'description', parameters: { foo: 'bar' } },
35-
{ name: 'name', description: 'description', parameters: { foo: 'bar' } },
36-
],
32+
functions: [{ name: 'name', description: 'description', parameters: { foo: 'bar' } }],
3733
logit_bias: { foo: 0 },
3834
logprobs: true,
3935
max_tokens: 0,
@@ -51,14 +47,6 @@ describe('resource completions', () => {
5147
function: { name: 'name', description: 'description', parameters: { foo: 'bar' } },
5248
type: 'function',
5349
},
54-
{
55-
function: { name: 'name', description: 'description', parameters: { foo: 'bar' } },
56-
type: 'function',
57-
},
58-
{
59-
function: { name: 'name', description: 'description', parameters: { foo: 'bar' } },
60-
type: 'function',
61-
},
6250
],
6351
top_logprobs: 0,
6452
top_p: 1,

yarn.lock

-40
Original file line numberDiff line numberDiff line change
@@ -759,16 +759,6 @@
759759
dependencies:
760760
"@swc/counter" "^0.1.3"
761761

762-
"@ts-morph/common@~0.20.0":
763-
version "0.20.0"
764-
resolved "https://registry.yarnpkg.com/@ts-morph/common/-/common-0.20.0.tgz#3f161996b085ba4519731e4d24c35f6cba5b80af"
765-
integrity sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q==
766-
dependencies:
767-
fast-glob "^3.2.12"
768-
minimatch "^7.4.3"
769-
mkdirp "^2.1.6"
770-
path-browserify "^1.0.1"
771-
772762
"@tsconfig/node10@^1.0.7":
773763
version "1.0.8"
774764
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9"
@@ -1315,11 +1305,6 @@ co@^4.6.0:
13151305
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
13161306
integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==
13171307

1318-
code-block-writer@^12.0.0:
1319-
version "12.0.0"
1320-
resolved "https://registry.yarnpkg.com/code-block-writer/-/code-block-writer-12.0.0.tgz#4dd58946eb4234105aff7f0035977b2afdc2a770"
1321-
integrity sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==
1322-
13231308
collect-v8-coverage@^1.0.0:
13241309
version "1.0.2"
13251310
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9"
@@ -2680,23 +2665,11 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
26802665
dependencies:
26812666
brace-expansion "^1.1.7"
26822667

2683-
minimatch@^7.4.3:
2684-
version "7.4.6"
2685-
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-7.4.6.tgz#845d6f254d8f4a5e4fd6baf44d5f10c8448365fb"
2686-
integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==
2687-
dependencies:
2688-
brace-expansion "^2.0.1"
2689-
26902668
minimist@^1.2.6:
26912669
version "1.2.6"
26922670
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
26932671
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
26942672

2695-
mkdirp@^2.1.6:
2696-
version "2.1.6"
2697-
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19"
2698-
integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==
2699-
27002673
27012674
version "2.1.2"
27022675
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
@@ -2860,11 +2833,6 @@ parse-json@^5.2.0:
28602833
json-parse-even-better-errors "^2.3.0"
28612834
lines-and-columns "^1.1.6"
28622835

2863-
path-browserify@^1.0.1:
2864-
version "1.0.1"
2865-
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
2866-
integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==
2867-
28682836
path-exists@^4.0.0:
28692837
version "4.0.0"
28702838
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
@@ -3283,14 +3251,6 @@ ts-jest@^29.1.0:
32833251
semver "^7.5.3"
32843252
yargs-parser "^21.0.1"
32853253

3286-
ts-morph@^19.0.0:
3287-
version "19.0.0"
3288-
resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-19.0.0.tgz#43e95fb0156c3fe3c77c814ac26b7d0be2f93169"
3289-
integrity sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ==
3290-
dependencies:
3291-
"@ts-morph/common" "~0.20.0"
3292-
code-block-writer "^12.0.0"
3293-
32943254
ts-node@^10.5.0:
32953255
version "10.7.0"
32963256
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5"

0 commit comments

Comments
 (0)