Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to NPM in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/togethercomputer/together-typescript/actions/workflows/publish-npm.yml
name: Publish NPM
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: |
yarn install

- name: Publish to NPM
run: |
bash ./bin/publish-npm
env:
NPM_TOKEN: ${{ secrets.TOGETHER_NPM_TOKEN || secrets.NPM_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Doctor
on:
pull_request:
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'togethercomputer/together-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4

- name: Check release environment
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.TOGETHER_NPM_TOKEN || secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.0-alpha.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-906b6142cf0b0ba3ee24f9003624f2526d4636eaddbf86206b39ba23317d33cb.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-ab60dcafb04015e34b38c2991f76f78f35eeb0860fe02ee4033c4161c297b3bc.yml
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Changelog

## 0.1.0-alpha.1 (2024-05-20)

Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/togethercomputer/together-typescript/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)

### Features

* **api:** Config update for pstern-sl/dev ([50330bc](https://github.com/togethercomputer/together-typescript/commit/50330bc2c5da638c948219558182f1aff9a21111))
* **api:** manual updates ([d3d60df](https://github.com/togethercomputer/together-typescript/commit/d3d60dfbc094879af69fda21d58f0d3147ef914d))
* **api:** OpenAPI spec update via Stainless API ([c7b048d](https://github.com/togethercomputer/together-typescript/commit/c7b048d7b1965141f210550fef7eb3493a6eb5f4))
* **api:** OpenAPI spec update via Stainless API ([f2eba5e](https://github.com/togethercomputer/together-typescript/commit/f2eba5e21b4a6e0e1d9b312662393e4828a531e4))
* **api:** OpenAPI spec update via Stainless API ([9d72c93](https://github.com/togethercomputer/together-typescript/commit/9d72c93c6698c1985867eb382db0c0f4b81dd605))
* **api:** OpenAPI spec update via Stainless API ([d5f7089](https://github.com/togethercomputer/together-typescript/commit/d5f7089b870c0faa7c04b042cdd24173b6e012dc))
* **api:** OpenAPI spec update via Stainless API ([2f777f5](https://github.com/togethercomputer/together-typescript/commit/2f777f5f9de1e821ee5b9fd0706e4e02c4dc63a3))
* **api:** OpenAPI spec update via Stainless API ([6b6d656](https://github.com/togethercomputer/together-typescript/commit/6b6d6564f3b98d1cb48bc488085210b1f7ddaaaf))
* **api:** OpenAPI spec update via Stainless API ([2099de1](https://github.com/togethercomputer/together-typescript/commit/2099de109f0d798ce48ec636249f557a9bdc6579))
* **api:** OpenAPI spec update via Stainless API ([#3](https://github.com/togethercomputer/together-typescript/issues/3)) ([6ab0237](https://github.com/togethercomputer/together-typescript/commit/6ab02377ad427723c9d9ea53cf7bd0c772dbe2df))
* **api:** OpenAPI spec update via Stainless API ([#5](https://github.com/togethercomputer/together-typescript/issues/5)) ([2cea8b5](https://github.com/togethercomputer/together-typescript/commit/2cea8b5114f1071ca29df793a5ee2b0c7d4774ce))
* **api:** update via SDK Studio ([78442fc](https://github.com/togethercomputer/together-typescript/commit/78442fca117034ecaea5fdfddf9b24d9cf71978a))
* **api:** update via SDK Studio ([8bb8235](https://github.com/togethercomputer/together-typescript/commit/8bb823563bc88ae7bfb22e99ac939b95e6c61e39))
* **api:** update via SDK Studio ([4edc4ed](https://github.com/togethercomputer/together-typescript/commit/4edc4edd1dd7d32dcf6ff3afae908097dcb647b7))
* **api:** update via SDK Studio ([6792cd8](https://github.com/togethercomputer/together-typescript/commit/6792cd88e8ec9064bd32ff8973238eafe790dfcc))
* **api:** update via SDK Studio ([0e5a965](https://github.com/togethercomputer/together-typescript/commit/0e5a96559e99ffb2da1add0fe873b9db0614fb6d))
* **api:** update via SDK Studio ([b208042](https://github.com/togethercomputer/together-typescript/commit/b20804268af988611db28da6afae730712958873))
* **api:** update via SDK Studio ([e705a6a](https://github.com/togethercomputer/together-typescript/commit/e705a6addd3f99b56817ab4dc11021bd359f9348))
* **api:** update via SDK Studio ([8801a8f](https://github.com/togethercomputer/together-typescript/commit/8801a8f617e5bd32685ae17e13fc4c65bf7cdd4b))
* **api:** update via SDK Studio ([3c8036e](https://github.com/togethercomputer/together-typescript/commit/3c8036ef7009b87a6b64697c34b2d102083027a9))
* **api:** update via SDK Studio ([5f63392](https://github.com/togethercomputer/together-typescript/commit/5f63392d36fad5de5f6b405059fd4baf32f17a9f))
* **api:** update via SDK Studio ([afbb5d9](https://github.com/togethercomputer/together-typescript/commit/afbb5d99eb68815a2e7d4605db60bd24a62ba55d))
* **api:** update via SDK Studio ([c89406c](https://github.com/togethercomputer/together-typescript/commit/c89406c20e264fa1df9609f777023416f5ed600c))
* **api:** update via SDK Studio ([1a01c5f](https://github.com/togethercomputer/together-typescript/commit/1a01c5f368ec4fc91051813e9f33d34635436503))
* **api:** update via SDK Studio ([97762a6](https://github.com/togethercomputer/together-typescript/commit/97762a661940c4e80e620a9ab162af78889e2090))
* **api:** update via SDK Studio ([644232d](https://github.com/togethercomputer/together-typescript/commit/644232dc7c9f28e95f16220a4ba21d31ca5826dd))
* **api:** update via SDK Studio ([4af7da5](https://github.com/togethercomputer/together-typescript/commit/4af7da5d4134b0299e11fc8458f438789684f78b))
* **api:** update via SDK Studio ([7ffe18f](https://github.com/togethercomputer/together-typescript/commit/7ffe18fd3abc362b37aa2f4f7b82529b4896f472))
* **api:** update via SDK Studio ([8eac113](https://github.com/togethercomputer/together-typescript/commit/8eac113748917b70dcdc0623a4d3243f65a49be6))
* **api:** update via SDK Studio ([8b71dad](https://github.com/togethercomputer/together-typescript/commit/8b71dad78f8ba7443b6766c964ec2411ca71dd59))
* **api:** update via SDK Studio ([b873e4b](https://github.com/togethercomputer/together-typescript/commit/b873e4b3ae640c16469d0c85e9860a1d276b0059))
* **api:** update via SDK Studio ([333b4bd](https://github.com/togethercomputer/together-typescript/commit/333b4bdca14067ec7bb197837238cc86c220da31))
* **api:** update via SDK Studio ([19125a0](https://github.com/togethercomputer/together-typescript/commit/19125a048531d03cc334eb11919a01954fa3d252))
* **api:** updates ([3781ee8](https://github.com/togethercomputer/together-typescript/commit/3781ee8ac2e8cf333138899e6982ddfe5c378319))
* update via SDK Studio ([de036f5](https://github.com/togethercomputer/together-typescript/commit/de036f590bcdbec7cc351156b104e75c32060219))
* update via SDK Studio ([913553c](https://github.com/togethercomputer/together-typescript/commit/913553c1e7835bd519e19c68dedaf57e2ed5321a))
* update via SDK Studio ([1716130](https://github.com/togethercomputer/together-typescript/commit/1716130854861f53fae7841ad8e00c1dc7e32e61))
* update via SDK Studio ([fccf615](https://github.com/togethercomputer/together-typescript/commit/fccf615c0da30d502762abde371145f5094c6540))
* update via SDK Studio ([5cb5be4](https://github.com/togethercomputer/together-typescript/commit/5cb5be4089a39c0c8237f5426dc41f1e03c3c3c0))
* update via SDK Studio ([504bc56](https://github.com/togethercomputer/together-typescript/commit/504bc56dd6f34388209e89b9df2808dff49d9124))
* update via SDK Studio ([bca35e9](https://github.com/togethercomputer/together-typescript/commit/bca35e9e867f7adb3367ebe06492f43327924324))
* update via SDK Studio ([d26b5ce](https://github.com/togethercomputer/together-typescript/commit/d26b5ceeee5fbad12ad262e1f9d4d045ba2468e1))


### Chores

* go live ([#1](https://github.com/togethercomputer/together-typescript/issues/1)) ([369e366](https://github.com/togethercomputer/together-typescript/commit/369e366e91d0d41ff51f83153aac4387262881cb))
* update SDK settings ([c9f0b2f](https://github.com/togethercomputer/together-typescript/commit/c9f0b2f5ba4a2c8c934b67f481b13480b4ac21cf))
32 changes: 32 additions & 0 deletions bin/check-release-environment
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

warnings=()
errors=()

if [ -z "${NPM_TOKEN}" ]; then
warnings+=("The TOGETHER_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenWarnings=${#warnings[@]}

if [[ lenWarnings -gt 0 ]]; then
echo -e "Found the following warnings in the release environment:\n"

for warning in "${warnings[@]}"; do
echo -e "- $warning\n"
done
fi

lenErrors=${#errors[@]}

if [[ lenErrors -gt 0 ]]; then
echo -e "Found the following errors in the release environment:\n"

for error in "${errors[@]}"; do
echo -e "- $error\n"
done

exit 1
fi

echo "The environment is ready to push releases!"
2 changes: 1 addition & 1 deletion examples/embedding.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env -S npm run tsn -T

import Together from 'together';
import Together from 'together';

const together = new Together();

Expand Down
2 changes: 1 addition & 1 deletion examples/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Example of listing and retrieving files

import Together from 'together';
import Together from 'together';

const together = new Together();

Expand Down
1 change: 0 additions & 1 deletion examples/fine-tune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Together from 'together';
const together = new Together();

async function main() {

//These files need to be uploaded separately. See the files example.
const fileId = 'file-bf72b951-fa1a-41af-a152-fe385dca0201';

Expand Down
2 changes: 1 addition & 1 deletion examples/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//An example to generate an image and save to a file

import Together from 'together';
import Together from 'together';
import fs from 'fs';

const together = new Together();
Expand Down
2 changes: 1 addition & 1 deletion examples/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//An example to request a list of models and print them.

import Together from 'together';
import Together from 'together';

const together = new Together();

Expand Down
2 changes: 1 addition & 1 deletion examples/streaming.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env -S npm run tsn -T

import Together from 'together';
import Together from 'together';

const together = new Together();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "together",
"version": "0.0.1-alpha.0",
"version": "0.1.0-alpha.1",
"description": "The official TypeScript library for the Together API",
"author": "Together <dev-feedback@TogetherAI.com>",
"types": "dist/index.d.ts",
Expand Down
67 changes: 67 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"packages": {
".": {}
},
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
"include-v-in-tag": true,
"include-component-in-tag": false,
"versioning": "prerelease",
"prerelease": true,
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"pull-request-header": "Automated Release PR",
"pull-request-title-pattern": "release: ${version}",
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "chore",
"section": "Chores"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "refactor",
"section": "Refactors"
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"release-type": "node",
"extra-files": [
"src/version.ts",
"README.md"
]
}
4 changes: 2 additions & 2 deletions src/resources/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export interface CompletionCreateParamsBase {
* The `logit_bias` parameter allows us to adjust the likelihood of specific tokens
* appearing in the generated output.
*/
logit_bias?: unknown;
logit_bias?: Record<string, unknown>;

/**
* Determines the number of most likely tokens to return at each token position log
Expand Down Expand Up @@ -245,7 +245,7 @@ export namespace CompletionCreateParams {
/**
* The schema of the response format.
*/
schema?: unknown;
schema?: Record<string, string>;

/**
* The type of the response format.
Expand Down
2 changes: 1 addition & 1 deletion src/resources/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export interface CompletionCreateParamsBase {
* The `logit_bias` parameter allows us to adjust the likelihood of specific tokens
* appearing in the generated output.
*/
logit_bias?: unknown;
logit_bias?: Record<string, unknown>;

/**
* Determines the number of most likely tokens to return at each token position log
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '0.0.1-alpha.0';
export const VERSION = '0.1.0-alpha.1'; // x-release-please-version
2 changes: 1 addition & 1 deletion tests/api-resources/chat/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('resource completions', () => {
n: 1,
presence_penalty: 0,
repetition_penalty: 0,
response_format: { type: 'json', schema: {} },
response_format: { type: 'json', schema: { foo: 'string' } },
safety_model: 'safety_model_name',
stop: ['string', 'string', 'string'],
stream: false,
Expand Down