Skip to content

Commit

Permalink
Small fixes to news agent. Selection of agents to load in config.
Browse files Browse the repository at this point in the history
  • Loading branch information
LachsBagel committed Oct 18, 2024
1 parent e71a084 commit 799316c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ def get_tools(self):
def check_relevance_and_summarize(self, title, content, coin):
logger.info(f"Checking relevance for {coin}: {title}")
prompt = Config.RELEVANCE_PROMPT.format(coin=coin, title=title, content=content)
result = self.llm.create_chat_completion(
messages=[{"role": "user", "content": prompt}],
result = self.llm.invoke(
input=[{"role": "user", "content": prompt}],
max_tokens=Config.LLM_MAX_TOKENS,
temperature=Config.LLM_TEMPERATURE,
)
return result["choices"][0]["message"]["content"].strip()
return result.content.strip()

def process_rss_feed(self, feed_url, coin):
logger.info(f"Processing RSS feed for {coin}: {feed_url}")
Expand Down
43 changes: 21 additions & 22 deletions submodules/moragents_dockers/agents/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,39 @@ class Config:
# "upload_required": False,
# },
{

"path": "src.agents.tweet_sizzler.agent",
"class": "TweetSizzlerAgent",
"description": "Generates and posts engaging tweets. Use when the query explicitly mentions Twitter, tweeting, or X platform.",
"name": "tweet sizzler agent",
"upload_required": False,
},
{
"path": "src.agents.mor_claims.agent",
"class": "MorClaimsAgent",
"description": "Manages the process of claiming rewards or tokens, specifically MOR rewards. Use when the query explicitly mentions claiming rewards or tokens.",
"name": "mor claims agent",
"upload_required": False,
},
# {
# "path": "src.agents.mor_claims.agent",
# "class": "MorClaimsAgent",
# "description": "Manages the process of claiming rewards or tokens, specifically MOR rewards. Use when the query explicitly mentions claiming rewards or tokens.",
# "name": "mor claims agent",
# "upload_required": False,
# },
{
"path": "src.agents.mor_rewards.agent",
"class": "MorRewardsAgent",
"description": "Provides information about user's accrued MOR rewards or tokens. Use when the query is about checking or querying reward balances.",
"name": "mor rewards agent",
"upload_required": False,
},
# {
# "path": "src.agents.realtime_search.agent",
# "class": "RealtimeSearchAgent",
# "description": "Only use this agent for real-time data. This agent is not for general purpose queries. Use when the query is about searching the web for real-time information.",
# "name": "realtime search agent",
# "upload_required": False,
# },
# {
# "path": "src.agents.news_agent.agent",
# "class": "NewsAgent",
# "description": "Fetches and analyzes cryptocurrency news for potential price impacts.",
# "name": "crypto news agent",
# "upload_required": False,
# }
{
"path": "src.agents.realtime_search.agent",
"class": "RealtimeSearchAgent",
"description": "Only use this agent for real-time data. This agent is not for general purpose queries. Use when the query is about searching the web for real-time information.",
"name": "realtime search agent",
"upload_required": False,
},
{
"path": "src.agents.news_agent.agent",
"class": "NewsAgent",
"description": "Fetches and analyzes cryptocurrency news for potential price impacts.",
"name": "crypto news agent",
"upload_required": False,
}
]
}

0 comments on commit 799316c

Please sign in to comment.