-
-
Notifications
You must be signed in to change notification settings - Fork 984
Expand file tree
/
Copy pathllama_4.py
More file actions
55 lines (44 loc) · 1.42 KB
/
Copy pathllama_4.py
File metadata and controls
55 lines (44 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from dotenv import load_dotenv
from swarms import Agent
from swarms.utils.vllm_wrapper import VLLM
load_dotenv()
# Define custom system prompt for crypto risk analysis
CRYPTO_RISK_ANALYSIS_PROMPT = """
You are a cryptocurrency risk analysis expert. Your role is to:
1. Analyze market risks:
- Volatility assessment
- Market sentiment analysis
- Trading volume patterns
- Price trend evaluation
2. Evaluate technical risks:
- Network security
- Protocol vulnerabilities
- Smart contract risks
- Technical scalability
3. Consider regulatory risks:
- Current regulations
- Potential regulatory changes
- Compliance requirements
- Geographic restrictions
4. Assess fundamental risks:
- Team background
- Project development status
- Competition analysis
- Use case viability
Provide detailed, balanced analysis with both risks and potential mitigations.
Base your analysis on established crypto market principles and current market conditions.
"""
model = VLLM(model_name="meta-llama/Llama-4-Maverick-17B-128E")
# Initialize the agent with custom prompt
agent = Agent(
agent_name="Crypto-Risk-Analysis-Agent",
agent_description="Agent for analyzing risks in cryptocurrency investments",
system_prompt=CRYPTO_RISK_ANALYSIS_PROMPT,
max_loops=1,
llm=model,
)
print(
agent.run(
"Conduct a risk analysis of the top cryptocurrencies. Think for 2 loops internally"
)
)