├── .env.example ├── .github └── FUNDING.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── app ├── action.tsx ├── config.tsx ├── function-calling.tsx ├── globals.css ├── layout.tsx ├── page.tsx └── tools │ ├── contentProcessing.tsx │ ├── generateRelevantQuestions.tsx │ ├── mentionFunctions │ ├── falAiStableDiffusion3Medium.ts │ ├── portKeyAIGateway.ts │ ├── portKeyAIGatewayTogetherAI.ts │ ├── streamChatCompletion.ts │ └── structuredUnlockSummarize.ts │ ├── mentionToolConfig.tsx │ ├── mentionTools.tsx │ ├── rateLimiting.tsx │ ├── searchProviders.tsx │ ├── semanticCache.tsx │ └── streamingChatCompletion.tsx ├── bun.lockb ├── components.json ├── components ├── answer │ ├── FinancialChart.tsx │ ├── FollowUpComponent.tsx │ ├── ImageGenerationComponent.tsx │ ├── ImagesComponent.tsx │ ├── InitialQueries.tsx │ ├── LLMResponseComponent.tsx │ ├── Map.tsx │ ├── MapDetails.tsx │ ├── RateLimit.tsx │ ├── SearchResultsComponent.tsx │ ├── ShoppingComponent.tsx │ ├── Spotify.tsx │ ├── UserMessageComponent.tsx │ └── VideosComponent.tsx ├── external-link.tsx ├── header.tsx ├── providers.tsx └── ui │ ├── button.tsx │ ├── card.tsx │ ├── carousel.tsx │ ├── dialog.tsx │ ├── icons.tsx │ ├── input.tsx │ ├── label.tsx │ ├── separator.tsx │ ├── textarea.tsx │ ├── toast.tsx │ ├── toaster.tsx │ ├── tooltip.tsx │ └── use-toast.ts ├── docker-compose.yml ├── express-api ├── .env.example ├── .gitignore ├── README.md ├── index.js ├── package-lock.json └── package.json ├── lib ├── hooks │ ├── chat-scroll-anchor.tsx │ ├── use-at-bottom.tsx │ └── use-enter-submit.tsx └── utils │ ├── index.tsx │ └── tool-definition.ts ├── next-env.d.ts ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── apple-touch-icon.png ├── brave.png ├── bright-data-logo.png ├── fal.svg ├── favicon-16x16.png ├── favicon.ico ├── groq.png ├── mistral.png ├── powered-by-groq.svg └── serper.png ├── style.md ├── tailwind.config.ts ├── tsconfig.json └── tsconfig.tsbuildinfo /.env.example: -------------------------------------------------------------------------------- 1 | # https://console.groq.com/keys 2 | GROQ_API_KEY=APIKEYGOESHERE 3 | # https://platform.openai.com/account/api-keys 4 | OPENAI_API_KEY=APIKEYGOESHERE 5 | # https://serper.dev/ 6 | SERPER_API=APIKEYGOESHERE 7 | # Brave Search API Key (Serper is the default, brave is an alternative option for search) 8 | BRAVE_SEARCH_API_KEY=APIKEYGOESHERE 9 | 10 | 11 | # OPTIONAL - Set LAN GPU server, examples: 12 | # PC | http://localhost:11434/v1 13 | # LAN GPU server | http://192.168.1.100:11434/v1 14 | OLLAMA_BASE_URL=http://localhost:11434/v1 15 | 16 | # OPTIONAL - Rate Limiting: https://console.upstash.com/redis 17 | UPSTASH_REDIS_REST_URL=https://EXAMPLE.upstash.io 18 | UPSTASH_REDIS_REST_TOKEN=APIKEYGOESHERE 19 | 20 | # OPTIONAL - Google Search API Key (Serper is the default, brave is an alternative) 21 | GOOGLE_SEARCH_API_KEY=APIKEYGOESHERE 22 | GOOGLE_CX=VALUEGOESHERE 23 | 24 | # OPTIONAL - Portkey API Key & Bedrock Virtual Key/Provder API Keys 25 | PORTKEY_API_KEY=APIKEYGOESHERE 26 | PORTKEY_BEDROCK_VIRTUAL_KEY=APIKEYGOESHERE 27 | 28 | # OPTIONAL - Spotify 29 | SPOTIFY_CLIENT_ID=APIKEYGOESHERE 30 | SPOTIFY_CLIENT_SECRET=APIKEYGOESHERE 31 | 32 | # OPTIONAL - AWS Bedrock 33 | AWS_ACCESS_KEY_ID=APIKEYGOESHERE 34 | AWS_SECRET_ACCESS_KEY=APIKEYGOESHERE 35 | 36 | # OPTIONAL - FAL.AI (Stable Diffusion 3) 37 | FAL_KEY=APIKEYGOESHERE -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [developersdigest] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | .turbo 4 | *.log 5 | .next 6 | *.local 7 | .env 8 | .cache 9 | .turbo 10 | .vercel 11 | .vscode 12 | .idea -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | 3 | EXPOSE 3000/tcp 4 | 5 | RUN apt-get update && \ 6 | apt-get upgrade -y && \ 7 | rm -rf -- /var/lib/apt && \ 8 | npm install -g bun 9 | 10 | USER node 11 | 12 | WORKDIR /home/node 13 | 14 | RUN git clone https://github.com/developersdigest/llm-answer-engine.git app && \ 15 | cd app && \ 16 | bun install 17 | 18 | WORKDIR /home/node/app 19 | 20 | ENTRYPOINT ["/usr/local/bin/bun", "run", "dev"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Developers Digest 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
{`${question}`}
35 |{question}
29 |{place.address}
66 |Category: {place.category}
88 | {place.phoneNumber &&Phone: {place.phoneNumber}
} 89 | {place.website && ( 90 |91 | Website: {place.website} 92 |
93 | )} 94 |{place.address}
42 |Category: {place.category}
66 | {place.phoneNumber && ( 67 |68 | Phone: {place.phoneNumber} 69 |
70 | )} 71 | {place.website && ( 72 |73 | Website: {place.website} 74 |
75 | )} 76 |45 | You have reached the rate limit for the current period. Please try again soon! 46 |
47 |Rate limiting powered by Upstash
49 |{item.price}
72 |{item.source}
96 |{item.price}
101 | {item.delivery &&{item.delivery}
} 102 |