-
-
Notifications
You must be signed in to change notification settings - Fork 108
Adding av adapters #144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding av adapters #144
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit ee99400
☁️ Nx Cloud last updated this comment at |
@tanstack/ai
@tanstack/ai-anthropic
@tanstack/ai-client
@tanstack/ai-devtools-core
@tanstack/ai-gemini
@tanstack/ai-ollama
@tanstack/ai-openai
@tanstack/ai-react
@tanstack/ai-react-ui
@tanstack/ai-solid
@tanstack/ai-solid-ui
@tanstack/ai-svelte
@tanstack/ai-vue
@tanstack/ai-vue-ui
@tanstack/react-ai-devtools
@tanstack/solid-ai-devtools
commit: |
AlemTuzlak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, I can add some more typesafety and check the common and providerOptions to make sure our API is rock solid
| text: 'Hello!', | ||
| }) | ||
| } catch (error) { | ||
| if (error.message.includes('exceeds maximum length')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment I saw on X about better-auth is that error handling sucks because you cant know what error is thrown and handle it easily, maybe we should talk about having an errormap for each ai method on all the error types and have them mapped internally, eg TooManyTokensError, TimedOutError
* video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
#137) * feat: split up adapters into functionalities and add generate function * ci: apply automated fixes * readme update * add structured outputs and stream flag * ci: apply automated fixes * image generation for openai and gemini * ci: apply automated fixes * structured outputs * lock fix * ci: apply automated fixes * Splitting made operational with extra tests (#142) * fix: refactoring ai for more activities * smoke tests passing * woot, all the test stuff is working * dev panel updates for images, summarization, one shot and structured * enhancing smoke tests * fixing tests * adding grok * last minute tests * Refactor imports in documentation and examples to use named imports for `ai` - Updated all instances of `import ai from "@tanstack/ai"` to `import { ai } from "@tanstack/ai"` across various documentation files, guides, and examples. - Ensured consistency in import statements for better clarity and adherence to best practices. * ci: apply automated fixes * fix typesafety on ai * ci: apply automated fixes * cleanup types * ci: apply automated fixes * remove grok * ci: apply automated fixes * fix provenence? * update deps * fix tests --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Adding av adapters (#144) * video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Splitting adapters up fixes (#148) * fixing JSON-Schema conversion * summarize now really supports streaming * ci: apply automated fixes * linting fixes * feat: add createOptions helper and improve summarization streaming - Add createOptions() function for type-safe adapter option creation - Refactor OpenAI summarize adapter to use text adapter for streaming - Deprecate textOptions() in favor of createOptions() - Update examples to use createOptions pattern - Add runtime adapter switching documentation guide * massive overhaul to remove ai * ci: apply automated fixes * Going to openaiText * ci: apply automated fixes * doc fixes and removal of legacy exports * adding more options to gemini audio * doc updates * ci: apply automated fixes * add docs script --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> * migrate model into adapter (#157) * migrate model into adapter * ci: apply automated fixes * Feat/move model into adapter fix types and cleanup (#158) * checkpoint * checkpoint * ci: apply automated fixes * unrename * move to _types pattern * Remove commented code * Goodbye embeddings * move to ~types * checkpoint * ci: apply automated fixes * updated docs and fixed a small bug with types --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com> * type safety tests for chat * ci: apply automated fixes * image tests * ci: apply automated fixes * update format * ci: apply automated fixes * flatten options object * ci: apply automated fixes * testing fixups * fix: streaming functions and migration doc * few more adapter/model fixups * ci: apply automated fixes * small bug fixes * ci: apply automated fixes * fix up exports and example * tighten up types * ci: apply automated fixes * tighten up types * ci: apply automated fixes * fixes * ci: apply automated fixes * updating the changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jack Herrington <jherr@pobox.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
TanStack#137) * feat: split up adapters into functionalities and add generate function * ci: apply automated fixes * readme update * add structured outputs and stream flag * ci: apply automated fixes * image generation for openai and gemini * ci: apply automated fixes * structured outputs * lock fix * ci: apply automated fixes * Splitting made operational with extra tests (TanStack#142) * fix: refactoring ai for more activities * smoke tests passing * woot, all the test stuff is working * dev panel updates for images, summarization, one shot and structured * enhancing smoke tests * fixing tests * adding grok * last minute tests * Refactor imports in documentation and examples to use named imports for `ai` - Updated all instances of `import ai from "@tanstack/ai"` to `import { ai } from "@tanstack/ai"` across various documentation files, guides, and examples. - Ensured consistency in import statements for better clarity and adherence to best practices. * ci: apply automated fixes * fix typesafety on ai * ci: apply automated fixes * cleanup types * ci: apply automated fixes * remove grok * ci: apply automated fixes * fix provenence? * update deps * fix tests --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Adding av adapters (TanStack#144) * video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Splitting adapters up fixes (TanStack#148) * fixing JSON-Schema conversion * summarize now really supports streaming * ci: apply automated fixes * linting fixes * feat: add createOptions helper and improve summarization streaming - Add createOptions() function for type-safe adapter option creation - Refactor OpenAI summarize adapter to use text adapter for streaming - Deprecate textOptions() in favor of createOptions() - Update examples to use createOptions pattern - Add runtime adapter switching documentation guide * massive overhaul to remove ai * ci: apply automated fixes * Going to openaiText * ci: apply automated fixes * doc fixes and removal of legacy exports * adding more options to gemini audio * doc updates * ci: apply automated fixes * add docs script --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> * migrate model into adapter (TanStack#157) * migrate model into adapter * ci: apply automated fixes * Feat/move model into adapter fix types and cleanup (TanStack#158) * checkpoint * checkpoint * ci: apply automated fixes * unrename * move to _types pattern * Remove commented code * Goodbye embeddings * move to ~types * checkpoint * ci: apply automated fixes * updated docs and fixed a small bug with types --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com> * type safety tests for chat * ci: apply automated fixes * image tests * ci: apply automated fixes * update format * ci: apply automated fixes * flatten options object * ci: apply automated fixes * testing fixups * fix: streaming functions and migration doc * few more adapter/model fixups * ci: apply automated fixes * small bug fixes * ci: apply automated fixes * fix up exports and example * tighten up types * ci: apply automated fixes * tighten up types * ci: apply automated fixes * fixes * ci: apply automated fixes * updating the changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jack Herrington <jherr@pobox.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
TanStack#137) * feat: split up adapters into functionalities and add generate function * ci: apply automated fixes * readme update * add structured outputs and stream flag * ci: apply automated fixes * image generation for openai and gemini * ci: apply automated fixes * structured outputs * lock fix * ci: apply automated fixes * Splitting made operational with extra tests (TanStack#142) * fix: refactoring ai for more activities * smoke tests passing * woot, all the test stuff is working * dev panel updates for images, summarization, one shot and structured * enhancing smoke tests * fixing tests * adding grok * last minute tests * Refactor imports in documentation and examples to use named imports for `ai` - Updated all instances of `import ai from "@tanstack/ai"` to `import { ai } from "@tanstack/ai"` across various documentation files, guides, and examples. - Ensured consistency in import statements for better clarity and adherence to best practices. * ci: apply automated fixes * fix typesafety on ai * ci: apply automated fixes * cleanup types * ci: apply automated fixes * remove grok * ci: apply automated fixes * fix provenence? * update deps * fix tests --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Adding av adapters (TanStack#144) * video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Splitting adapters up fixes (TanStack#148) * fixing JSON-Schema conversion * summarize now really supports streaming * ci: apply automated fixes * linting fixes * feat: add createOptions helper and improve summarization streaming - Add createOptions() function for type-safe adapter option creation - Refactor OpenAI summarize adapter to use text adapter for streaming - Deprecate textOptions() in favor of createOptions() - Update examples to use createOptions pattern - Add runtime adapter switching documentation guide * massive overhaul to remove ai * ci: apply automated fixes * Going to openaiText * ci: apply automated fixes * doc fixes and removal of legacy exports * adding more options to gemini audio * doc updates * ci: apply automated fixes * add docs script --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> * migrate model into adapter (TanStack#157) * migrate model into adapter * ci: apply automated fixes * Feat/move model into adapter fix types and cleanup (TanStack#158) * checkpoint * checkpoint * ci: apply automated fixes * unrename * move to _types pattern * Remove commented code * Goodbye embeddings * move to ~types * checkpoint * ci: apply automated fixes * updated docs and fixed a small bug with types --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com> * type safety tests for chat * ci: apply automated fixes * image tests * ci: apply automated fixes * update format * ci: apply automated fixes * flatten options object * ci: apply automated fixes * testing fixups * fix: streaming functions and migration doc * few more adapter/model fixups * ci: apply automated fixes * small bug fixes * ci: apply automated fixes * fix up exports and example * tighten up types * ci: apply automated fixes * tighten up types * ci: apply automated fixes * fixes * ci: apply automated fixes * updating the changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jack Herrington <jherr@pobox.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
TanStack#137) * feat: split up adapters into functionalities and add generate function * ci: apply automated fixes * readme update * add structured outputs and stream flag * ci: apply automated fixes * image generation for openai and gemini * ci: apply automated fixes * structured outputs * lock fix * ci: apply automated fixes * Splitting made operational with extra tests (TanStack#142) * fix: refactoring ai for more activities * smoke tests passing * woot, all the test stuff is working * dev panel updates for images, summarization, one shot and structured * enhancing smoke tests * fixing tests * adding grok * last minute tests * Refactor imports in documentation and examples to use named imports for `ai` - Updated all instances of `import ai from "@tanstack/ai"` to `import { ai } from "@tanstack/ai"` across various documentation files, guides, and examples. - Ensured consistency in import statements for better clarity and adherence to best practices. * ci: apply automated fixes * fix typesafety on ai * ci: apply automated fixes * cleanup types * ci: apply automated fixes * remove grok * ci: apply automated fixes * fix provenence? * update deps * fix tests --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Adding av adapters (TanStack#144) * video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Splitting adapters up fixes (TanStack#148) * fixing JSON-Schema conversion * summarize now really supports streaming * ci: apply automated fixes * linting fixes * feat: add createOptions helper and improve summarization streaming - Add createOptions() function for type-safe adapter option creation - Refactor OpenAI summarize adapter to use text adapter for streaming - Deprecate textOptions() in favor of createOptions() - Update examples to use createOptions pattern - Add runtime adapter switching documentation guide * massive overhaul to remove ai * ci: apply automated fixes * Going to openaiText * ci: apply automated fixes * doc fixes and removal of legacy exports * adding more options to gemini audio * doc updates * ci: apply automated fixes * add docs script --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> * migrate model into adapter (TanStack#157) * migrate model into adapter * ci: apply automated fixes * Feat/move model into adapter fix types and cleanup (TanStack#158) * checkpoint * checkpoint * ci: apply automated fixes * unrename * move to _types pattern * Remove commented code * Goodbye embeddings * move to ~types * checkpoint * ci: apply automated fixes * updated docs and fixed a small bug with types --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com> * type safety tests for chat * ci: apply automated fixes * image tests * ci: apply automated fixes * update format * ci: apply automated fixes * flatten options object * ci: apply automated fixes * testing fixups * fix: streaming functions and migration doc * few more adapter/model fixups * ci: apply automated fixes * small bug fixes * ci: apply automated fixes * fix up exports and example * tighten up types * ci: apply automated fixes * tighten up types * ci: apply automated fixes * fixes * ci: apply automated fixes * updating the changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jack Herrington <jherr@pobox.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
TanStack#137) * feat: split up adapters into functionalities and add generate function * ci: apply automated fixes * readme update * add structured outputs and stream flag * ci: apply automated fixes * image generation for openai and gemini * ci: apply automated fixes * structured outputs * lock fix * ci: apply automated fixes * Splitting made operational with extra tests (TanStack#142) * fix: refactoring ai for more activities * smoke tests passing * woot, all the test stuff is working * dev panel updates for images, summarization, one shot and structured * enhancing smoke tests * fixing tests * adding grok * last minute tests * Refactor imports in documentation and examples to use named imports for `ai` - Updated all instances of `import ai from "@tanstack/ai"` to `import { ai } from "@tanstack/ai"` across various documentation files, guides, and examples. - Ensured consistency in import statements for better clarity and adherence to best practices. * ci: apply automated fixes * fix typesafety on ai * ci: apply automated fixes * cleanup types * ci: apply automated fixes * remove grok * ci: apply automated fixes * fix provenence? * update deps * fix tests --------- Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Adding av adapters (TanStack#144) * video generation * text to speech and speech to text * adding some cool audio UI to the dev panel * small fixups * ci: apply automated fixes * client fixes on tool calls * few more client fixups * one last test fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * Splitting adapters up fixes (TanStack#148) * fixing JSON-Schema conversion * summarize now really supports streaming * ci: apply automated fixes * linting fixes * feat: add createOptions helper and improve summarization streaming - Add createOptions() function for type-safe adapter option creation - Refactor OpenAI summarize adapter to use text adapter for streaming - Deprecate textOptions() in favor of createOptions() - Update examples to use createOptions pattern - Add runtime adapter switching documentation guide * massive overhaul to remove ai * ci: apply automated fixes * Going to openaiText * ci: apply automated fixes * doc fixes and removal of legacy exports * adding more options to gemini audio * doc updates * ci: apply automated fixes * add docs script --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> * migrate model into adapter (TanStack#157) * migrate model into adapter * ci: apply automated fixes * Feat/move model into adapter fix types and cleanup (TanStack#158) * checkpoint * checkpoint * ci: apply automated fixes * unrename * move to _types pattern * Remove commented code * Goodbye embeddings * move to ~types * checkpoint * ci: apply automated fixes * updated docs and fixed a small bug with types --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Alem Tuzlak <t.zlak@hotmail.com> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com> * type safety tests for chat * ci: apply automated fixes * image tests * ci: apply automated fixes * update format * ci: apply automated fixes * flatten options object * ci: apply automated fixes * testing fixups * fix: streaming functions and migration doc * few more adapter/model fixups * ci: apply automated fixes * small bug fixes * ci: apply automated fixes * fix up exports and example * tighten up types * ci: apply automated fixes * tighten up types * ci: apply automated fixes * fixes * ci: apply automated fixes * updating the changeset --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jack Herrington <jherr@pobox.com> Co-authored-by: Tanner Linsley <tannerlinsley@gmail.com>
🎯 Changes
This PR adds three new AI activities to
@tanstack/ai: Video Generation, Text-to-Speech (TTS), and Audio Transcription.New Activities
🎬 Video Generation
VideoOptions,VideoResult,VideoCreateResult,VideoStatusResultintypes.tsVideoAdapterinterface withcreateVideo(),getVideoStatus(),getVideoUrl()methods supporting async job-based generationvideoActivitywithkind: 'video'supporting polling workflowssora-2.0-*models)🗣️ Text-to-Speech (TTS)
TTSOptions,TTSResultwith base64 audio outputTTSAdapterinterface withgenerateSpeech()methodttsActivitywithkind: 'tts'tts-1,tts-1-hdmodels with voice selection (alloy, echo, fable, onyx, nova, shimmer)gemini-2.5-flash-preview-tts🎤 Audio Transcription
TranscriptionOptions,TranscriptionResultwith segments/words timestampsTranscriptionAdapterinterface withtranscribe()methodtranscriptionActivitywithkind: 'transcription'whisper-1,gpt-4o-transcribemodels with language detection, timestampsPackage Changes
@tanstack/aiactivities/video/,activities/tts/,activities/transcription/ai()function to handle all new activity typesAIAdapter,AIOptionsFor,AIResultForunion types@tanstack/ai-openaiOpenAIVideoAdapter,OpenAITTSAdapter,OpenAITranscriptionAdapterVideoProviderOptions,AudioProviderOptions,TranscribeProviderOptions@tanstack/ai-geminiGeminiTTSAdapter(experimental)Testing Panel (
testing/panel/)/video,/tts,/transcriptionwith full UI for testing each activityuseAudioRecorder,useTTSinsrc/hooks/Smoke Tests
TTS(text-to-speech),TRN(transcription)AdapterContextwithttsAdapter,transcriptionAdapter,ttsModel,transcriptionModelDocumentation
text-to-speech.md,transcription.md,video-generation.mdopenai.mdandgemini.mdwith TTS/Transcription/Video sectionsconfig.json✅ Checklist
pnpm run test:pr.🚀 Release Impact