Skip to content

Commit 7614111

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 8460965 + 7811c0f commit 7614111

23 files changed

+244
-151
lines changed

.env.example

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Get your OpenAI API Key here for chat models: https://platform.openai.com/account/api-keys
2-
OPENAI_API_KEY=****
1+
# Get your xAI API Key here for chat models: https://console.x.ai/
2+
XAI_API_KEY=****
33

4-
# Get your Fireworks AI API Key here for reasoning models: https://fireworks.ai/account/api-keys
5-
FIREWORKS_API_KEY=****
4+
# Get your Groq API Key here for reasoning models: https://console.groq.com/keys
5+
GROQ_API_KEY=****
6+
7+
# Get your Fal AI API Key here for image models: https://docs.fal.ai/authentication/key-based
8+
FAL_API_KEY=****
69

710
# Generate a random secret: https://generate-secret.vercel.app/32 or `openssl rand -base64 32`
811
AUTH_SECRET=****

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ yarn-error.log*
3434

3535
.env
3636
.vercel
37-
.vscode
3837
.env*.local
3938

4039
certificates

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["biomejs.biome"]
3+
}

.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"[javascript]": {
4+
"editor.defaultFormatter": "biomejs.biome"
5+
},
6+
"[typescript]": {
7+
"editor.defaultFormatter": "biomejs.biome"
8+
},
9+
"[typescriptreact]": {
10+
"editor.defaultFormatter": "biomejs.biome"
11+
},
12+
"typescript.tsdk": "node_modules/typescript/lib",
13+
"eslint.workingDirectories": [
14+
{ "pattern": "app/*" },
15+
{ "pattern": "packages/*" }
16+
]
17+
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
- [AI SDK](https://sdk.vercel.ai/docs)
2424
- Unified API for generating text, structured objects, and tool calls with LLMs
2525
- Hooks for building dynamic chat and generative user interfaces
26-
- Supports OpenAI (default), Anthropic, Cohere, and other model providers
26+
- Supports xAI (default), OpenAI, Fireworks, and other model providers
2727
- [shadcn/ui](https://ui.shadcn.com)
2828
- Styling with [Tailwind CSS](https://tailwindcss.com)
2929
- Component primitives from [Radix UI](https://radix-ui.com) for accessibility and flexibility
@@ -35,19 +35,19 @@
3535

3636
## Model Providers
3737

38-
This template ships with OpenAI `gpt-4o` as the default. However, with the [AI SDK](https://sdk.vercel.ai/docs), you can switch LLM providers to [OpenAI](https://openai.com), [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), and [many more](https://sdk.vercel.ai/providers/ai-sdk-providers) with just a few lines of code.
38+
This template ships with [xAI](https://x.ai) `grok-2-1212` as the default chat model. However, with the [AI SDK](https://sdk.vercel.ai/docs), you can switch LLM providers to [OpenAI](https://openai.com), [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), and [many more](https://sdk.vercel.ai/providers/ai-sdk-providers) with just a few lines of code.
3939

4040
## Deploy Your Own
4141

4242
You can deploy your own version of the Next.js AI Chatbot to Vercel with one click:
4343

44-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot&env=AUTH_SECRET,OPENAI_API_KEY&envDescription=Learn%20more%20about%20how%20to%20get%20the%20API%20Keys%20for%20the%20application&envLink=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot%2Fblob%2Fmain%2F.env.example&demo-title=AI%20Chatbot&demo-description=An%20Open-Source%20AI%20Chatbot%20Template%20Built%20With%20Next.js%20and%20the%20AI%20SDK%20by%20Vercel.&demo-url=https%3A%2F%2Fchat.vercel.ai&stores=[{%22type%22:%22postgres%22},{%22type%22:%22blob%22}])
44+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot&env=AUTH_SECRET&envDescription=Learn%20more%20about%20how%20to%20get%20the%20API%20Keys%20for%20the%20application&envLink=https%3A%2F%2Fgithub.com%2Fvercel%2Fai-chatbot%2Fblob%2Fmain%2F.env.example&demo-title=AI%20Chatbot&demo-description=An%20Open-Source%20AI%20Chatbot%20Template%20Built%20With%20Next.js%20and%20the%20AI%20SDK%20by%20Vercel.&demo-url=https%3A%2F%2Fchat.vercel.ai&stores=[{%22type%22:%22postgres%22},{%22type%22:%22blob%22}]&integration-ids=oac_g1tOx3546WuLOQ4QeyAX1n1P,oac_G6x10PjgSxUUTu6Pi25ZAtbp,oac_GzhR3rwEIUyQEpKEsmAiEjfi)
4545

4646
## Running locally
4747

4848
You will need to use the environment variables [defined in `.env.example`](.env.example) to run Next.js AI Chatbot. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/projects/environment-variables) for this, but a `.env` file is all that is necessary.
4949

50-
> Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various OpenAI and authentication provider accounts.
50+
> Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various AI and authentication provider accounts.
5151
5252
1. Install Vercel CLI: `npm i -g vercel`
5353
2. Link local instance with Vercel and GitHub accounts (creates `.vercel` directory): `vercel link`

app/(auth)/_register/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function Page() {
3939
setIsSuccessful(true);
4040
router.refresh();
4141
}
42-
}, [state, router]);
42+
}, [state]);
4343

4444
const handleSubmit = (formData: FormData) => {
4545
setEmail(formData.get('email') as string);

app/(auth)/login/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function Page() {
3838
setIsSuccessful(true);
3939
router.refresh();
4040
}
41-
}, [state.status, router]);
41+
}, [state.status]);
4242

4343
const handleSubmit = (formData: FormData) => {
4444
setEmail(formData.get('email') as string);

app/(chat)/api/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export async function POST(request: Request) {
137137
},
138138
],
139139
});
140-
} catch (error) {
140+
} catch (_) {
141141
console.error('Failed to save chat');
142142
}
143143
}

app/(chat)/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { cookies } from 'next/headers';
22

33
import { AppSidebar } from '@/components/app-sidebar';
44
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar';
5-
65
import { auth } from '../(auth)/auth';
76
import Script from 'next/script';
87

app/globals.css

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,6 @@
102102
body {
103103
@apply bg-background text-foreground;
104104
}
105-
106-
@font-face {
107-
font-family: "geist";
108-
font-style: normal;
109-
font-weight: 100 900;
110-
src: url(/fonts/geist.woff2) format("woff2");
111-
}
112-
113-
@font-face {
114-
font-family: "geist-mono";
115-
font-style: normal;
116-
font-weight: 100 900;
117-
src: url(/fonts/geist-mono.woff2) format("woff2");
118-
}
119105
}
120106

121107
.skeleton {

0 commit comments

Comments
 (0)