adapting langchain to use actions

This commit is contained in:
Fahri Bilici
2024-12-31 01:17:53 +01:00
parent c00515f3d2
commit 1b601b839d
7 changed files with 138 additions and 217 deletions

View File

@@ -37,10 +37,8 @@ const pythFetchPriceAction: Action = {
}),
handler: async (_agent: SolanaAgentKit, input: Record<string, any>) => {
try {
const priceFeedId = input.priceFeedId as string;
const priceFeedId = input.tokenId as string;
const priceStr = await pythFetchPrice(priceFeedId);
return {
status: "success",
price: priceStr,