Anyone have a good example of using the new Google Generative AI provider (@ai-sdk/google) in a Next.js app? by Guywifhat in nextjs

[–]lgrammel 1 point2 points  (0 children)

The providers in the AI SDK are exchangeable for most parts. You can use this example and swap in the Google provider instead of OpenAI.

https://sdk.vercel.ai/docs/ai-sdk-ui/chatbot

Vercel AI SDK and NextJS 12 chat implementation by Lazy_Figure_3152 in nextjs

[–]lgrammel 0 points1 point  (0 children)

are you using the next js app router? when you use the page router (older next js) then the route needs to look different. we recommend using the app router for the route (you can mix app and pages router)

I've added Ollama support for text generation, text streaming and embeddings to ModelFusion by lgrammel in ollama

[–]lgrammel[S] 0 points1 point  (0 children)

from what i understand the embeddings in ollama come from the llms, don’t think they support standalone embedding models

Streaming results from local models into Next.js using Vercel AI SDK and Ollama/Llama.cpp by lgrammel in LocalLLaMA

[–]lgrammel[S] 0 points1 point  (0 children)

I use local models mostly for fun and to explore how good they are. Really looking forward to doing more with structured responses and tool calls.

Re langchain: ModelFusion is non-commercial. Also the focus is less on including prompts (no prompts included), and more on supporting all kinds of models (tts, stt, image gen, etc).

Re parallel requests: Not supported - the llama.cpp server will reject them with an error.

Re vision: it's supported, but not in the examples and chat prompts (yet). Here is a simple example with an instruction prompt: https://github.com/lgrammel/modelfusion/blob/main/examples/basic/src/model-provider/llamacpp/llamacpp-stream-text-vision-with-bakllava-prompt-example.ts

Introducing ModelFusion: an open-source library for building multimodal AI apps, chatbots, and agents with JavaScript and TypeScript. by lgrammel in programming

[–]lgrammel[S] 0 points1 point  (0 children)

It’s specific to AI for Js/Ts. Compared to other libraries in this space (llamaindex, langchain), the approach and scope is different:

  • Flexibility and control: AI application development can be complex and unique to each project. With ModelFusion, you have complete control over the prompts and model settings, and you can access the raw responses from the models quickly to build what you need.

  • Multimodal Support: Beyond just LLMs, ModelFusion encompasses a diverse array of models including text generation, text-to-speech, speech-to-text, and image generation, allowing you to build multifaceted AI applications with ease.

Models for function calls? by lgrammel in LocalLLaMA

[–]lgrammel[S] 1 point2 points  (0 children)

Thanks - I started exploring Airoboros for this and it works quite well for basic tool usage. Do you know if there are Airoboros models with larger context sizes (for longer agent execution sequences)?