ai devices
1.0.0
該項目是使用各種AI模型和服務來提供對用戶查詢的智能響應的AI驅動語音助手。它支持語音輸入,轉錄,文本到語音,圖像處理以及有條件渲染的UI組件的函數調用。這是受AI設備(如人道AI銷和Rabbit R1)的最新趨勢的啟發。
git clone https://github.com/developersdigest/ai-devices.gitnpm install
# or
bun install要使用此AI驅動的語音助手,您需要為選定的AI模型和服務提供必要的API鍵。
為每種服務替換您的實際API鍵,替換'api_key_goes_here'。
npm run dev
# or
bun dev通過http://localhost:3000或通過提供的URL。
修改app/config.tsx以調整AI驅動語音助手的設置和配置。這是可用選項的概述:
export const config = {
// Inference settings
inferenceModelProvider : 'groq' , // 'groq' or 'openai'
inferenceModel : 'llama3-8b-8192' , // Groq: 'llama3-70b-8192' or 'llama3-8b-8192'.. OpenAI: 'gpt-4-turbo etc
// BELOW OPTIONAL are some options for the app to use
// Whisper settings
whisperModelProvider : 'openai' , // 'groq' or 'openai'
whisperModel : 'whisper-1' , // Groq: 'whisper-large-v3' OpenAI: 'whisper-1'
// TTS settings
ttsModelProvider : 'openai' , // only openai supported for now...
ttsModel : 'tts-1' , // only openai supported for now...s
ttsvoice : 'alloy' , // only openai supported for now... [alloy, echo, fable, onyx, nova, and shimmer]
// OPTIONAL:Vision settings
visionModelProvider : 'google' , // 'openai' or 'fal.ai' or 'google'
visionModel : 'gemini-1.5-flash-latest' , // OpenAI: 'gpt-4o' or Fal.ai: 'llava-next' or Google: 'gemini-1.5-flash-latest'
// Function calling + conditionally rendered UI
functionCallingModelProvider : 'openai' , // 'openai' current only
functionCallingModel : 'gpt-3.5-turbo' , // OpenAI: 'gpt-3-5-turbo'
// UI settings
enableResponseTimes : false , // Display response times for each message
enableSettingsUIToggle : true , // Display the settings UI toggle
enableTextToSpeechUIToggle : true , // Display the text to speech UI toggle
enableInternetResultsUIToggle : true , // Display the internet results UI toggle
enableUsePhotUIToggle : true , // Display the use photo UI toggle
enabledRabbitMode : true , // Enable the rabbit mode UI toggle
enabledLudicrousMode : true , // Enable the ludicrous mode UI toggle
useAttributionComponent : true , // Use the attribution component to display the attribution of the AI models/services used
// Rate limiting settings
useRateLimiting : false , // Use Upstash rate limiting to limit the number of requests per user
// Tracing with Langchain
useLangSmith : true , // Use LangSmith by Langchain to trace the execution of the functions in the config.tsx set to true to use.
} ; 歡迎捐款!如果您發現任何問題或有改進的建議,請打開問題或提交拉動請求。
我是開發人員Digest背後的開發人員。如果您發現我的工作有幫助或享受我的工作,請考慮支持我。您可以做幾種方法: