paperdave / various

Various libraries and applications related to TypeScript. Everything is contained in a monorepo to improve productivity and reduce boilerplate.
MIT License
31 stars 3 forks source link

openai library #57

Closed paperdave closed 1 year ago

paperdave commented 1 year ago

this adds @paperdave/openai which is a better API wrapper for OpenAI's API. It features this shiny usage example:

const completion = await generateChatCompletion({
  model: 'gpt-4',
  messages,
  stream: true,
});

for await (const token of completion.content) {
  process.stdout.write(token);
}
process.stdout.write('\n');
changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: c1aa92f27d9fb601de09608a8739d20c8e1f5bad

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR