vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
9.89k stars 2.5k forks source link

Feature: Google Gemini 1.5 Flash Integration with Enhanced Default Response for errors. #547

Open mrcodiator opened 1 week ago

mrcodiator commented 1 week ago

Overview

Screenshot 2024-11-16 at 7 08 43 PM
// Model provider identification
export type ModelProvider = 'google' | 'openai' | 'anthropic';

// Enhanced streaming with error handling
async doStream(options) {
  try {
    // Standard streaming logic for model responses
  } catch (error) {
    // Fallback response with seamless streaming
    return fallbackStream(modelConfig.fallbackResponse);
  }
}

``

Problems Solved

vercel[bot] commented 1 week ago

@mrcodiator is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

socket-security[bot] commented 1 week ago

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@google/generative-ai@0.21.0 network 0 401 kB google-wombot

View full report↗︎