ai

Build AI-powered applications with React, Svelte, Vue, and Solid

OTHER License

Downloads
18.6M
Stars
7.6K
Committers
189

Bot releases are visible (Hide)

ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • a9591fe: Add createdAt on user input message in useChat (it was already present in assistant messages)
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

  • 71f9c51: This adds Vue support for ai via the ai/vue subpath export. Vue composables useChat and useCompletion are provided.

Patch Changes

  • ad54c79: add tests
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 78477d3: - Create /react sub-package.
    • Create import { useChat, useCompletion } from 'ai-connector/react' and mark React as an optional peer dependency so we can add more framework support in the future.
    • Also renamed set to setMessages and setCompletion to unify the API naming as we have setInput too.
    • Added an sendExtraMessageFields field to useChat that defaults to false, to prevent OpenAI errors when id is not filtered out.
  • c4c1be3: useCompletion.handleSubmit does not clear the input anymore
  • 7de2185: create /react export
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • fc83e95: Implement new start-of-stream newline trimming
  • 2c6fa04: Optimize callbacks TransformStream to be more memory efficient when onCompletion is not specified
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • fdfef52: - Splits the EventSource parser into a reusable helper
    • Uses a TransformStream for this, so the stream respects back-pressure
    • Splits the "forking" stream for callbacks into a reusable helper
    • Changes the signature for customParser to avoid Stringify -> Encode -> Decode -> Parse round trip
    • Uses ?.() optional call syntax for callbacks
    • Uses string.includes to perform newline checking
    • Handles the null res.body case
    • Fixes Anthropic's streaming responses
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • d70a9e7: Add streamToResponse
  • 47b85b2: Improve abortController and callbacks of useChat
  • 6f7b43a: Export UseCompletionHelpers as a TypeScript type alias
ai - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 4405a8a: fix duplicated 'use client' directives
ai - v0.0.2

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 9a8a845: Testing out release