Skip to content

Commit

Permalink
Add github link to next pages code examples (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon committed Jun 7, 2024
1 parent 55e06da commit 8bb28ff
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ export async function POST(req: Request) {
return Response.json({ text });
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/basics/generate-text/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ export async function POST(req: Request) {
return result.toAIStreamResponse();
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/basics/stream-text/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ export async function POST(req: Request) {
return Response.json({ object });
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/basics/generate-object/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,7 @@ export async function POST(req: Request) {
return Response.json({ messages: responseMessages });
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/chat/generate-chat/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,7 @@ export async function POST(req: Request) {
return result.toAIStreamResponse();
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/chat/stream-chat/index.tsx" />
4 changes: 4 additions & 0 deletions content/examples/02-next-pages/10-tools/01-call-tool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,7 @@ export async function POST(req: Request) {
return result.toAIStreamResponse();
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/tools/call-tool/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,7 @@ export async function POST(req: Request) {
return result.toAIStreamResponse();
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/tools/call-tools-in-parallel/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ export async function POST(req: Request) {
);
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/assistants/stream-assistant-response/index.tsx" />
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,7 @@ export async function POST(req: Request) {
);
}
```

---

<GithubLink link="https://github.com/vercel/ai/blob/main/examples/next-openai-pages/pages/assistants/stream-assistant-response-with-tools/index.tsx" />

0 comments on commit 8bb28ff

Please sign in to comment.