Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 4 additions & 121 deletions apps/portal/src/app/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ const links = [
href: "/wallets",
name: "Wallets",
},
{
href: "/transactions",
name: "Transactions",
},
{
href: "/contracts",
name: "Contracts",
},
{
href: "/x402",
name: "x402",
Expand All @@ -52,31 +44,12 @@ const links = [
name: "Tokens",
},
{
href: "/reference",
name: "API Reference",
},
];

const toolLinks = [
{
href: "https://thirdweb.com/chainlist",
name: "Chain List",
},
{
href: "https://thirdweb.com/tools/wei-converter",
name: "Wei Converter",
},
{
href: "https://thirdweb.com/tools/hex-converter",
name: "Hex Converter",
},
{
href: "/account/api-keys",
name: "API Keys",
href: "/ai/chat",
name: "AI",
},
{
href: "/cli",
name: "CLI",
href: "/reference",
name: "API Reference",
},
];

Expand Down Expand Up @@ -122,44 +95,6 @@ export const connectLinks: Array<{
},
] as const;

const apisLinks = [
{
href: "https://api.thirdweb.com/reference",
name: "HTTP API",
},
{
href: "/insight",
name: "Insight",
},
{
href: "https://engine.thirdweb.com/reference#tag/write",
name: "Transactions",
},
{
href: "https://bridge.thirdweb.com/reference",
name: "Payments",
},
{
href: "/bundler",
name: "Bundler",
},
];

const aiLinks = [
{
href: "/ai/chat",
name: "Blockchain LLM",
},
{
href: "/ai/mcp",
name: "MCP",
},
{
href: "/ai/llm-txt",
name: "LLMs.txt",
},
];

const sdkLinks = [
{
href: "/references/typescript/v5",
Expand Down Expand Up @@ -300,27 +235,11 @@ export function Header() {
</nav>

<div className="flex items-center">
<DropdownLinks
category="AI"
links={aiLinks}
onLinkClick={() => setShowBurgerMenu(false)}
/>
<DropdownLinks
category="SDKs"
links={sdkLinks}
onLinkClick={() => setShowBurgerMenu(false)}
/>
<DropdownLinks
category="APIs"
links={apisLinks}
onLinkClick={() => setShowBurgerMenu(false)}
/>

<DropdownLinks
category="Tools"
links={toolLinks}
onLinkClick={() => setShowBurgerMenu(false)}
/>
<DropdownLinks
category="Support"
links={supportLinks}
Expand Down Expand Up @@ -355,18 +274,6 @@ export function Header() {
))}
</div>

<div className="flex flex-col gap-4">
<h3 className="font-semibold text-lg">AI</h3>
{aiLinks.map((link) => (
<NavLink
href={link.href}
key={link.name}
name={link.name}
onClick={() => setShowBurgerMenu(false)}
/>
))}
</div>

<div className="flex flex-col gap-4">
<h3 className="font-semibold text-lg">SDKs</h3>
{sdkLinks.map((link) => (
Expand All @@ -380,18 +287,6 @@ export function Header() {
))}
</div>

<div className="flex flex-col gap-4">
<h3 className="font-semibold text-lg">APIs</h3>
{apisLinks.map((link) => (
<NavLink
href={link.href}
key={link.name}
name={link.name}
onClick={() => setShowBurgerMenu(false)}
/>
))}
</div>

<div className="flex flex-col gap-4">
<h3 className="font-semibold text-lg">Support</h3>
{supportLinks.map((link) => (
Expand All @@ -409,18 +304,6 @@ export function Header() {
name="Changelog"
onClick={() => setShowBurgerMenu(false)}
/>

<div className="flex flex-col gap-4">
<h3 className="font-semibold text-lg">Tools</h3>
{toolLinks.map((link) => (
<NavLink
href={link.href}
key={link.name}
name={link.name}
onClick={() => setShowBurgerMenu(false)}
/>
))}
</div>
</div>
</div>
)}
Expand Down
21 changes: 12 additions & 9 deletions apps/portal/src/app/ai/chat/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@ import { Tabs, TabsContent, TabsList, TabsTrigger, OpenApiEndpoint } from "@doc"

# Blockchain LLM

The thirdweb API exposes a standard OpenAI-compatible chat completion API that allows you to interact with the thirdweb AI model, optimized for blockchain interactions.
The thirdweb API provides an OpenAI-compatible chat completion interface optimized for blockchain interactions.

- Query real-time data from the blockchain
You can use it to:

- Query on-chain data
- Analyze transactions
- Fetch token balances, prices and metadata
- Execute or prepare any contract call or transaction
- Execute or prepare swaps from/to any token pair
- Fetch token info and prices
- Execute or prepare contract calls and swaps
- Deploy contracts
- Generate images
- Search the web
- And more!
- Generate images and search the web

and more.

## QuickStart

You can use the API with the HTTP API directly, the AI SDK or with any OpenAI-compatible client library.
You can use thirdweb AI with the HTTP API directly, the AI SDK, or with any OpenAI-compatible client library.

<Tabs defaultValue="api">
<TabsList>
Expand Down
26 changes: 26 additions & 0 deletions apps/portal/src/app/ai/faq/page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { createMetadata, Details } from "@doc";

export const metadata = createMetadata({
title: "AI FAQs | thirdweb documentation",
description: "",
image: {
title: "AI FAQs",
icon: "wallets",
},
});

# AI FAQ

## General

<Details summary="What is the context window?">
The context size or window is 128k tokens or approximately 96,000 words which may vary depending on the specific language and text characteristics.
</Details>

<Details summary="Which chains does it support?">
The AI supports reading and writing capabilities on any supported EVM chain. <a href="https://thirdweb.com/chainlist">View the full list of supported chains.</a>
</Details>

<Details summary="Does the AI support multiple languages?">
Yes, you may prompt it in any spoken language.
</Details>
69 changes: 46 additions & 23 deletions apps/portal/src/app/ai/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import type { SideBar } from "@/components/Layouts/DocLayout";
export const sidebar: SideBar = {
links: [
{
name: "Blockchain LLM",
name: "Get Started",
href: "/ai/chat",
icon: <ZapIcon />,
},
{
href: "https://playground.thirdweb.com",
name: "Playground",
icon: <ExternalLinkIcon />,
},
{ separator: true },
{
name: "Guides",
isCollapsible: false,
links: [
{
name: "Get Started",
href: "/ai/chat",
icon: <ZapIcon />,
},
{
name: "Playground",
href: "https://playground.thirdweb.com/ai/chat",
icon: <ExternalLinkIcon />,
},
{
name: "Transaction Execution",
href: "/ai/chat/execution",
Expand All @@ -26,12 +27,17 @@ export const sidebar: SideBar = {
href: "/ai/chat/streaming",
},
{
name: "Vercel AI SDK",
href: "/ai/chat/ai-sdk",
},
{
name: "OpenAI SDK",
href: "/ai/chat/openai-sdk",
name: "Integrations",
links: [
{
name: "Vercel AI SDK",
href: "/ai/chat/ai-sdk",
},
{
name: "OpenAI SDK",
href: "/ai/chat/openai-sdk",
},
],
},
{
name: "API Reference",
Expand All @@ -41,14 +47,31 @@ export const sidebar: SideBar = {
},
{ separator: true },
{
name: "MCP Server",
icon: <ZapIcon />,
href: "/ai/mcp",
name: "Agent Tools",
isCollapsible: false,
links: [
{
name: "MCP Server",
icon: <ZapIcon />,
href: "/ai/mcp",
},
{
name: "llms.txt",
icon: <BookIcon />,
href: "/ai/llm-txt",
},
],
},
{ separator: true },
{
name: "llms.txt",
icon: <BookIcon />,
href: "/ai/llm-txt",
name: "Resources",
isCollapsible: false,
links: [
{
href: "/ai/faq",
name: "FAQ",
},
],
},
],
name: "AI",
Expand Down
Loading
Loading