Remove finance-related code and dependencies.

This commit entirely removes the financial query agent, market data tools, and associated code and dependencies. It simplifies the codebase by eliminating unused or unnecessary functionality related to cryptocurrency market data and financial analysis.
This commit is contained in:
geoffsee
2025-05-27 12:30:19 -04:00
parent cfe77d7e61
commit 6e6865e0aa
18 changed files with 0 additions and 861 deletions

View File

@@ -1,21 +0,0 @@
import {types} from "mobx-state-tree";
import {QuoteStore} from "@web-agent-rs/core/quotes/models";
import {NewsStore} from "@web-agent-rs/core/news";
import newsStore from "./news";
import quoteStore from "./quotes";
const StateModel = types.model("State", {
symbols: types.array(types.string),
quotes: QuoteStore,
news: NewsStore,
});
const state = StateModel.create({
quotes: quoteStore,
news: newsStore,
});
export default state;

View File

@@ -1,11 +0,0 @@
import {NewsStore} from "@web-agent-rs/core/news";
import {Instance} from "mobx-state-tree";
const newsStore = NewsStore.create({
isLoading: false,
apiKey: process.env.PERIGON_API_KEY
});
export type NewsStore = Instance<typeof newsStore>;
export default newsStore;

View File

@@ -1,7 +0,0 @@
import {QuoteStore} from "@web-agent-rs/core/quotes/models";
const quoteStore = QuoteStore.create({
apiKey: process.env.CCC_API_KEY
});
export default quoteStore;

View File

@@ -1,80 +0,0 @@
import state from "./_state/index.js";
import {getSnapshot} from "mobx-state-tree";
import {collect_gainers_losers} from "@web-agent-rs/core/market";
def("QUERY", env.vars.user_input);
defTool(
"get_quote",
"Fetch quote for symbol",
{
"symbol": {
type: "string",
default: "BTC"
}
},
async (args) => {
const { symbol } = args;
await state.quotes.fetchQuote(symbol);
const quote = await state.quotes.getQuote(symbol);
return JSON.stringify(quote)
}
);
defTool(
"get_news",
"Fetches news for symbol",
{
"symbol": {
type: "string",
default: "BTC"
}
},
async (args) => {
const { symbol } = args;
await state.news.fetchNewsForSymbol(symbol, 5, "date");
const news = await state.news.getNewsForSymbol(symbol).map(i => getSnapshot(i));
return news
}
);
defTool(
"get_market",
"Fetches trending symbols of market",
{
"limit": {
type: "number",
default: "25"
}
},
async (args) => {
const { limit } = args;
const marketOverviewRequest = await collect_gainers_losers({apiKey: process.env.CCC_API_KEY, limit: parseInt(limit) })
return marketOverviewRequest.data.map(item => ({
symbol: item.symbol,
name: item.name,
change_1h: item.quote.USD.percent_change_1h,
price: item.quote.USD.price,
volume_24h: item.quote.USD.volume_24h
}))
}
);
$`You are a market data assistant specializing in financial analysis. Respond to QUERIES with accurate, clear, and concise information relevant to professionals in the finance sector. Use available tools efficiently to gather and present quantitative data.`;