generated from sendaifun/solana-agent-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from plutohan/init-pie-agent
Initialize pie agent
- Loading branch information
Showing
13 changed files
with
459 additions
and
384 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,23 @@ | ||
import { ChatWindow } from "@/components/ChatWindow"; | ||
|
||
export default function Home() { | ||
const InfoCard = ( | ||
<div className="p-4 md:p-8 rounded bg-[#25252d] w-full max-h-[85%] overflow-hidden"> | ||
<h1 className="text-3xl md:text-4xl mb-4"> | ||
SolanaAgentKit + LangChain.js 🦜🔗 + Next.js | ||
</h1> | ||
<ul> | ||
<li className="text-l"> | ||
🤝 | ||
<span className="ml-2"> | ||
This template showcases a simple agent chatbot using{" "} | ||
<a href="https://www.solanaagentkit.xyz/">SolanaAgentKit</a> | ||
{", "} | ||
<a href="https://js.langchain.com/" target="_blank"> | ||
LangChain.js | ||
</a>{" "} | ||
and the Vercel{" "} | ||
<a href="https://sdk.vercel.ai/docs" target="_blank"> | ||
AI SDK | ||
</a>{" "} | ||
in a{" "} | ||
<a href="https://nextjs.org/" target="_blank"> | ||
Next.js | ||
</a>{" "} | ||
project. | ||
</span> | ||
</li> | ||
<li className="hidden text-l md:block"> | ||
💻 | ||
<span className="ml-2"> | ||
You can find the prompt and model logic for this use-case in{" "} | ||
<code>app/api/chat/route.ts</code>. | ||
</span> | ||
</li> | ||
<li className="hidden text-l md:block"> | ||
🎨 | ||
<span className="ml-2"> | ||
The main frontend logic is found in <code>app/page.tsx</code>. | ||
</span> | ||
</li> | ||
<li className="text-l"> | ||
🐙 | ||
<span className="ml-2"> | ||
This template is open source - you can see the source code and | ||
deploy your own version{" "} | ||
<a | ||
href="https://github.com/michaelessiet/solana-agent-nextjs-starter-langchain" | ||
target="_blank" | ||
> | ||
from the GitHub repo | ||
</a> | ||
! | ||
</span> | ||
</li> | ||
<li className="text-l"> | ||
👇 | ||
<span className="ml-2"> | ||
Try asking e.g. <code>What is my wallet address?</code> below! | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
); | ||
return ( | ||
<ChatWindow | ||
endpoint="api/chat" | ||
emoji="🤖" | ||
titleText="Solana agent" | ||
placeholder="I'm your friendly Solana agent! Ask me anything..." | ||
emptyStateComponent={InfoCard} | ||
></ChatWindow> | ||
); | ||
const InfoCard = ( | ||
<div className="p-4 md:p-8 rounded bg-[#D16E1033] w-full max-h-[85%] overflow-hidden"> | ||
<h1 className="text-3xl md:text-4xl mb-4"> | ||
Pie.Fun Super Smart AI Agent | ||
</h1> | ||
<p> | ||
Ask me anything about Pie.Fun. I'm your friendly Pie.Fun agent! | ||
</p> | ||
</div> | ||
); | ||
return ( | ||
<ChatWindow | ||
endpoint="api/chat" | ||
emoji="🥧" | ||
titleText="Pie.Fun Super Smart AI Agent" | ||
placeholder="I'm your friendly Pie.Fun agent! Ask me anything..." | ||
emptyStateComponent={InfoCard} | ||
></ChatWindow> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.